Terraform module to create and manage a Google Cloud Platform project.
See the examples directory for working examples for reference:
module "my_project" {
source = "git::https://github.com/kapetndev/terraform-google-project.git?ref=v0.1.0"
name = "my-project"
}
- minimal-project - Create a project with the minimal configuration.
- project-and-services - Create a project with additional configuration to manage services and IAM.
Name | Version |
---|---|
terraform | >= 1.0 |
Name | Version |
---|---|
>= 4.71.0 | |
random | >= 3.5.1 |
No modules.
Name | Type |
---|---|
random_id.project_id |
resource |
google_project.project |
resource |
google_project_service.services[*] |
resource |
google_project_iam_binding.authoritative[*] |
resource |
google_project_iam_member.non_authoritative[*] |
resource |
google_tags_tag_binding.binding[*] |
resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name |
The project name. An ID suffix will be added to the name to ensure uniqueness | string |
yes | |
auto_create_network |
Whether to create the default network for the project | bool |
false |
no |
billing_account |
The alphanumeric billing account ID | string |
null |
no |
descriptive_name |
The authoritative name of the project. Used instead of name variable |
string |
null |
no |
disable_dependent_services |
Whether to disable dependent services when disabling a service | bool |
false |
no |
disable_on_destroy |
Whether to disable the service when the resource is destroyed | bool |
true |
no |
group_iam |
Authoritative IAM binding for organization groups, in {GROUP_EMAIL => [ROLES]} format. Group emails must be static. Can be used in combination with the iam variable |
map(set(string)) |
{} |
no |
iam |
Authoritative IAM bindings in {ROLE => [MEMBERS]} format |
map(set(string)) |
{} |
no |
iam_member |
Non-authoritative IAM bindings in {ROLE = [MEMBERS]} format. Can be used in combination with the iam variable. Typically this will be used for default service accounts or other Google managed resources |
map(set(string)) |
{} |
no |
parent |
The parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format | string |
null |
no |
prefix |
An optional prefix used to generate the project id | string |
null |
no |
project_id |
The ID of the project. If it is not provided the name of the project is used followed by a random suffix | string |
null | no |
services |
A list of services to enable in the project | set(string) |
[] |
no |
tag_bindings |
Tag bindings for this project, in {key => tag} value id format |
map(string) |
{} |
no |
Name | Description |
---|---|
project_id |
The project ID |
project_number |
The numeric identifier of the project |