You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-org/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The purpose of this step is to setup top level shared folders, monitoring & netw
12
12
1. Clone repo `gcloud source repos clone gcp-org --project=YOUR_CLOUD_BUILD_PROJECT_ID (this is from `terraform output` from the previous section, 0-bootstrap)`
13
13
1. Navigate into the repo `cd gcp-org` and change to a non master branch `git checkout -b plan`
14
14
1. Copy contents of foundation to new repo `cp -R ../terraform-example-foundation/1-org/* .` (modify accordingly based on your current directory)
15
+
1. Copy cloud build configuration files for terraform `cp ../terraform-example-foundation/build/cloudbuild-tf-* . ` (modify accordingly based on your current directory)
15
16
1. Rename terraform.example.tfvars to terraform.tfvars and update the file with values from your environment and bootstrap (you can re-run `terraform output` in the 0-bootstrap directory to find these values).
16
17
1. Rename backend.tf.example backend.tf and update with your bucket from bootstrap.
17
18
1. Commit changes with `git add .` and `git commit -m 'Your message'`
1. Change freshly cloned repo and change to non master branch `git checkout -b plan`
15
-
1. Copy contents of foundation to new repo `cp ../terraform-example-foundation/2-networks/* .`
15
+
1. Copy contents of foundation to new repo `cp -R ../terraform-example-foundation/2-networks/* .` (modify accordingly based on your current directory)
16
+
1. Copy cloud build configuration files for terraform `cp ../terraform-example-foundation/build/cloudbuild-tf-* . ` (modify accordingly based on your current directory)
16
17
1. Rename terraform.example.tfvars to terraform.tfvars and update the file with values from your environment and bootstrap.
17
18
1. Rename backend.tf.example backend.tf and update with your bucket from bootstrap.
18
19
1. Commit changes with `git add .` and `git commit -m 'Your message'`
1. Change freshly cloned repo and change to non master branch `git checkout -b plan`
15
+
1. Copy contents of foundation to new repo `cp -R ../terraform-example-foundation/3-projects/* .` (modify accordingly based on your current directory)
16
+
1. Copy cloud build configuration files for terraform `cp ../terraform-example-foundation/build/cloudbuild-tf-* . ` (modify accordingly based on your current directory)
16
17
1. Rename terraform.example.tfvars to terraform.tfvars and update the file with values from your environment and bootstrap.
17
18
1. Rename backend.tf.example backend.tf and update with your bucket from bootstrap.
18
-
1. Commit changes with git add . and git commit -m 'Your message'
19
-
1. Push your non master branch to trigger a plan git push --set-upstream origin plan
19
+
1. Commit changes with `git add .` and `git commit -m 'Your message'`
20
+
1. Push your non master branch to trigger a plan `git push --set-upstream origin plan`
20
21
1. Review the plan output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
21
-
1. Merge changes to master with git checkout -b master and git push origin master
22
-
1.Review the apply output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
22
+
1. Merge changes to master with `git checkout -b master` and `git push origin master`
23
+
1.Review the apply output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
23
24
24
25
25
26
### Run terraform locally
26
27
1. Change into 3-projects folder
27
28
1. Rename terraform.example.tfvars to terraform.tfvars and update the file with values from your environment and bootstrap.
28
29
1. Rename backend.tf.example backend.tf and update with your bucket from bootstrap.
29
-
1. Run terraform init
30
-
1. Run terraform plan and review output
31
-
1. Run terraform apply
30
+
1. Run `terraform init`
31
+
1. Run `terraform plan` and review output
32
+
1. Run `terraform apply`
32
33
33
34
### Subnetting Module (Optional)
34
35
Creates a dedicated subnet per environment, per project and applies org policy to restrict access to only this subnet. Refer to the README [here](./modules/project_subnet/README.md) for details about this module.
0 commit comments