Run Terraform #4
This file contains 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: Run Terraform | |
on: | |
workflow_dispatch: {} | |
jobs: | |
terraform: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Setup Terraform | |
uses: hashicorp/[email protected] | |
- 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: us-east-1 | |
- name: Navigate to target folder | |
run: | | |
ls -la | |
echo "Navigating to terraform-aws-windows-instance" | |
cd projects/terraform-aws-windows-instance | |
ls -la | |
terraform init | |
terraform plan | |
terraform apply --auto-approve |