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 012a9b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 6 additions & 5 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",
]
host_project = module.host-project.project_id
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 012a9b2

Please sign in to comment.