Skip to content

Commit 77827b2

Browse files
authored
fix: bump terraform version from 1.3.10 to 1.5.7 (#1268)
1 parent ebc275e commit 77827b2

File tree

17 files changed

+215
-37
lines changed

17 files changed

+215
-37
lines changed

0-bootstrap/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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=1.3.10
18+
ARG TERRAFORM_VERSION=1.5.7
1919

2020
ENV ENV_TERRAFORM_VERSION=$TERRAFORM_VERSION
2121

0-bootstrap/README-GitHub.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,43 @@ To run the instructions described in this document, install the following:
1515
- [Google Cloud SDK](https://cloud.google.com/sdk/install) version 393.0.0 or later
1616
- [terraform-tools](https://cloud.google.com/docs/terraform/policy-validation/validate-policies#install) component
1717
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version 2.28.0 or later
18-
- [Terraform](https://www.terraform.io/downloads.html) version 1.3.10 or later
18+
- [Terraform](https://www.terraform.io/downloads.html) version 1.5.7 or later
19+
20+
For the manual steps described in this document, you need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
21+
Otherwise, you might experience Terraform state snapshot lock errors.
22+
23+
Version 1.5.7 is the last version before the license model change. To use a later version of Terraform, ensure that the Terraform version used in the Operational System to manually execute part of the steps in `3-networks` and `4-projects` is the same version configured in the following code
24+
25+
- 0-bootstrap/modules/jenkins-agent/variables.tf
26+
```
27+
default = "1.5.7"
28+
```
29+
30+
- 0-bootstrap/cb.tf
31+
```
32+
terraform_version = "1.5.7"
33+
```
34+
35+
- scripts/validate-requirements.sh
36+
```
37+
TF_VERSION="1.5.7"
38+
```
39+
40+
- build/github-tf-apply.yaml
41+
```
42+
terraform_version: '1.5.7'
43+
```
44+
45+
- github-tf-pull-request.yaml
46+
47+
```
48+
terraform_version: "1.5.7"
49+
```
50+
51+
- 0-bootstrap/Dockerfile
52+
```
53+
ARG TERRAFORM_VERSION=1.5.7
54+
```
1955

2056
Also make sure that you have the following:
2157

0-bootstrap/README-GitLab.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,45 @@ To run the instructions described in this document, install the following:
1313
- [Google Cloud SDK](https://cloud.google.com/sdk/install) version 393.0.0 or later
1414
- [terraform-tools](https://cloud.google.com/docs/terraform/policy-validation/validate-policies#install) component
1515
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version 2.28.0 or later
16-
- [Terraform](https://www.terraform.io/downloads.html) version 1.3.10 or later
16+
- [Terraform](https://www.terraform.io/downloads.html) version 1.5.7 or later
1717
- [jq](https://jqlang.github.io/jq/) version 1.6 or later.
1818

19+
For the manual steps described in this document, you need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
20+
Otherwise, you might experience Terraform state snapshot lock errors.
21+
22+
Version 1.5.7 is the last version before the license model change. To use a later version of Terraform, ensure that the Terraform version used in the Operational System to manually execute part of the steps in `3-networks` and `4-projects` is the same version configured in the following code
23+
24+
- 0-bootstrap/modules/jenkins-agent/variables.tf
25+
```
26+
default = "1.5.7"
27+
```
28+
29+
- 0-bootstrap/cb.tf
30+
```
31+
terraform_version = "1.5.7"
32+
```
33+
34+
- scripts/validate-requirements.sh
35+
```
36+
TF_VERSION="1.5.7"
37+
```
38+
39+
- build/github-tf-apply.yaml
40+
```
41+
terraform_version: '1.5.7'
42+
```
43+
44+
- github-tf-pull-request.yaml
45+
46+
```
47+
terraform_version: "1.5.7"
48+
```
49+
50+
- 0-bootstrap/Dockerfile
51+
```
52+
ARG TERRAFORM_VERSION=1.5.7
53+
```
54+
1955
Also make sure that you have the following:
2056

2157
- A [GitLab](https://docs.gitlab.com/ee/user/profile/account/create_accounts.html) account for your User or Group.

0-bootstrap/README-Jenkins.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,46 @@ You arrived to these instructions because you are using the `jenkins_bootstrap`
196196
### II. Create the SEED and CI/CD projects using Terraform
197197

198198
- Required information:
199-
- Terraform version 1.3.10 - See [Requirements](#requirements) section for more details.
199+
- Terraform version 1.5.7 - See [Requirements](#requirements) section for more details.
200200
- The `terraform.tfvars` file with all the necessary values.
201201

202+
For the manual steps described in this document, you need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
203+
Otherwise, you might experience Terraform state snapshot lock errors.
204+
205+
Version 1.5.7 is the last version before the license model change. To use a later version of Terraform, ensure that the Terraform version used in the Operational System to manually execute part of the steps in `3-networks` and `4-projects` is the same version configured in the following code
206+
207+
- 0-bootstrap/modules/jenkins-agent/variables.tf
208+
```
209+
default = "1.5.7"
210+
```
211+
212+
- 0-bootstrap/cb.tf
213+
```
214+
terraform_version = "1.5.7"
215+
```
216+
217+
- scripts/validate-requirements.sh
218+
```
219+
TF_VERSION="1.5.7"
220+
```
221+
222+
- build/github-tf-apply.yaml
223+
```
224+
terraform_version: '1.5.7'
225+
```
226+
227+
- github-tf-pull-request.yaml
228+
229+
```
230+
terraform_version: "1.5.7"
231+
```
232+
233+
- 0-bootstrap/Dockerfile
234+
```
235+
ARG TERRAFORM_VERSION=1.5.7
236+
```
237+
238+
202239
1. Get the appropriate credentials: run the following command with an account that has the [necessary permissions](./modules/jenkins-agent/README.md#permissions).
203240

204241
```bash
@@ -209,7 +246,7 @@ You arrived to these instructions because you are using the `jenkins_bootstrap`
209246

210247
1. Run terraform commands.
211248
- 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)
212-
- **Use Terraform 1.3.10** to run the terraform script with the commands below
249+
- **Use Terraform 1.5.7** to run the terraform script with the commands below
213250

214251
```bash
215252
terraform init

0-bootstrap/README-Terraform-Cloud.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ To run the instructions described in this document, install the following:
1717
- [Google Cloud SDK](https://cloud.google.com/sdk/install) version 393.0.0 or later
1818
- [terraform-tools](https://cloud.google.com/docs/terraform/policy-validation/validate-policies#install) component
1919
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version 2.28.0 or later
20-
- [Terraform](https://www.terraform.io/downloads.html) version 1.3.10 or later
20+
- [Terraform](https://www.terraform.io/downloads.html) version 1.5.7 or later
2121
- [jq](https://jqlang.github.io/jq/download/) version 1.6.0 or later
2222

23+
For the manual steps described in this document, you need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
24+
Otherwise, you might experience Terraform state snapshot lock errors.
25+
2326
Also make sure that you have the following:
2427

2528
- A [Terraform Cloud account](https://developer.hashicorp.com/terraform/tutorials/cloud-get-started/cloud-sign-up#create-an-account) for your User or [Organization](https://developer.hashicorp.com/terraform/tutorials/cloud-get-started/cloud-sign-up#create-an-organization).

0-bootstrap/README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,43 @@ To run the commands described in this document, install the following:
6464

6565
- [Google Cloud SDK](https://cloud.google.com/sdk/install) version 393.0.0 or later
6666
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version 2.28.0 or later
67-
- [Terraform](https://www.terraform.io/downloads.html) version 1.3.10
67+
- [Terraform](https://www.terraform.io/downloads.html) version 1.5.7
6868
- [jq](https://jqlang.github.io/jq/download/) version 1.6.0 or later
6969

70-
**Note:** Make sure that you use version 1.3.10 of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
70+
**Note:** Make sure that you use the same version of [Terraform](https://www.terraform.io/downloads.html) throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
71+
72+
Version 1.5.7 is the last version before the license model change. To use a later version of Terraform, ensure that the Terraform version used in the Operational System to manually execute part of the steps in `3-networks` and `4-projects` is the same version configured in the following code
73+
74+
- 0-bootstrap/modules/jenkins-agent/variables.tf
75+
```
76+
default = "1.5.7"
77+
```
78+
79+
- 0-bootstrap/cb.tf
80+
```
81+
terraform_version = "1.5.7"
82+
```
83+
84+
- scripts/validate-requirements.sh
85+
```
86+
TF_VERSION="1.5.7"
87+
```
88+
89+
- build/github-tf-apply.yaml
90+
```
91+
terraform_version: '1.5.7'
92+
```
93+
94+
- github-tf-pull-request.yaml
95+
96+
```
97+
terraform_version: "1.5.7"
98+
```
99+
100+
- 0-bootstrap/Dockerfile
101+
```
102+
ARG TERRAFORM_VERSION=1.5.7
103+
```
71104

72105
Also make sure that you've done the following:
73106

0-bootstrap/cb.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
locals {
1818
// terraform version image configuration
19-
terraform_version = "1.3.10"
19+
terraform_version = "1.5.7"
2020
// The version of the terraform docker image to be used in the workspace builds
2121
docker_tag_version_terraform = "v1"
2222

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module "jenkins_bootstrap" {
7777
| storage\_bucket\_prefix | Name prefix to use for storage buckets. | `string` | `"bkt"` | no |
7878
| terraform\_sa\_names | Fully-qualified name of the Terraform Service Accounts. It must be supplied by the Seed Project | `map(string)` | n/a | yes |
7979
| terraform\_state\_bucket | Default state bucket, used in Cloud Build substitutions. It must be supplied by the Seed Project | `string` | n/a | yes |
80-
| terraform\_version | Default terraform version. | `string` | `"1.3.10"` | no |
80+
| terraform\_version | Default terraform version. | `string` | `"1.5.7"` | no |
8181
| terraform\_version\_sha256sum | sha256sum for default terraform version. | `string` | `"380ca822883176af928c80e5771d1c0ac9d69b13c6d746e6202482aedde7d457"` | no |
8282
| tunnel0\_bgp\_peer\_address | BGP peer address for tunnel 0 | `string` | n/a | yes |
8383
| tunnel0\_bgp\_session\_range | BGP session range for tunnel 0 | `string` | n/a | yes |
@@ -103,8 +103,8 @@ module "jenkins_bootstrap" {
103103
### Software
104104

105105
- [gcloud sdk](https://cloud.google.com/sdk/install) >= 393.0.0
106-
- [Terraform](https://www.terraform.io/downloads.html) = 1.3.10
107-
- The scripts in this codebase use Terraform v1.3.10. 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.
106+
- [Terraform](https://www.terraform.io/downloads.html) = 1.5.7
107+
- The scripts in this codebase use Terraform v1.5.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.
108108

109109
### Infrastructure
110110

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ variable "folder_id" {
215215
variable "terraform_version" {
216216
description = "Default terraform version."
217217
type = string
218-
default = "1.3.10"
218+
default = "1.5.7"
219219
}
220220

221221
variable "terraform_version_sha256sum" {

3-networks-dual-svpc/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ The purpose of this step is to:
7373
echo "access_context_manager_policy_id = ${ACCESS_CONTEXT_MANAGER_ID}"
7474
```
7575

76-
1. For the manual step described in this document, you need [Terraform](https://www.terraform.io/downloads.html) version 1.3.10 or later to be installed.
77-
78-
**Note:** Make sure that you use version 1.3.10 or later of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
76+
1. For the manual step described in this document, you need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
77+
Otherwise, you might experience Terraform state snapshot lock errors.
7978

8079
### Troubleshooting
8180

0 commit comments

Comments
 (0)