Skip to content

Commit 44cddbd

Browse files
committed
Use OpenTofu 1.9.0
1 parent 976a289 commit 44cddbd

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

.github/workflows/ci-iac.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
node_version: "22.x"
13-
tf_version: "1.9.8" # must match value in terraform-iac/*/app/main.tf
13+
tf_version: "1.9.0" # must match value in terraform-iac/*/app/main.tf
1414

1515
jobs:
1616
env:
@@ -69,20 +69,20 @@ jobs:
6969
matrix: ${{ env.matrix }}
7070

7171
format:
72-
name: Terraform Format
72+
name: Tofu Format
7373
timeout-minutes: 3
7474
runs-on: ubuntu-latest
7575
steps:
7676
- uses: actions/checkout@v4
7777

7878
- name: Terraform Setup
79-
uses: hashicorp/setup-terraform@v3
79+
uses: opentofu/setup-opentofu@v1
8080
with:
81-
terraform_version: ${{ env.tf_version }}
81+
tofu_version: ${{ env.tf_version }}
8282

8383
- name: Terraform Format
8484
working-directory: terraform-iac
85-
run: terraform fmt -check -recursive
85+
run: tofu fmt -check -recursive
8686

8787
plan:
8888
name: Terraform Plan / ${{ matrix.env.environment_name }}
@@ -121,17 +121,17 @@ jobs:
121121
zip -r lambda.zip *
122122
123123
- name: Terraform Setup
124-
uses: hashicorp/setup-terraform@v3
124+
uses: opentofu/setup-opentofu@v1
125125
with:
126-
terraform_version: ${{ env.tf_version }}
126+
tofu_version: ${{ env.tf_version }}
127127

128128
- name: Terraform Init
129129
working-directory: ${{ matrix.env.tf_working_dir }}
130-
run: terraform init
130+
run: tofu init
131131

132132
- name: Terraform Plan
133133
working-directory: ${{ matrix.env.tf_working_dir }}
134-
run: terraform plan -input=false -out plan -lock=false
134+
run: tofu plan -input=false -out plan -lock=false
135135

136136
- name: Comment Terraform Plan
137137
uses: byu-oit/github-action-tf-plan-comment@v1

.github/workflows/deploy.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- '.gitignore'
1111
env:
1212
node_version: "22.x"
13-
tf_version: "1.9.8" # must match value in terraform-iac/*/app/main.tf
13+
tf_version: "1.9.0" # must match value in terraform-iac/*/app/main.tf
1414
FORCE_COLOR: 3
1515
concurrency: ${{ github.ref }}
1616
jobs:
@@ -151,22 +151,22 @@ jobs:
151151
aws-region: us-west-2
152152

153153
- name: Terraform Setup
154-
uses: hashicorp/setup-terraform@v3
154+
uses: opentofu/setup-opentofu@v1
155155
with:
156-
terraform_version: ${{ env.tf_version }}
157-
terraform_wrapper: false
156+
tofu_version: ${{ env.tf_version }}
157+
tofu_wrapper: false
158158

159159
- name: Terraform Init
160160
working-directory: ${{ matrix.env.tf_working_dir }}
161-
run: terraform init
161+
run: tofu init
162162

163163
- name: Terraform Format
164164
working-directory: "./"
165-
run: terraform fmt -check -recursive
165+
run: tofu fmt -check -recursive
166166

167167
- name: Terraform Plan
168168
working-directory: ${{ matrix.env.tf_working_dir }}
169-
run: terraform plan -input=false -out=plan
169+
run: tofu plan -input=false -out=plan
170170

171171
- name: Analyze Terraform Plan
172172
uses: byu-oit/github-action-tf-plan-analyzer@v2
@@ -188,16 +188,16 @@ jobs:
188188

189189
- name: Terraform Apply
190190
working-directory: ${{ matrix.env.tf_working_dir }}
191-
run: terraform apply plan
191+
run: tofu apply plan
192192

193193
- name: Get Terraform Outputs
194194
id: terraform-outputs
195195
working-directory: ${{ matrix.env.tf_working_dir }}
196196
run: |
197-
echo "codedeploy_app_name=$(terraform output -raw codedeploy_app_name)" >> $GITHUB_OUTPUT
198-
echo "codedeploy_deployment_group_name=$(terraform output -raw codedeploy_deployment_group_name)" >> $GITHUB_OUTPUT
199-
echo "codedeploy_appspec_json_file=$(terraform output -raw codedeploy_appspec_json_file)" >> $GITHUB_OUTPUT
200-
echo "url=$(terraform output -raw url)" >> $GITHUB_OUTPUT
197+
echo "codedeploy_app_name=$(tofu output -raw codedeploy_app_name)" >> $GITHUB_OUTPUT
198+
echo "codedeploy_deployment_group_name=$(tofu output -raw codedeploy_deployment_group_name)" >> $GITHUB_OUTPUT
199+
echo "codedeploy_appspec_json_file=$(tofu output -raw codedeploy_appspec_json_file)" >> $GITHUB_OUTPUT
200+
echo "url=$(tofu output -raw url)" >> $GITHUB_OUTPUT
201201
202202
- name: CodeDeploy
203203
id: deploy

terraform-iac/cpy/app/cpy-app.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-539738229445"
55
dynamodb_table = "terraform-state-lock-539738229445"

terraform-iac/cpy/setup/cpy-setup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-539738229445"
55
dynamodb_table = "terraform-state-lock-539738229445"

terraform-iac/dev/app/dev-app.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-977306314792"
55
dynamodb_table = "terraform-state-lock-977306314792"

terraform-iac/dev/setup/dev-setup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-977306314792"
55
dynamodb_table = "terraform-state-lock-977306314792"

terraform-iac/prd/app/prd-app.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-539738229445"
55
dynamodb_table = "terraform-state-lock-539738229445"

terraform-iac/prd/setup/prd-setup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-539738229445"
55
dynamodb_table = "terraform-state-lock-539738229445"

terraform-iac/stg/app/stg-app.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-977306314792"
55
dynamodb_table = "terraform-state-lock-977306314792"

terraform-iac/stg/setup/stg-setup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.8" # must match value in .github/workflows/*.yml
2+
required_version = "1.9.0" # must match value in .github/workflows/*.yml
33
backend "s3" {
44
bucket = "terraform-state-storage-977306314792"
55
dynamodb_table = "terraform-state-lock-977306314792"

0 commit comments

Comments
 (0)