Skip to content

Commit cd6dde4

Browse files
committed
merge main
2 parents 4fa07fc + e33e8ef commit cd6dde4

File tree

57 files changed

+1037
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1037
-21
lines changed

0-bootstrap/cb.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ module "tf_private_pool" {
160160
vpn_configuration = {
161161
enable_vpn = false
162162
}
163+
164+
depends_on = [module.tf_source]
163165
}
164166

165167
module "tf_cloud_builder" {
@@ -264,6 +266,8 @@ resource "google_artifact_registry_repository_iam_member" "terraform_sa_artifact
264266
repository = local.gar_repository
265267
role = "roles/artifactregistry.reader"
266268
member = "serviceAccount:${google_service_account.terraform-env-sa[each.key].email}"
269+
270+
depends_on = [module.tf_source]
267271
}
268272

269273
resource "google_sourcerepo_repository_iam_member" "member" {
@@ -273,6 +277,8 @@ resource "google_sourcerepo_repository_iam_member" "member" {
273277
repository = module.tf_source.csr_repos["gcp-policies"].name
274278
role = "roles/viewer"
275279
member = "serviceAccount:${google_service_account.terraform-env-sa[each.key].email}"
280+
281+
depends_on = [module.tf_source]
276282
}
277283

278284
data "google_project" "cloudbuild_project" {

0-bootstrap/sa.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ locals {
116116
],
117117
"proj" = [
118118
"roles/storage.objectAdmin",
119+
"roles/storage.admin",
119120
],
120121
}
121122

1-org/envs/shared/service_control.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ locals {
143143
"webrisk.googleapis.com",
144144
"workflows.googleapis.com",
145145
"workstations.googleapis.com",
146+
"confidentialcomputing.googleapis.com",
146147
]
147148

148149
restricted_services = length(var.custom_restricted_services) != 0 ? var.custom_restricted_services : local.supported_restricted_service

4-projects/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ For an overview of the architecture and the parts, see the
5757

5858
The purpose of this step is to set up the folder structure, projects, and infrastructure pipelines for applications that are connected as service projects to the shared VPC created in the previous stage.
5959

60-
For each business unit, a shared `infra-pipeline` project is created along with Cloud Build triggers, CSRs for application infrastructure code and Google Cloud Storage buckets for state storage.
60+
For each business unit, a shared `infra-pipeline` project is created along with Cloud Build triggers, CSRs for application infrastructure code, Google Cloud Storage buckets for state storage, and a new Docker image will be built for the [Confidential Space](https://cloud.google.com/confidential-computing/confidential-space/docs/confidential-space-overview) environment, which will be used in the `5-app-infra` step.
6161

6262
This step follows the same [conventions](https://github.com/terraform-google-modules/terraform-example-foundation#branching-strategy) as the Foundation pipeline deployed in [0-bootstrap](https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/0-bootstrap/README.md).
6363
A custom [workspace](https://github.com/terraform-google-modules/terraform-google-bootstrap/blob/master/modules/tf_cloudbuild_workspace/README.md) (`bu1-example-app`) is created by this pipeline and necessary roles are granted to the Terraform Service Account of this workspace by enabling variable `sa_roles` as shown in this [example](https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/4-projects/modules/base_env/example_shared_vpc_project.tf).
@@ -201,7 +201,6 @@ grep -rl 10.3.64.0 business_unit_2/ | xargs sed -i 's/10.3.64.0/10.4.64.0/g'
201201
git checkout -b production
202202
git push origin production
203203
```
204-
205204
1. After production has been applied, apply development.
206205
1. Merge changes to development. Because this is a [named environment branch](../docs/FAQ.md#what-is-a-named-branch),
207206
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID

4-projects/business_unit_1/development/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
|------|-------------|
2020
| access\_context\_manager\_policy\_id | Access Context Manager Policy ID. |
2121
| bucket | The created storage bucket. |
22+
| confidential\_space\_project | Confidential Space project id. |
23+
| confidential\_space\_project\_number | Confidential Space project number. |
24+
| confidential\_space\_workload\_sa | Workload Service Account for confidential space from base\_env |
2225
| default\_region | The default region for the project. |
2326
| floating\_project | Project sample floating project. |
2427
| floating\_project\_number | Project number sample floating project. |

4-projects/business_unit_1/development/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ module "env" {
3838
project_deletion_policy = var.project_deletion_policy
3939
folder_deletion_protection = var.folder_deletion_protection
4040
}
41+

4-projects/business_unit_1/development/outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,18 @@ output "default_region" {
103103
description = "The default region for the project."
104104
value = local.default_region
105105
}
106+
107+
output "confidential_space_project" {
108+
description = "Confidential Space project id."
109+
value = module.env.confidential_space_project
110+
}
111+
112+
output "confidential_space_project_number" {
113+
description = "Confidential Space project number."
114+
value = module.env.confidential_space_project_number
115+
}
116+
117+
output "confidential_space_workload_sa" {
118+
description = "Workload Service Account for confidential space from base_env"
119+
value = module.env.confidential_space_workload_sa
120+
}

4-projects/business_unit_1/development/remote.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ data "terraform_remote_state" "bootstrap" {
2929
prefix = "terraform/bootstrap/state"
3030
}
3131
}
32+

4-projects/business_unit_1/nonproduction/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
|------|-------------|
2020
| access\_context\_manager\_policy\_id | Access Context Manager Policy ID. |
2121
| bucket | The created storage bucket. |
22+
| confidential\_space\_project | Confidential Space project id. |
23+
| confidential\_space\_project\_number | Confidential Space project number. |
24+
| confidential\_space\_workload\_sa | Workload Service Account for confidential space from base\_env |
2225
| default\_region | The default region for the project. |
2326
| floating\_project | Project sample floating project. |
2427
| floating\_project\_number | Project number sample floating project. |

4-projects/business_unit_1/nonproduction/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ module "env" {
3838
project_deletion_policy = var.project_deletion_policy
3939
folder_deletion_protection = var.folder_deletion_protection
4040
}
41+

0 commit comments

Comments
 (0)