Files
a13labs.infra/.github/workflows/terraform-aws-iac-apply.yml
T
alexandre.pires e9c492d149 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
2025-04-25 16:37:01 +02:00

36 lines
886 B
YAML

name: Terraform AWS IAC Apply
on:
schedule:
- cron: "0 1 * * 0"
push:
branches:
- main
paths:
- "terraform/aws-iac/**"
jobs:
opentofu-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-env
- name: Setup OpenTofu environment
uses: ./.github/actions/setup-opentofu-env
- 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 tofu init
sectool -f ../../sectool.json exec tofu apply --auto-approve