Skip to content

Commit

Permalink
Upgrade terraform in pipeline, allow greater than 0.13.7 for user (#480)
Browse files Browse the repository at this point in the history
* Upgrade terrafrorm to 1.7

* Loosen requirements on module terraform constraint

* Update changelog

* Update tf destroy auto-approve
  • Loading branch information
bjfish25 authored Feb 29, 2024
1 parent 0205764 commit 06a0c25
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ docs/dce/
*.tfstate
*.tfstate.*

# lock file
*.lock.hcl

# Crash log files
crash.log

Expand Down Expand Up @@ -89,4 +92,4 @@ venv.bak/
# mkdocs documentation
/site

tests/integration/test.cfg
tests/integration/test.cfg
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.37.0

- Update pipelines to use latest terraform
- Update terraform required version to be 0.13.7 as minimum viable to run module

## v0.36.1

- Fix: Remove default 25 scan limit when querying for leases
Expand Down
3 changes: 2 additions & 1 deletion modules/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
terraform {
required_version = "~>0.13.7"
# Tested up to 1.7.4
required_version = ">= 0.13.7"

required_providers {
aws = {
Expand Down
2 changes: 1 addition & 1 deletion pipelines/destroy-pr-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ steps:
# Install Terraform
- task: TerraformInstaller@0
inputs:
terraformVersion: "0.13.7"
terraformVersion: "1.7.4"
displayName: "Install Terraform"

# terraform init
Expand Down
10 changes: 5 additions & 5 deletions pipelines/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trigger:

variables:
GO_VERSION: 1.21.0
TERRAFORM_VERSION: 0.13.7
TERRAFORM_VERSION: 1.7.4

# Run builds for PRs against `master`
pr:
Expand Down Expand Up @@ -216,6 +216,7 @@ stages:
# terraform init
- bash: |
set -ex
cd modules
cat ./backend.tf
terraform init -input=false
Expand Down Expand Up @@ -347,13 +348,12 @@ stages:

- bash: |
set -ex
namespace=$(cat ./namespace.txt)
export TF_VAR_namespace=$(cat ./namespace.txt)
export TF_VAR_budget_notification_from_email=$(NOTIFY_EMAIL)
cd modules
terraform init -input=false
terraform destroy -force \
-var="namespace=$(namespace)" \
-var="budget_notification_from_email=$(NOTIFY_EMAIL)"
terraform destroy -auto-approve
displayName: "Terraform destroy"
# End the DCE lease
Expand Down

0 comments on commit 06a0c25

Please sign in to comment.