mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #878 from Hestia-Homes/deploy-fastapi-with-terraform
Deploy fastapi with terraform: dont try to use shared/.tfvars when deploying cloudfront cdn
This commit is contained in:
commit
c8d641fe05
1 changed files with 8 additions and 3 deletions
11
.github/workflows/deploy_terraform.yml
vendored
11
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -374,13 +374,18 @@ jobs:
|
||||||
|
|
||||||
- name: Terraform Workspace
|
- name: Terraform Workspace
|
||||||
working-directory: infrastructure/terraform/cdn
|
working-directory: infrastructure/terraform/cdn
|
||||||
run: terraform workspace select ${STAGE} || terraform workspace new ${STAGE}
|
run: |
|
||||||
|
terraform workspace select $STAGE \
|
||||||
|
|| terraform workspace new $STAGE
|
||||||
|
|
||||||
- name: Terraform Plan
|
- name: Terraform Plan
|
||||||
working-directory: infrastructure/terraform/cdn
|
working-directory: infrastructure/terraform/cdn
|
||||||
run: terraform plan -var-file=${STAGE}.tfvars -out=tfplan
|
run: |
|
||||||
|
terraform plan \
|
||||||
|
-var="stage=${STAGE}" \
|
||||||
|
-out=tfplan
|
||||||
|
|
||||||
- name: Terraform Apply
|
- name: Terraform Apply
|
||||||
if: env.TERRAFORM_APPLY == 'true'
|
if: env.TERRAFORM_APPLY == 'true'
|
||||||
working-directory: infrastructure/terraform/cdn
|
working-directory: infrastructure/terraform/cdn
|
||||||
run: terraform apply -auto-approve tfplan
|
run: terraform apply -auto-approve tfplan
|
||||||
Loading…
Add table
Reference in a new issue