Skip to content

Commit 0dc65e8

Browse files
renato-rudnickimariammartinsdaniel-cit
authored
refactor!: Remove base project (#1392)
Co-authored-by: Duda Martins <[email protected]> Co-authored-by: Daniel Andrade <[email protected]> Co-authored-by: mariammartins <[email protected]>
1 parent dcfc4f9 commit 0dc65e8

File tree

227 files changed

+1789
-5082
lines changed

Some content is hidden

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

227 files changed

+1789
-5082
lines changed

0-bootstrap/README-Jenkins.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ Here you will configure a VPN Network tunnel to enable connectivity between the
546546
```
547547

548548
1. Review the apply output in your Controller's web UI (you might want to use the option to "Scan Multibranch Pipeline Now" in your Jenkins Controller UI).
549-
1. You can now move to the instructions in the next step, go to [Deploying step 3-networks-dual-svpc](#deploying-step-3-networks-dual-svpc) to use the Dual Shared VPC mode, or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hub-and-spoke) to use the Hub and Spoke network mode.
549+
1. You can now move to the instructions in the next step, go to [Deploying step 3-networks-svpc](#deploying-step-3-networks-svpc) to use the Dual Shared VPC mode, or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hub-and-spoke) to use the Hub and Spoke network mode.
550550

551-
## Deploying step 3-networks-dual-svpc
551+
## Deploying step 3-networks-svpc
552552

553553
1. Clone the repo you created manually in 0-bootstrap.
554554

@@ -568,7 +568,7 @@ Here you will configure a VPN Network tunnel to enable connectivity between the
568568
1. Copy contents of foundation to new repo.
569569

570570
```bash
571-
cp -RT ../terraform-example-foundation/3-networks-dual-svpc/ .
571+
cp -RT ../terraform-example-foundation/3-networks-svpc/ .
572572
cp -RT ../terraform-example-foundation/policy-library/ ./policy-library
573573
cp ../terraform-example-foundation/build/Jenkinsfile .
574574
cp ../terraform-example-foundation/build/tf-wrapper.sh .
@@ -607,7 +607,7 @@ Here you will configure a VPN Network tunnel to enable connectivity between the
607607
mv access_context.auto.example.tfvars access_context.auto.tfvars
608608
```
609609

610-
1. Update `common.auto.tfvars` file with values from your environment and bootstrap. See any of the envs folder [README.md](../3-networks-dual-svpc/envs/production/README.md) files for additional information on the values in the `common.auto.tfvars` file.
610+
1. Update `common.auto.tfvars` file with values from your environment and bootstrap. See any of the envs folder [README.md](../3-networks-svpc/envs/production/README.md) files for additional information on the values in the `common.auto.tfvars` file.
611611
1. Update `production.auto.tfvars` file with the `target_name_server_addresses`.
612612
1. Update `access_context.auto.tfvars` file with the `access_context_manager_policy_id`.
613613
1. Use `terraform output` to get the backend bucket and networks step Terraform Service Account values from gcp-bootstrap output.

0-bootstrap/README-Terraform-Cloud.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export the OAuth Token ID as an environment variable:
213213
1. Run `terraform plan -input=false -out bootstrap_2.tfplan`
214214
1. Run `terraform apply bootstrap_2.tfplan`
215215

216-
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-dual-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
216+
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
217217

218218
```bash
219219
export network_step_sa=$(terraform output -raw networks_step_terraform_service_account_email)
@@ -230,7 +230,7 @@ export the OAuth Token ID as an environment variable:
230230
echo "CI/CD Project ID = ${cicd_project_id}"
231231
```
232232

233-
1. Run `terraform output` to get the name of the TFC organization and export it as environment variables. `TF_CLOUD_ORGANIZATION` variable will be used by the `cloud` block in order to move the local Terraform's state to TFC and `TF_VAR_tfc_org_name` will be used to run manual steps for `shared` environments in steps `3-networks-dual-svpc`, `3-networks-hub-and-spoke`, and `4-projects`
233+
1. Run `terraform output` to get the name of the TFC organization and export it as environment variables. `TF_CLOUD_ORGANIZATION` variable will be used by the `cloud` block in order to move the local Terraform's state to TFC and `TF_VAR_tfc_org_name` will be used to run manual steps for `shared` environments in steps `3-networks-svpc`, `3-networks-hub-and-spoke`, and `4-projects`
234234

235235
```bash
236236
export TF_CLOUD_ORGANIZATION=$(terraform output -raw tfc_org_name)
@@ -441,7 +441,7 @@ See any of the envs folder [README.md](../2-environments/envs/production/README.
441441
1. Review apply output in Terraform Cloud https://app.terraform.io/app/TFC-ORGANIZATION-NAME/workspaces/2-production/runs under `Run List` item.
442442

443443
1. You can now move to the instructions in the network stage.
444-
To use the [Dual Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-dual-svpc](#deploying-step-3-networks-dual-svpc),
444+
To use the [Dual Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-svpc](#deploying-step-3-networks-svpc),
445445
or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hub-and-spoke) to use the [Hub and Spoke](https://cloud.google.com/architecture/security-foundations/networking#hub-and-spoke) network mode.
446446

447447
1. Before moving to the next step, go back to the parent directory.
@@ -450,7 +450,7 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
450450
cd ..
451451
```
452452

453-
## Deploying step 3-networks-dual-svpc
453+
## Deploying step 3-networks-svpc
454454

455455
**Note:** For all purposes we treat `shared` environment as `production` environment due to the possible impacts into `production`. So `3-production` TFC workspace have a [Run Trigger](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-triggers) sourcing `3-shared` TFC workspace, which means that every time you successfully run an apply job in `3-shared` TFC workspace, a `Plan and apply` job will be triggered automatically for `3-production` TFC workspace. (All the applies will continue requiring manual approvals in TFC console).
456456

@@ -470,7 +470,7 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
470470
1. Copy contents of foundation to new repo.
471471

472472
```bash
473-
cp -RT ../terraform-example-foundation/3-networks-dual-svpc/ .
473+
cp -RT ../terraform-example-foundation/3-networks-svpc/ .
474474
cp -RT ../terraform-example-foundation/policy-library/ ./policy-library
475475
cp ../terraform-example-foundation/build/tf-wrapper.sh .
476476
chmod 755 ./tf-wrapper.sh
@@ -498,8 +498,8 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
498498
```
499499
500500
1. Update `common.auto.tfvars` file with values from your GCP environment.
501-
See any of the envs folder [README.md](../3-networks-dual-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
502-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
501+
See any of the envs folder [README.md](../3-networks-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
502+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
503503
504504
1. You must manually plan and apply the `shared` environment from your (only once) since the `development`, `nonproduction` and `production` environments depend on it.
505505
@@ -649,7 +649,7 @@ An environment variable `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` will be set with th
649649
650650
1. Update `common.auto.tfvars` file with values from your GCP environment.
651651
See any of the envs folder [README.md](../3-networks-hub-and-spoke/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
652-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
652+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
653653
654654
1. You must manually plan and apply the `shared` environment (only once) since the `development`, `nonproduction` and `production` environments depend on it.
655655

0-bootstrap/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ organizational policy.</td>
2525
Google Cloud organization that you've created.</td>
2626
</tr>
2727
<tr>
28-
<td><a href="../3-networks-dual-svpc">3-networks-dual-svpc</a></td>
29-
<td>Sets up base and restricted shared VPCs with default DNS, NAT (optional),
28+
<td><a href="../3-networks-svpc">3-networks-svpc</a></td>
29+
<td>Sets up shared VPCs with default DNS, NAT (optional),
3030
Private Service networking, VPC service controls, on-premises Dedicated
3131
Interconnect, and baseline firewall rules for each environment. It also sets
3232
up the global DNS hub.</td>
3333
</tr>
3434
<tr>
3535
<td><a href="../3-networks-hub-and-spoke">3-networks-hub-and-spoke</a></td>
36-
<td>Sets up base and restricted shared VPCs with all the default configuration
37-
found on step 3-networks-dual-svpc, but here the architecture will be based on the
36+
<td>Sets up shared VPCs with all the default configuration
37+
found on step 3-networks-svpc, but here the architecture will be based on the
3838
Hub and Spoke network model. It also sets up the global DNS hub.</td>
3939
</tr>
4040
</tr>
@@ -254,7 +254,7 @@ The following steps introduce the steps to deploy with Cloud Build Alternatively
254254
terraform apply bootstrap.tfplan
255255
```
256256

257-
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-dual-svpc`, `3-networks-hub-and-spoke`, and `4-projects` and the state bucket that will be used by step 4-projects.
257+
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-svpc`, `3-networks-hub-and-spoke`, and `4-projects` and the state bucket that will be used by step 4-projects.
258258

259259
```bash
260260
export network_step_sa=$(terraform output -raw networks_step_terraform_service_account_email)

0-bootstrap/versions.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ terraform {
1919
required_providers {
2020
google = {
2121
// version 4.31.0 removed because of issue https://github.com/hashicorp/terraform-provider-google/issues/12226
22+
// version 6.26.0 removed because of the bug https://github.com/hashicorp/terraform-provider-google/issues/21950
2223
source = "hashicorp/google"
23-
version = ">= 3.50, != 4.31.0, < 7.0"
24+
version = ">= 3.50, != 4.31.0, < 6.26.0"
2425
}
2526

2627
google-beta = {
2728
// version 4.31.0 removed because of issue https://github.com/hashicorp/terraform-provider-google/issues/12226
29+
// version 6.26.0 removed because of the bug https://github.com/hashicorp/terraform-provider-google/issues/21950
2830
source = "hashicorp/google-beta"
29-
version = ">= 3.50, != 4.31.0, < 7.0"
31+
version = ">= 3.50, != 4.31.0, < 6.26.0"
3032
}
3133

3234
// Un-comment gitlab required_providers when using gitlab CI/CD

1-org/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ organizational policy.</td>
2525
Google Cloud organization that you've created.</td>
2626
</tr>
2727
<tr>
28-
<td><a href="../3-networks-dual-svpc">3-networks-dual-svpc</a></td>
29-
<td>Sets up base and restricted shared VPCs with default DNS, NAT (optional),
28+
<td><a href="../3-networks-svpc">3-networks-svpc</a></td>
29+
<td>Sets up shared VPCs with default DNS, NAT (optional),
3030
Private Service networking, VPC service controls, on-premises Dedicated
3131
Interconnect, and baseline firewall rules for each environment. It also sets
3232
up the global DNS hub.</td>
3333
</tr>
3434
<tr>
3535
<td><a href="../3-networks-hub-and-spoke">3-networks-hub-and-spoke</a></td>
36-
<td>Sets up base and restricted shared VPCs with all the default configuration
37-
found on step 3-networks-dual-svpc, but here the architecture will be based on the
36+
<td>Sets up shared VPCs with all the default configuration
37+
found on step 3-networks-svpc, but here the architecture will be based on the
3838
hub-and-spoke network model. It also sets up the global DNS hub.</td>
3939
</tr>
4040
</tr>

0 commit comments

Comments
 (0)