124 - terraform docs: ecr, dns-entry #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Terraform plan (OIDC) | |
| on: | |
| pull_request: | |
| branches: | |
| - main # or any other branch you want to trigger the deployment | |
| paths: | |
| - '**/*.tf' | |
| - '**/*.yaml' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| terraform-plan: | |
| name: Terraform Plan | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TF_VAR_pgpassword: ${{ secrets.TF_VAR_PGPASSWORD }} | |
| TF_VAR_pghost: ${{ secrets.TF_VAR_PGHOST }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v4 | |
| - name: configure aws credentials | |
| uses: aws-actions/configure-aws-credentials@v3 | |
| with: | |
| role-to-assume: arn:aws:iam::035866691871:role/gha-incubator | |
| role-session-name: ghaincubatorplan | |
| aws-region: us-west-2 | |
| - name: Terraform Plan | |
| uses: dflook/terraform-plan@v1 | |
| with: | |
| path: terraform | |
| backend_config_file: terraform/prod.backend.tfvars | |
| terraform-docs: | |
| name: Generate Terraform Docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Render terraform docs inside the README.md and push changes back to PR branch | |
| uses: terraform-docs/gh-actions@v1.4.1 | |
| with: | |
| find-dir: "terraform" | |
| output-file: README.md | |
| output-method: inject | |
| git-push: "true" | |
| git-commit-message: "terraform-docs: automated updates to Terraform modules README.md" |