Skip to content

Commit f609ecd

Browse files
authored
chore: Add note regarding terraform version for manual steps (#500)
* doc: Add note regarding terraform version for manual steps * Remove trailing whitespaces * Fix typo
1 parent f46e2e8 commit f609ecd

File tree

6 files changed

+40
-31
lines changed

6 files changed

+40
-31
lines changed

0-bootstrap/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ installed:
6666
- [Terraform](https://www.terraform.io/downloads.html) version 0.13.7.
6767
- An existing project which the user has access to be used by terraform-validator.
6868

69-
**Note:** Make sure that you use the same version of Terraform throughout this
70-
series. Otherwise, you might experience Terraform state snapshot lock errors.
69+
**Note:** Make sure that you use the same version of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
7170

7271
Also make sure that you've done the following:
7372

@@ -78,7 +77,7 @@ Also make sure that you've done the following:
7877
1. Created Cloud Identity or Google Workspace (formerly G Suite) groups for
7978
organization and billing admins.
8079
1. Added the user who will use Terraform to the `group_org_admins` group.
81-
They must be in this group or they won't have
80+
They must be in this group, or they won't have
8281
`roles/resourcemanager.projectCreator` access.
8382
1. For the user who will run the procedures in this document, granted the
8483
following roles:
@@ -89,7 +88,7 @@ Also make sure that you've done the following:
8988

9089
If other users need to be able to run these procedures, add them to the group
9190
represented by the `org_project_creators` variable.
92-
For more information about the permissions that are required and the resources
91+
For more information about the permissions that are required, and the resources
9392
that are created, see the organization bootstrap module
9493
[documentation.](https://github.com/terraform-google-modules/terraform-google-bootstrap)
9594

1-org/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ The purpose of this step is to set up top-level shared folders, monitoring and n
6464
4. Security Command Center notifications require that you choose a Security Command Center tier and create and grant permissions for the Security Command Center service account as outlined in [Setting up Security Command Center](https://cloud.google.com/security-command-center/docs/quickstart-security-command-center)
6565
5. Ensure that you have requested for sufficient projects quota, as the Terraform scripts will create multiple projects from this point onwards. For more information, please [see the FAQ](https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/docs/FAQ.md).
6666

67-
**Note:** Make sure that you use the same version of Terraform throughout this
68-
series, otherwise you might experience Terraform state snapshot lock errors.
67+
**Note:** Make sure that you use the same version of Terraform throughout this series, otherwise you might experience Terraform state snapshot lock errors.
6968

7069
### Troubleshooting
7170

@@ -253,7 +252,7 @@ to run the command as the Terraform service account.
253252
1. Run `chmod 755 ./tf-wrapper.sh`
254253
1. Change into 1-org/envs/shared/ folder.
255254
1. Rename `terraform.example.tfvars` to `terraform.tfvars` and update the file with values from your environment and bootstrap.
256-
1. Obtain your bucket name by running the following command in the 0-bootstap folder.
255+
1. Obtain your bucket name by running the following command in the 0-bootstrap folder.
257256
```
258257
terraform output gcs_bucket_tfstate
259258
```

2-environments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Please refer to [troubleshooting](../docs/TROUBLESHOOTING.md) if you run into is
201201
```
202202
for i in `find -name 'backend.tf'`; do sed -i 's/UPDATE_ME/<YOUR-BUCKET-NAME>/' $i; done
203203
```
204-
You can run `terraform output gcs_bucket_tfstate` in the 0-bootstap folder to obtain the bucket name.
204+
You can run `terraform output gcs_bucket_tfstate` in the 0-bootstrap folder to obtain the bucket name.
205205
206206
We will now deploy each of our environments(development/production/non-production) using this script.
207207
When using Cloud Build or Jenkins as your CI/CD tool each environment corresponds to a branch is the repository for 2-environments step and only the corresponding environment is applied.

3-networks/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ The purpose of this step is to:
6666
1. 2-environments executed successfully.
6767
1. Obtain the value for the access_context_manager_policy_id variable. Can be obtained by running
6868

69-
```
70-
gcloud access-context-manager policies list --organization YOUR_ORGANIZATION_ID --format="value(name)"
71-
```
69+
```bash
70+
gcloud access-context-manager policies list --organization YOUR_ORGANIZATION_ID --format="value(name)"
71+
```
72+
73+
1. For the manual step described in this document, you need [Terraform](https://www.terraform.io/downloads.html) version 0.13.7 to be installed.
74+
75+
**Note:** Make sure that you use the same version of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
7276

7377
### Troubleshooting
7478

4-projects/README.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,36 +67,43 @@ This pipeline can be utilized for deploying resources in projects across develop
6767
1. 2-environments executed successfully.
6868
1. 3-networks executed successfully.
6969
1. Obtain the value for the `access_context_manager_policy_id` variable.
70-
```
70+
71+
```bash
7172
gcloud access-context-manager policies list --organization YOUR_ORGANIZATION_ID --format="value(name)"
7273
```
74+
75+
1. For the manual step described in this document, you need [Terraform](https://www.terraform.io/downloads.html) version 0.13.7 to be installed.
76+
77+
**Note:** Make sure that you use the same version of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
78+
7379
1. Obtain the values for the `perimeter_name` for each environment variable.
74-
```
80+
81+
```bash
7582
gcloud access-context-manager perimeters list --policy ACCESS_CONTEXT_MANAGER_POLICY_ID --format="value(name)"
7683
```
7784

78-
**Note:** If you have more than one service perimeter for each environment, you can also get the values from the `restricted_service_perimeter_name` output from each of the`3-networks` environments.
85+
**Note:** If you have more than one service perimeter for each environment, you can also get the values from the `restricted_service_perimeter_name` output from each of the`3-networks` environments.
7986

80-
If you are using Cloud Build you can also search for the values in the outputs from the build logs:
87+
If you are using Cloud Build you can also search for the values in the outputs from the build logs:
8188

82-
```console
83-
gcloud builds list \
84-
--project=YOUR_CLOUD_BUILD_PROJECT_ID \
85-
--filter="status=SUCCESS \
86-
AND source.repoSource.repoName=gcp-networks \
87-
AND substitutions.BRANCH_NAME=development" \
88-
--format="value(id)"
89-
```
89+
```console
90+
gcloud builds list \
91+
--project=YOUR_CLOUD_BUILD_PROJECT_ID \
92+
--filter="status=SUCCESS \
93+
AND source.repoSource.repoName=gcp-networks \
94+
AND substitutions.BRANCH_NAME=development" \
95+
--format="value(id)"
96+
```
9097

91-
Use the result of this command as the `BUILD_ID` value in the next command:
98+
Use the result of this command as the `BUILD_ID` value in the next command:
9299

93-
```console
94-
gcloud builds log BUILD_ID \
95-
--project=YOUR_CLOUD_BUILD_PROJECT_ID | \
96-
grep "restricted_service_perimeter_name = "
97-
```
100+
```console
101+
gcloud builds log BUILD_ID \
102+
--project=YOUR_CLOUD_BUILD_PROJECT_ID | \
103+
grep "restricted_service_perimeter_name = "
104+
```
98105

99-
Change the `BRANCH_NAME` from `development` to `non-production` or `production` for the other two service perimeters.
106+
Change the `BRANCH_NAME` from `development` to `non-production` or `production` for the other two service perimeters.
100107

101108
### Troubleshooting
102109

test/fixtures/bootstrap/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ variable "group_email" {
3131
}
3232

3333
variable "org_project_creators" {
34-
description = "Additional list of members to have project creator role accross the organization. Prefix of group: user: or serviceAccount: is required."
34+
description = "Additional list of members to have project creator role across the organization. Prefix of group: user: or serviceAccount: is required."
3535
type = list(string)
3636
default = []
3737
}

0 commit comments

Comments
 (0)