Skip to content

Merge pull request #1 from Victor-Borges-Silva/melhoria-tfvars #7

Merge pull request #1 from Victor-Borges-Silva/melhoria-tfvars

Merge pull request #1 from Victor-Borges-Silva/melhoria-tfvars #7

Workflow file for this run

name: Terraform Apply
on:
push:
branches:
- main
jobs:
terraform-apply:
runs-on: ubuntu-latest
environment: prd
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- uses: webfactory/[email protected]
with:
ssh-private-key: "${{ secrets.SSH_PRIVATE_KEY }}"
- name: Terraform Init
run: terraform init
- name: Terraform Plan
id: plan
run: terraform plan -out=plano
- name: Terraform Apply
run: terraform apply -auto-approve plano
- name: Clean up plan file
run: rm -f plano