diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 23f0055a9..ee680890d 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -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: diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 748b537ef..97c49fef0 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -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 @@ -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: diff --git a/tofu/modules/services/frontend-infra/output.tf b/tofu/modules/services/frontend-infra/output.tf index 8c99a85ae..cc455bb84 100644 --- a/tofu/modules/services/frontend-infra/output.tf +++ b/tofu/modules/services/frontend-infra/output.tf @@ -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 }