fix tofu s3 backend
All checks were successful
OpenTofu Automation / deploy (push) Successful in 14s
All checks were successful
OpenTofu Automation / deploy (push) Successful in 14s
This commit is contained in:
parent
b95716d38b
commit
96d6c8bf38
2 changed files with 9 additions and 7 deletions
|
@ -76,6 +76,9 @@ jobs:
|
||||||
|
|
||||||
- name: Run OpenTofu Init
|
- name: Run OpenTofu Init
|
||||||
working-directory: ./terraform
|
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: |
|
run: |
|
||||||
tofu init -var-file=terraform.tfvars
|
tofu init -var-file=terraform.tfvars
|
||||||
|
|
||||||
|
@ -83,14 +86,15 @@ jobs:
|
||||||
- name: Run OpenTofu Plan
|
- name: Run OpenTofu Plan
|
||||||
id: plan
|
id: plan
|
||||||
working-directory: ./terraform
|
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
|
run: tofu plan -no-color
|
||||||
|
|
||||||
- name: Display Plan Output
|
|
||||||
run: |
|
|
||||||
echo "Plan output:"
|
|
||||||
echo "${{ steps.plan.outputs.stdout }}"
|
|
||||||
|
|
||||||
- name: Apply the Plan
|
- name: Apply the Plan
|
||||||
if: success()
|
if: success()
|
||||||
working-directory: ./terraform
|
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
|
run: tofu apply -auto-approve
|
||||||
|
|
|
@ -15,8 +15,6 @@ backend "s3" {
|
||||||
endpoints = {
|
endpoints = {
|
||||||
s3 = var.s3_endpoint
|
s3 = var.s3_endpoint
|
||||||
}
|
}
|
||||||
access_key = var.aws_access_key_id
|
|
||||||
secret_key = var.aws_secret_access_key
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue