Skip to content

Commit 06a0c25

Browse files
authored
Upgrade terraform in pipeline, allow greater than 0.13.7 for user (#480)
* Upgrade terrafrorm to 1.7 * Loosen requirements on module terraform constraint * Update changelog * Update tf destroy auto-approve
1 parent 0205764 commit 06a0c25

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ docs/dce/
2525
*.tfstate
2626
*.tfstate.*
2727

28+
# lock file
29+
*.lock.hcl
30+
2831
# Crash log files
2932
crash.log
3033

@@ -89,4 +92,4 @@ venv.bak/
8992
# mkdocs documentation
9093
/site
9194

92-
tests/integration/test.cfg
95+
tests/integration/test.cfg

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v0.37.0
2+
3+
- Update pipelines to use latest terraform
4+
- Update terraform required version to be 0.13.7 as minimum viable to run module
5+
16
## v0.36.1
27

38
- Fix: Remove default 25 scan limit when querying for leases

modules/main.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
terraform {
2-
required_version = "~>0.13.7"
2+
# Tested up to 1.7.4
3+
required_version = ">= 0.13.7"
34

45
required_providers {
56
aws = {

pipelines/destroy-pr-env.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ steps:
4444
# Install Terraform
4545
- task: TerraformInstaller@0
4646
inputs:
47-
terraformVersion: "0.13.7"
47+
terraformVersion: "1.7.4"
4848
displayName: "Install Terraform"
4949

5050
# terraform init

pipelines/pipeline.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trigger:
99

1010
variables:
1111
GO_VERSION: 1.21.0
12-
TERRAFORM_VERSION: 0.13.7
12+
TERRAFORM_VERSION: 1.7.4
1313

1414
# Run builds for PRs against `master`
1515
pr:
@@ -216,6 +216,7 @@ stages:
216216
217217
# terraform init
218218
- bash: |
219+
set -ex
219220
cd modules
220221
cat ./backend.tf
221222
terraform init -input=false
@@ -347,13 +348,12 @@ stages:
347348

348349
- bash: |
349350
set -ex
350-
namespace=$(cat ./namespace.txt)
351+
export TF_VAR_namespace=$(cat ./namespace.txt)
352+
export TF_VAR_budget_notification_from_email=$(NOTIFY_EMAIL)
351353
352354
cd modules
353355
terraform init -input=false
354-
terraform destroy -force \
355-
-var="namespace=$(namespace)" \
356-
-var="budget_notification_from_email=$(NOTIFY_EMAIL)"
356+
terraform destroy -auto-approve
357357
displayName: "Terraform destroy"
358358
359359
# End the DCE lease

0 commit comments

Comments
 (0)