Skip to content

Commit

Permalink
modified: .github/workflows/terraform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
obervinov committed Dec 26, 2023
1 parent f20314e commit 7960a52
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,56 @@ jobs:
terraform-fmt-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Terraform fmt
run: |
cd $TF_WORKSPACE
cd ${{ inputs.TF_WORKSPACE }}
pwd
echo $TF_WORKSPACE
echo ${{ inputs.TF_WORKSPACE }}
env
terraform fmt -recursive -check -diff
terraform-docs-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Terraform docs
run: |
cd $TF_WORKSPACE
cd ${{ inputs.TF_WORKSPACE }}
terraform-docs markdown . > README.md
terraform-plan-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Terraform init
run: |
cd $TF_WORKSPACE
cd ${{ inputs.TF_WORKSPACE }}
terraform init --upgrade
- name: Terraform plan
run: |
cd $TF_WORKSPACE
terraform plan -compact-warnings -detailed-exitcode ${TF_EXTRA_ARGS}
cd ${{ inputs.TF_WORKSPACE }}
terraform plan -compact-warnings -detailed-exitcode ${{ inputs.TF_EXTRA_ARGS }}
terraform-apply-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Terraform init
run: |
cd $TF_WORKSPACE
cd ${{ inputs.TF_WORKSPACE }}
terraform init --upgrade
- name: Terraform apply
run: |
cd $TF_WORKSPACE
terraform apply -auto-approve -compact-warnings ${TF_EXTRA_ARGS}
cd ${{ inputs.TF_WORKSPACE }}
terraform apply -auto-approve -compact-warnings ${{ inputs.TF_EXTRA_ARGS }}

0 comments on commit 7960a52

Please sign in to comment.