Terraform apply pipeline #1
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: Terraform apply pipeline | |
| on: | |
| workflow_dispatch | |
| jobs: | |
| apply_terraform: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: terraform_infra | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ap-south-1 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: 1.15.6 | |
| - name: Initialize Terraform | |
| run: terraform init | |
| - name: Apply Terraform | |
| run: terraform apply --auto-approve |