fix tofu s3 backend
All checks were successful
OpenTofu Automation / deploy (push) Successful in 14s

This commit is contained in:
Matt Reeves 2025-01-09 22:40:00 -05:00
parent b95716d38b
commit 96d6c8bf38
2 changed files with 9 additions and 7 deletions

View file

@ -76,6 +76,9 @@ jobs:
- name: Run OpenTofu Init
working-directory: ./terraform
env:
AWS_ACCESS_KEY_ID: ${{ steps.bitwarden-secrets.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.bitwarden-secrets.outputs.aws_secret_access_key }}
run: |
tofu init -var-file=terraform.tfvars
@ -83,14 +86,15 @@ jobs:
- name: Run OpenTofu Plan
id: plan
working-directory: ./terraform
env:
AWS_ACCESS_KEY_ID: ${{ steps.bitwarden-secrets.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.bitwarden-secrets.outputs.aws_secret_access_key }}
run: tofu plan -no-color
- name: Display Plan Output
run: |
echo "Plan output:"
echo "${{ steps.plan.outputs.stdout }}"
- name: Apply the Plan
if: success()
working-directory: ./terraform
env:
AWS_ACCESS_KEY_ID: ${{ steps.bitwarden-secrets.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.bitwarden-secrets.outputs.aws_secret_access_key }}
run: tofu apply -auto-approve

View file

@ -15,8 +15,6 @@ backend "s3" {
endpoints = {
s3 = var.s3_endpoint
}
access_key = var.aws_access_key_id
secret_key = var.aws_secret_access_key
}
}