Skip to content

Commit 3bfcd94

Browse files
feat: add confidential space (#1435)
1 parent 2fcd799 commit 3bfcd94

File tree

61 files changed

+1050
-35
lines changed

Some content is hidden

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

61 files changed

+1050
-35
lines changed

0-bootstrap/cb.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ module "tf_cloud_builder" {
178178
worker_pool_id = module.tf_private_pool.private_worker_pool_id
179179
bucket_name = "${var.bucket_prefix}-${module.tf_source.cloudbuild_project_id}-tf-cloudbuilder-build-logs"
180180
workflow_deletion_protection = var.workflow_deletion_protection
181+
182+
depends_on = [module.tf_source]
181183
}
182184

183185
module "bootstrap_csr_repo" {

0-bootstrap/sa.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ locals {
111111
],
112112
"proj" = [
113113
"roles/storage.objectAdmin",
114+
"roles/storage.admin",
114115
],
115116
}
116117

3-networks-hub-and-spoke/modules/base_env/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ locals {
5757
"cloudtrace.googleapis.com",
5858
"composer.googleapis.com",
5959
"compute.googleapis.com",
60+
"confidentialcomputing.googleapis.com",
6061
"connectgateway.googleapis.com",
6162
"contactcenterinsights.googleapis.com",
6263
"container.googleapis.com",

3-networks-svpc/modules/base_env/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ locals {
3939
"adsdatahub.googleapis.com",
4040
"aiplatform.googleapis.com",
4141
"alloydb.googleapis.com",
42-
"alpha-documentai.googleapis.com",
42+
"documentai.googleapis.com",
4343
"analyticshub.googleapis.com",
4444
"apigee.googleapis.com",
4545
"apigeeconnect.googleapis.com",
@@ -70,6 +70,7 @@ locals {
7070
"cloudtrace.googleapis.com",
7171
"composer.googleapis.com",
7272
"compute.googleapis.com",
73+
"confidentialcomputing.googleapis.com",
7374
"connectgateway.googleapis.com",
7475
"contactcenterinsights.googleapis.com",
7576
"container.googleapis.com",

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
| iap\_firewall\_tags | The security tags created for IAP (SSH and RDP) firewall rules and to be used on the VM created on step 5-app-infra on the peering network 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
@@ -93,3 +93,18 @@ output "default_region" {
9393
description = "The default region for the project."
9494
value = local.default_region
9595
}
96+
97+
output "confidential_space_project" {
98+
description = "Confidential Space project id."
99+
value = module.env.confidential_space_project
100+
}
101+
102+
output "confidential_space_project_number" {
103+
description = "Confidential Space project number."
104+
value = module.env.confidential_space_project_number
105+
}
106+
107+
output "confidential_space_workload_sa" {
108+
description = "Workload Service Account for confidential space from base_env"
109+
value = module.env.confidential_space_workload_sa
110+
}

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
| iap\_firewall\_tags | The security tags created for IAP (SSH and RDP) firewall rules and to be used on the VM created on step 5-app-infra on the peering network project. |

0 commit comments

Comments
 (0)