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