Create rockpal tenant #3
Workflow file for this run
This file contains 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: "Permanent - plan" | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- 'terraform/permanent/**' | |
jobs: | |
plan-terraform-permanent: | |
environment: prod | |
env: | |
ARM_CLIENT_ID: ${{ secrets.TF_VAR_AGENT_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.TF_VAR_AGENT_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.TF_VAR_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.TF_VAR_TENANT_ID }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./terraform" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Terraform Format | |
id: fmt | |
run: terraform -chdir=permanent fmt | |
- name: Terraform Init | |
id: init | |
run: terraform -chdir=permanent init -backend-config="container_name=onlinestoretfstate-permanent" | |
- name: Terraform Validate | |
id: validate | |
run: terraform -chdir=permanent validate -no-color | |
- name: Terraform Plan | |
id: plan | |
run: terraform -chdir=permanent plan -no-color | |
env: | |
TF_VAR_location: "East US" | |
TF_VAR_environment: prod | |
- name: Find Comment | |
uses: peter-evans/find-comment@v1 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: "### Terraform plan for perm" | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
edit-mode: replace | |
body: | | |
### Terraform plan for perm | |
#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\` | |
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\` | |
#### Terraform Validation 🤖${{ steps.validate.outputs.stdout }} | |
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\` | |
<details><summary>Show Plan</summary> | |
\`\`\`${process.env.PLAN}\`\`\` | |
</details> | |
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`* |