Skip to content

Commit 4d4f3f7

Browse files
authored
Migrate to OpenTofu (#4302)
1 parent 3afec50 commit 4d4f3f7

File tree

6 files changed

+47
-95
lines changed

6 files changed

+47
-95
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,20 @@ jobs:
144144
with:
145145
ref: ${{ github.ref }}
146146
fetch-depth: 0
147-
- uses: hashicorp/setup-terraform@v3
147+
- uses: opentofu/setup-opentofu@v1
148148
with:
149-
terraform_version: 1.2.4
150-
- name: Terraform Init
151-
run: terraform init
149+
tofu_version: 1.9.0
150+
- name: OpenTofu Init
151+
run: tofu init
152152
env:
153153
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154154
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
155155
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
156-
- name: Terraform Validate
156+
- name: OpenTofu Validate
157157
id: validate
158-
run: terraform validate -no-color
159-
- name: Terraform apply
160-
run: terraform apply -target module.pretix -target module.pycon_backend -target module.clamav -target module.database -target module.emails -target module.cluster -target module.vpc -no-color -auto-approve &> /dev/null
158+
run: tofu validate -no-color
159+
- name: OpenTofu apply
160+
run: tofu apply -exclude module.pycon_frontend -no-color -auto-approve &> /dev/null
161161
env:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163163
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -205,20 +205,20 @@ jobs:
205205
with:
206206
ref: ${{ github.ref }}
207207
fetch-depth: 0
208-
- uses: hashicorp/setup-terraform@v3
208+
- uses: opentofu/setup-opentofu@v1
209209
with:
210-
terraform_version: 1.2.4
211-
- name: Terraform Init
212-
run: terraform init
210+
tofu_version: 1.9.0
211+
- name: OpenTofu Init
212+
run: tofu init
213213
env:
214214
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215215
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
216216
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
217-
- name: Terraform Validate
217+
- name: OpenTofu Validate
218218
id: validate
219-
run: terraform validate -no-color
220-
- name: Terraform apply
221-
run: terraform apply -no-color -auto-approve &> /dev/null
219+
run: tofu validate -no-color
220+
- name: OpenTofu apply
221+
run: tofu apply -no-color -auto-approve &> /dev/null
222222
env:
223223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
224224
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
- "infrastructure/applications/**/*"
55
- "infrastructure/applications/*"
66

7-
name: Terraform Lint
7+
name: OpenTofu Lint
88

99
env:
1010
TF_WORKSPACE: "production"
@@ -31,11 +31,11 @@ jobs:
3131

3232
steps:
3333
- uses: actions/checkout@v4
34-
- uses: hashicorp/setup-terraform@v3
34+
- uses: opentofu/setup-opentofu@v1
3535
with:
36-
terraform_version: 1.2.4
37-
- name: Terraform Format
36+
tofu_version: 1.9.0
37+
- name: OpenTofu Format
3838
id: fmt
39-
run: terraform fmt -check
39+
run: tofu fmt -check
4040
env:
4141
TF_IN_AUTOMATION: 1

.github/workflows/terminate-staging-env.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ terraform 1.3.4
33
python 3.11.2
44
rust 1.61.0
55
pnpm 9
6-
opentofu 1.8.8
6+
opentofu 1.9.0

infrastructure/applications/.terraform.lock.hcl

Lines changed: 25 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/applications/.tool-versions

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)