github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/google/r/google_project.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_project"
     4  sidebar_current: "docs-google-project"
     5  description: |-
     6   Allows management of a Google Cloud Platform project.
     7  ---
     8  
     9  # google\_project
    10  
    11  Allows creation and management of a Google Cloud Platform project.
    12  
    13  Projects created with this resource must be associated with an Organization.
    14  See the [Organization documentation](https://cloud.google.com/resource-manager/docs/quickstarts) for more details.
    15  
    16  The service account used to run Terraform when creating a `google_project`
    17  resource must have `roles/resourcemanager.projectCreator`. See the
    18  [Access Control for Organizations Using IAM](https://cloud.google.com/resource-manager/docs/access-control-org)
    19  doc for more information.
    20  
    21  Note that prior to 0.8.5, `google_project` functioned like a data source,
    22  meaning any project referenced by it had to be created and managed outside
    23  Terraform. As of 0.8.5, `google_project` functions like any other Terraform
    24  resource, with Terraform creating and managing the project. To replicate the old
    25  behavior, either:
    26  
    27  * Use the project ID directly in whatever is referencing the project, using the
    28    [google_project_iam_policy](/docs/providers/google/r/google_project_iam_policy.html)
    29    to replace the old `policy_data` property.
    30  * Use the [import](/docs/import/usage.html) functionality
    31    to import your pre-existing project into Terraform, where it can be referenced and
    32    used just like always, keeping in mind that Terraform will attempt to undo any changes
    33    made outside Terraform.
    34  
    35  ~> It's important to note that any project resources that were added to your Terraform config
    36  prior to 0.8.5 will continue to function as they always have, and will not be managed by
    37  Terraform. Only newly added projects are affected.
    38  
    39  ## Example Usage
    40  
    41  ```hcl
    42  resource "google_project" "my_project" {
    43    project_id = "your-project-id"
    44    org_id     = "1234567"
    45  }
    46  ```
    47  
    48  ## Argument Reference
    49  
    50  The following arguments are supported:
    51  
    52  * `project_id` - (Optional) The project ID.
    53      Changing this forces a new project to be created. If this attribute is not
    54      set, `id` must be set. As `id` is deprecated, consider this attribute
    55      required. If you are using `project_id` and creating a new project, the
    56      `org_id` and `name` attributes are also required.
    57  
    58  * `id` - (Deprecated) The project ID.
    59      This attribute has unexpected behaviour and probably does not work
    60      as users would expect; it has been deprecated, and will be removed in future
    61      versions of Terraform. The `project_id` attribute should be used instead. See
    62      [below](#id-field) for more information about its behaviour.
    63  
    64  * `org_id` - (Optional) The numeric ID of the organization this project belongs to.
    65      This is required if you are creating a new project.
    66      Changing this forces a new project to be created.
    67  
    68  * `billing_account` - (Optional) The alphanumeric ID of the billing account this project
    69      belongs to. The user or service account performing this operation with Terraform
    70      must have Billing Account Administrator privileges (`roles/billing.admin`) in
    71      the organization. See [Google Cloud Billing API Access Control](https://cloud.google.com/billing/v1/how-tos/access-control)
    72      for more details.
    73  
    74  * `name` - (Optional) The display name of the project.
    75      This is required if you are creating a new project.
    76  
    77  * `skip_delete` - (Optional) If true, the Terraform resource can be deleted
    78      without deleting the Project via the Google API.
    79  
    80  * `policy_data` - (Deprecated) The IAM policy associated with the project.
    81      This argument is no longer supported, and will be removed in a future version
    82      of Terraform. It should be replaced with a `google_project_iam_policy` resource.
    83  
    84  ## Attributes Reference
    85  
    86  In addition to the arguments listed above, the following computed attributes are
    87  exported:
    88  
    89  * `number` - The numeric identifier of the project.
    90  * `policy_etag` - (Deprecated) The etag of the project's IAM policy, used to
    91      determine if the IAM policy has changed. Please use `google_project_iam_policy`'s
    92      `etag` property instead; future versions of Terraform will remove the `policy_etag`
    93      attribute
    94  
    95  ## ID Field
    96  
    97  In versions of Terraform prior to 0.8.5, `google_project` resources used an `id` field in
    98  config files to specify the project ID. Unfortunately, due to limitations in Terraform,
    99  this field always looked empty to Terraform. Terraform fell back on using the project
   100  the Google Cloud provider is configured with. If you're using the `id` field in your
   101  configurations, know that it is being ignored, and its value will always be seen as the
   102  ID of the project being used to authenticate Terraform's requests. You should move to the
   103  `project_id` field as soon as possible.