Skip to content

"Subindo configuração para executar Kubernetes" #4

"Subindo configuração para executar Kubernetes"

"Subindo configuração para executar Kubernetes" #4

Workflow file for this run

name: Deploy and Post-Deployment Tasks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy_terraform1:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: '1.0.0'
- name: Set up AWS environment variables from secrets
run: |
echo "TF_VAR_aws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "TF_VAR_aws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "TF_VAR_aws_session_token=${{ secrets.AWS_SESSION_TOKEN }}" >> $GITHUB_ENV
echo "TF_VAR_regionDefault=${{ secrets.AWS_REGION }}" >> $GITHUB_ENV
- name: Terraform Init
run: terraform init -input=false
working-directory: .
- name: Terraform Validate
run: terraform validate
working-directory: .
- name: Terraform Plan
run: terraform plan -input=false
working-directory: .
- name: Terraform Apply
run: terraform apply -auto-approve
working-directory: .
id: apply