Skip to content

Commit

Permalink
Add config for Compute Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktorn committed Jul 29, 2023
1 parent dd98af0 commit ba2da80
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,15 @@ module "host-project" {
module "service-project" {
source = "./fabric/modules/project"
name = "my-service-project"
services = [
"container.googleapis.com",
]
shared_vpc_service_config = {
host_project = module.host-project.project_id
service_iam_grants = [
"container.googleapis.com",
]
service_iam_grants = module.service-project.services
}
}
# tftest modules=2 resources=8 inventory=shared-vpc-auto-grants.yaml
# tftest modules=2 resources=9 inventory=shared-vpc-auto-grants.yaml
```

## Organization Policies
Expand Down
7 changes: 7 additions & 0 deletions modules/project/sharedvpc-agent-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
- roles/compute.networkUser
- roles/composer.sharedVpcAgent

# Compute Engine
# TODO: identify docs
- service: compute.googleapis.com
agents:
cloudservices:
- roles/compute.networkUser

# Google Kubernetes Engine
# https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-shared-vpc#enabling_and_granting_roles
- service: container.googleapis.com
Expand Down

0 comments on commit ba2da80

Please sign in to comment.