Skip to content

Commit

Permalink
dynamic frontend bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbass committed May 13, 2024
1 parent d8e4d7d commit 96093d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
id: output-bucket-name
working-directory: ./tofu/environments/stage/services/frontend-infra
run: |
output=$(terragrunt output bucket | tr -d '"')
output=$(terragrunt output bucket_name | tr -d '"')
echo bucket=$output >> $GITHUB_OUTPUT
deploy-frontend:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ jobs:
with:
filters: |
deploy-iac:
- 'tofu/**'
- '.github/workflows/**'
- 'tofu/modules/**'
- 'tofu/environments/stage/**'
- '.github/workflows/deploy-staging.yml'
deploy-backend:
- 'backend/**'
- 'tofu/modules/services/backend-service/**'
- 'tofu/environments/stage/services/backend-service/**'
deploy-frontend:
- 'frontend/**'
- 'tofu/modules/services/frontend-infra/**'
- 'tofu/environments/stage/services/frontend-infra/**'
deploy-iac:
needs: detect-changes
Expand Down Expand Up @@ -125,7 +128,7 @@ jobs:
id: output-bucket-name
working-directory: ./tofu/environments/stage/services/frontend-infra
run: |
output=$(terragrunt output bucket | tr -d '"')
output=$(terragrunt output bucket_name | tr -d '"')
echo bucket=$output >> $GITHUB_OUTPUT
deploy-frontend:
Expand Down
4 changes: 4 additions & 0 deletions tofu/modules/services/frontend-infra/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ output "bucket" {
value = aws_s3_bucket.frontend.bucket_domain_name
}

output "bucket_name" {
value = aws_s3_bucket.frontend.id
}

output "cloudfront_arn" {
value = aws_cloudfront_distribution.appointment.arn
}

0 comments on commit 96093d6

Please sign in to comment.