This repo uses terraform to create below resources in order to deploy a private composer environment in shared VPC.
- Two projects, one for shared VPC and other for composer environment
- One shared VPC and subnets in host project
- Neccesary IAM permissions and firewall rules in order to deploy composer env
- Service Account for composer workers
- Composer env itself
-
A folder in org where projects will be created
-
A service account which will be used by terraform having below permissions
- at above folder level
- "roles/resourcemanager.projectCreator"
- "roles/compute.xpnAdmin"
- at org level
- "roles/browser"
- At billing account level
- "roles/billing.admin"
- At bucket(used to store state) level
- "roles/storage.objectAdmin"
- at above folder level
-
User/Service account executing terraform code need to have below permissions on above service account used by terraform.
- "roles/iam.serviceAccountTokenCreator"
Name | Version |
---|---|
google.impersonate | n/a |
Name | Source | Version |
---|---|---|
composer-env | ./composer_v1_pvt_shared_vpc | n/a |
shared | ./shared/ | n/a |
Name | Type |
---|---|
google_service_account_access_token.default | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
billing_account | The ID of the billing account to associate this project with | string |
n/a | yes |
composer_subnets | subnets for composer workers | map(object({ |
{} |
no |
composer_v1_private_envs | composer v1 private envs | map(object({ |
{} |
no |
deny_all_egrees_rule_create | Create deny all egress | bool |
true |
no |
folder_name | Parent folder for projects, folder should be child of organization | string |
n/a | yes |
org_id | The organization id for the associated services | string |
n/a | yes |
prefix | prefix for resource names | string |
n/a | yes |
terraform_service_account | Service account email of the account to impersonate to run Terraform. | string |
n/a | yes |
vm_ext_ip_access_policy_create | Create VM external policy constraint at project level to allow public IPs for public composer envs | bool |
true |
no |
No outputs.