Skip to content

Commit 86c2547

Browse files
fix: Update bootstrap README.md steps & terraform.example.tfvars (#470)
* Update README.md re: terraform.example.tfvars Update README.md to match Jenkins. Change from copy `terraform.example.tfvars` to rename to avoid creating multiple input variable definition files. * 0-bootstrap Update README.md sequence Change sequence to run `terraform init` immediately after `cp backend.tf.example backend.tf`. Current sequence has `terraform output terraform_service_account` immediately after `cp backend.tf.example backend.tf` which generates `Backend reinitialization required. Please run "terraform init".` * 0-bootstrap - Update README.md Change 'from previous step' to 'from Terraform's state' to make wording less dependent on precise order of steps * Add mv command for copy/paste Add mv terraform.example.tfvars terraform.tfvars for easy copy/paste * Update README.md formatting error Correct spacing formatting error in my last commit
1 parent 18949ae commit 86c2547

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

0-bootstrap/README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,24 @@ your current Jenkins manager (master) environment.
108108
## Deploying with Cloud Build
109109

110110
1. Go to the `0-bootstrap` folder.
111-
1. Copy the `tfvars` file:
112-
```
113-
cp terraform.example.tfvars terraform.tfvars
114-
```
115-
1. Update the `terraform.tfvars` file with values from your environment.
111+
1. Rename `terraform.example.tfvars` to `terraform.tfvars` and update the file with values from your environment:
112+
```
113+
mv terraform.example.tfvars terraform.tfvars
114+
```
116115
1. Run `terraform init`.
117116
1. Run `terraform plan` and review the output.
118117
1. To run terraform-validator steps please follow the [instructions](https://github.com/forseti-security/policy-library/blob/master/docs/user_guide.md#install-terraform-validator) in the **Install Terraform Validator** section and install version `2021-03-22`. You will also need to rename the binary from `terraform-validator-<your-platform>` to `terraform-validator`.
119118
1. Run `terraform plan -input=false -out bootstrap.tfplan`
120119
1. Run `terraform show -json bootstrap.tfplan > bootstrap.json`
121120
1. Run `terraform-validator validate bootstrap.json --policy-path="../policy-library" --project <A-VALID-PROJECT-ID>` and check for violations (`<A-VALID-PROJECT-ID>` must be an existing project you have access to, this is necessary because Terraform-validator needs to link resources to a valid Google Cloud Platform project).
122121
1. Run `terraform apply`.
123-
1. Run `terraform output gcs_bucket_tfstate` to get your Google Cloud bucket
124-
from the previous step.
122+
1. Run `terraform output terraform_service_account` to get the email address of the admin. You need this address in a later procedure.
123+
1. Run `terraform output gcs_bucket_tfstate` to get your Google Cloud bucket name from Terraform's state.
125124
1. Copy the backend:
126125
```
127126
cp backend.tf.example backend.tf
128127
```
129128
1. Update `backend.tf` with the name of your Cloud Storage bucket.
130-
1. Run `terraform output terraform_service_account` to get the email address of the
131-
admin. You need this address in a later procedure.
132129
1. Re-run `terraform init`. When you're prompted, agree to copy state to
133130
Cloud Storage.
134131
1. (Optional) Run `terraform apply` to verify that state is configured

0 commit comments

Comments
 (0)