chore: updates enable PR comments for terraform plan (#5073)

This commit is contained in:
Piyush Jain
2025-03-27 07:10:24 +05:30
committed by GitHub
parent 709917eb8f
commit cd1739c901
2 changed files with 23 additions and 15 deletions

View File

@@ -3,16 +3,17 @@ name: 'Terraform'
on:
workflow_dispatch:
# TODO: enable it back when migration is completed.
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
push:
branches:
- main
pull_request:
branches:
- main
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
terraform:
@@ -58,18 +59,17 @@ jobs:
run: terraform plan -out .planfile
working-directory: infra/terraform
# - name: Post PR comment
# uses: borchero/terraform-plan-comment@3399d8dbae8b05185e815e02361ede2949cd99c4 # v2.4.0
# if: always() && github.ref != 'refs/heads/main' && (steps.validate.outcome == 'success' || steps.validate.outcome == 'failure')
# with:
# token: ${{ github.token }}
# planfile: .planfile
# working-directory: "infra/terraform"
# skip-comment: true
- name: Post PR comment
uses: borchero/terraform-plan-comment@3399d8dbae8b05185e815e02361ede2949cd99c4 # v2.4.0
if: always() && github.ref != 'refs/heads/main' && (steps.plan.outcome == 'success' || steps.plan.outcome == 'failure')
with:
token: ${{ github.token }}
planfile: .planfile
working-directory: "infra/terraform"
- name: Terraform Apply
id: apply
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: terraform apply .planfile
working-directory: "infra/terraform"

View File

@@ -469,6 +469,14 @@ module "formbricks_s3_bucket" {
enabled = true
}
policy = data.aws_iam_policy_document.replication_bucket_policy.json
cors_rule = [
{
allowed_methods = ["POST"]
allowed_origins = ["https://*"]
allowed_headers = ["*"]
expose_headers = []
}
]
}
module "formbricks_app_iam_policy" {