Skip to content

Commit a9150a7

Browse files
authored
fix: upgrade terraform to 0.13.7 (#490)
1 parent ada64bc commit a9150a7

File tree

11 files changed

+26
-26
lines changed

11 files changed

+26
-26
lines changed

0-bootstrap/README-Jenkins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ You arrived to these instructions because you are using the `jenkins_bootstrap`
123123
### II. Create the SEED and CICD projects using Terraform
124124
125125
- Required information:
126-
- Terraform version 0.13.6 - See [Requirements](#requirements) section for more details.
126+
- Terraform version 0.13.7 - See [Requirements](#requirements) section for more details.
127127
- The `terraform.tfvars` file with all the necessary values.
128128
129129
1. Get the appropriate credentials: run the following command with an account that has the [necessary permissions](./modules/jenkins-agent/README.md#Permissions).
@@ -135,7 +135,7 @@ You arrived to these instructions because you are using the `jenkins_bootstrap`
135135
1. Run terraform commands.
136136
- After the credentials are configured, we will create the `prj-b-seed` project (which contains the GCS state bucket and Terraform custom service account) and the `prj-b-cicd` project (which contains the Jenkins Agent, its custom service account and where we will add VPN configuration)
137137
- **WARNING: Make sure you have commented-out the `cloudbuild_bootstrap` module and enabled the `jenkins_bootstrap` module in the `./main.tf` file**
138-
- **Use Terraform 0.13.6** to run the terraform script with the commands below
138+
- **Use Terraform 0.13.7** to run the terraform script with the commands below
139139
```
140140
terraform init
141141
terraform plan

0-bootstrap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ To run the commands described in this document, you need to have the following
6363
installed:
6464

6565
- The [Google Cloud SDK](https://cloud.google.com/sdk/install) version 319.0.0 or later
66-
- [Terraform](https://www.terraform.io/downloads.html) version 0.13.6.
66+
- [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

6969
**Note:** Make sure that you use the same version of Terraform throughout this

0-bootstrap/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ module "cloudbuild_bootstrap" {
118118
project_prefix = var.project_prefix
119119
cloud_source_repos = var.cloud_source_repos
120120
terraform_validator_release = "2021-03-22"
121-
terraform_version = "0.13.6"
122-
terraform_version_sha256sum = "55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9"
121+
terraform_version = "0.13.7"
122+
terraform_version_sha256sum = "4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"
123123

124124
activate_apis = [
125125
"serviceusage.googleapis.com",

0-bootstrap/modules/jenkins-agent/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ module "jenkins_bootstrap" {
7979
| terraform\_sa\_name | Fully-qualified name of the terraform service account. It must be supplied by the seed project | `string` | n/a | yes |
8080
| terraform\_service\_account | Email for terraform service account. It must be supplied by the seed project | `string` | n/a | yes |
8181
| terraform\_state\_bucket | Default state bucket, used in Cloud Build substitutions. It must be supplied by the seed project | `string` | n/a | yes |
82-
| terraform\_version | Default terraform version. | `string` | `"0.13.6"` | no |
83-
| terraform\_version\_sha256sum | sha256sum for default terraform version. | `string` | `"55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9"` | no |
82+
| terraform\_version | Default terraform version. | `string` | `"0.13.7"` | no |
83+
| terraform\_version\_sha256sum | sha256sum for default terraform version. | `string` | `"4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"` | no |
8484
| tunnel0\_bgp\_peer\_address | BGP peer address for tunnel 0 | `string` | n/a | yes |
8585
| tunnel0\_bgp\_session\_range | BGP session range for tunnel 0 | `string` | n/a | yes |
8686
| tunnel1\_bgp\_peer\_address | BGP peer address for tunnel 1 | `string` | n/a | yes |
@@ -105,8 +105,8 @@ module "jenkins_bootstrap" {
105105
### Software
106106

107107
- [gcloud sdk](https://cloud.google.com/sdk/install) >= 206.0.0
108-
- [Terraform](https://www.terraform.io/downloads.html) = 0.13.6
109-
- The scripts in this codebase use Terraform v0.13.6. You should use the same version in the manual steps to avoid [Terraform State Snapshot Lock](https://github.com/hashicorp/terraform/issues/23290) errors caused by differences in terraform versions.
108+
- [Terraform](https://www.terraform.io/downloads.html) = 0.13.7
109+
- The scripts in this codebase use Terraform v0.13.7. You should use the same version in the manual steps to avoid [Terraform State Snapshot Lock](https://github.com/hashicorp/terraform/issues/23290) errors caused by differences in terraform versions.
110110

111111
### Infrastructure
112112

0-bootstrap/modules/jenkins-agent/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ variable "folder_id" {
224224
variable "terraform_version" {
225225
description = "Default terraform version."
226226
type = string
227-
default = "0.13.6"
227+
default = "0.13.7"
228228
}
229229

230230
variable "terraform_version_sha256sum" {
231231
description = "sha256sum for default terraform version."
232232
type = string
233-
default = "55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9"
233+
default = "4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"
234234
}

4-projects/modules/infra_pipelines/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
| project\_prefix | Name prefix to use for projects created. | `string` | `"prj"` | no |
1717
| terraform\_apply\_branches | List of git branches configured to run terraform apply Cloud Build trigger. All other branches will run plan by default. | `list(string)` | <pre>[<br> "development",<br> "non-production",<br> "production"<br>]</pre> | no |
1818
| terraform\_validator\_release | Default terraform-validator release. | `string` | `"2021-03-22"` | no |
19-
| terraform\_version | Default terraform version. | `string` | `"0.13.6"` | no |
20-
| terraform\_version\_sha256sum | sha256sum for default terraform version. | `string` | `"55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9"` | no |
19+
| terraform\_version | Default terraform version. | `string` | `"0.13.7"` | no |
20+
| terraform\_version\_sha256sum | sha256sum for default terraform version. | `string` | `"4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"` | no |
2121

2222
## Outputs
2323

4-projects/modules/infra_pipelines/cloudbuild_builder/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
FROM gcr.io/cloud-builders/gcloud-slim
1616

1717
# Use ARG so that values can be overriden by user/cloudbuild
18-
ARG TERRAFORM_VERSION=0.13.6
19-
ARG TERRAFORM_VERSION_SHA256SUM=55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9
18+
ARG TERRAFORM_VERSION=0.13.7
19+
ARG TERRAFORM_VERSION_SHA256SUM=4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957
2020
ARG TERRAFORM_VALIDATOR_RELEASE=2021-03-22
2121

2222
ENV ENV_TERRAFORM_VERSION=$TERRAFORM_VERSION

4-projects/modules/infra_pipelines/cloudbuild_builder/cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727
- name: '${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/terraform'
2828
args: ['version']
2929
substitutions:
30-
_TERRAFORM_VERSION: '0.13.6' # default value
31-
_TERRAFORM_VERSION_SHA256SUM: '55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9' # default value
30+
_TERRAFORM_VERSION: '0.13.7' # default value
31+
_TERRAFORM_VERSION_SHA256SUM: '4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957' # default value
3232
_TERRAFORM_VALIDATOR_RELEASE: '2021-03-22'
3333
images: ['${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/terraform']

4-projects/modules/infra_pipelines/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ variable "cloudbuild_apply_filename" {
8181
variable "terraform_version" {
8282
description = "Default terraform version."
8383
type = string
84-
default = "0.13.6"
84+
default = "0.13.7"
8585
}
8686

8787
variable "terraform_version_sha256sum" {
8888
description = "sha256sum for default terraform version."
8989
type = string
90-
default = "55f2db00b05675026be9c898bdd3e8230ff0c5c78dd12d743ca38032092abfc9"
90+
default = "4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"
9191
}
9292

9393
variable "terraform_validator_release" {

docs/TROUBLESHOOTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,29 @@ use the email address of `terraform_service_account` that is created by the Terr
5353
When running the build for the branch `production` in step 3-networks in your **Foundation Pipeline** the build fails with:
5454

5555
```
56-
state snapshot was created by Terraform v0.x.x, which is newer than current v0.13.6; upgrade to Terraform v0.x.x or greater to work with this state
56+
state snapshot was created by Terraform v0.x.x, which is newer than current v0.13.7; upgrade to Terraform v0.x.x or greater to work with this state
5757
```
5858

5959
**Cause:**
6060

61-
The manual deploy step for the shared environment in [3-networks](../3-networks#deploying-with-cloud-build) was execute with a Terraform version newer than version v0.13.6 used in the **Foundation Pipeline**.
61+
The manual deploy step for the shared environment in [3-networks](../3-networks#deploying-with-cloud-build) was executed with a Terraform version newer than version v0.13.7 used in the **Foundation Pipeline**.
6262

6363
**Solution:**
6464

6565
You have two options:
6666

6767
#### Downgrade your local Terraform version
6868

69-
You will need to re-run the deploy of the 3-networks shared environment with Terraform v0.13.6.
69+
You will need to re-run the deploy of the 3-networks shared environment with Terraform v0.13.7.
7070

7171
Steps:
7272

7373
- Go to folder `gcp-networks/envs/shared/`.
7474
- Update `backend.tf` with your bucket name from the 0-bootstrap step.
7575
- Run `terraform destroy` in the folder using the Terraform v0.x.x version.
7676
- Delete the Terraform state file in `gs://YOUR-TF-STATE-BUCKET/terraform/networks/envs/shared/default.tfstate`. This bucket is in your **Seed Project**.
77-
- Install Terraform v0.13.6.
78-
- Re-run the manual deploy of 3-networks shared environment using Terraform v0.13.6.
77+
- Install Terraform v0.13.7.
78+
- Re-run the manual deploy of 3-networks shared environment using Terraform v0.13.7.
7979

8080
#### Upgrade your 0-bootstrap runner image Terraform version
8181

@@ -89,7 +89,7 @@ Replace `0.x.x` with the actual version of your local Terraform version in the f
8989
- Get the value of the SHA 256 SUM for the amd64 linux version of the release 0.x.x (`terraform_0.x.x_linux_amd64.zip`)
9090
- Go to folder `0-bootstrap`.
9191
- Edit the module `cloudbuild_bootstrap` in the Terraform [main.tf](../0-bootstrap/main.tf) file:
92-
- Upgrade `terraform_version` from `"0.13.6"` to `"0.x.x"`
92+
- Upgrade `terraform_version` from `"0.13.7"` to `"0.x.x"`
9393
- Update `terraform_version_sha256sum` with the value you got from the file `terraform_0.x.x_SHA256SUMS`
9494
- Run `terraform init`.
9595
- Run `terraform plan` and review the output.

0 commit comments

Comments
 (0)