Add OpenTofu setup and configuration for AWS infrastructure
- Create action for setting up OpenTofu environment - Update Terraform workflow to use OpenTofu for infrastructure management - Modify backend configuration for S3 with new bucket and region - Add S3 bucket resources with lifecycle configuration - Update local variables and remove deprecated files - Include required Python packages for OpenTofu
This commit is contained in:
@@ -9,7 +9,7 @@ on:
|
||||
paths:
|
||||
- "terraform/aws-iac/**"
|
||||
jobs:
|
||||
terraform-apply:
|
||||
opentofu-apply:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -21,15 +21,15 @@ jobs:
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Terraform environment
|
||||
uses: ./.github/actions/setup-terraform-env
|
||||
- name: Setup OpenTofu environment
|
||||
uses: ./.github/actions/setup-opentofu-env
|
||||
|
||||
- name: Terraform Init and Apply
|
||||
- name: OpenTofu Init and Apply
|
||||
env:
|
||||
BW_PROJECT_ID: ${{ secrets.BW_PROJECT_ID }}
|
||||
BW_ORGANIZATION_ID: ${{ secrets.BW_ORGANIZATION_ID }}
|
||||
BW_ACCESS_TOKEN: ${{ secrets.BW_ACCESS_TOKEN }}
|
||||
run: |
|
||||
cd terraform/aws-iac
|
||||
sectool -f ../../sectool.json exec terraform init
|
||||
sectool -f ../../sectool.json exec terraform apply --auto-approve
|
||||
sectool -f ../../sectool.json exec tofu init
|
||||
sectool -f ../../sectool.json exec tofu apply --auto-approve
|
||||
|
||||
Reference in New Issue
Block a user