Manual Terraform Apply #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manual Terraform Apply | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Environment to apply changes to (e.g., dev, shared).' | |
| required: true | |
| default: dev | |
| env: | |
| TF_VAR_aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
| TF_VAR_aws_region: ${{ secrets.AWS_REGION }} | |
| TF_VAR_github_actions_role_arn: ${{ secrets.GH_ACTIONS_ROLE_ARN }} | |
| TF_VAR_service_url_registration_api_solana: ${{ secrets.SERVICE_URL_REGISTRATION_API_SOLANA }} | |
| TF_VAR_service_api_key_registration_api_solana: ${{ secrets.SERVICE_API_KEY_REGISTRATION_API_SOLANA }} | |
| TF_VAR_tech_floripa_certificate_validate_url: ${{ secrets.TECH_FLORIPA_CERTIFICATE_VALIDATE_URL }} | |
| TF_VAR_api_key_value: ${{ secrets.API_KEY_VALUE }} | |
| TFPLAN_S3_BUCKET: tech-floripa-plan-artifacts | |
| GH_TOKEN: ${{ github.token }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| apply: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hashicorp/setup-terraform@v3 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ env.TF_VAR_github_actions_role_arn }} | |
| aws-region: ${{ env.TF_VAR_aws_region }} | |
| role-session-name: TerraformApplySession | |
| - name: Apply Shared Infrastructure | |
| if: inputs.environment == 'shared' | |
| uses: ./.github/actions/tf_apply | |
| with: | |
| working-directory: "terraform" | |
| env: shared | |
| - name: Apply Dev Environment | |
| if: inputs.environment == 'dev' | |
| uses: ./.github/actions/tf_apply | |
| with: | |
| working-directory: "terraform/env/dev" | |
| env: dev | |