Skip to content

Commit

Permalink
feat: Added inputs for tf-init step
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanveer143s committed Jul 1, 2024
1 parent 145168e commit b8b6f98
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/terraform_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ on:
type: string
default: true
description: 'If true, the action will securely generate a credentials file which can be used for authentication via gcloud and Google Cloud SDKs.'
backend_bucket_name:
required: false
type: string
errored_tfstate_path:
required: false
type: string
secrets:
AZURE_CREDENTIALS:
required: false
Expand Down Expand Up @@ -165,10 +171,17 @@ jobs:
actions_subcommand: 'fmt'
path: ${{ inputs.working_directory }}

# - name: terraform init
# run: |
# cd ${{ inputs.working_directory }}
# terraform init

- name: terraform init
run: |
cd ${{ inputs.working_directory }}
terraform init
terraform init \
-backend-config="bucket=${{ inputs.backend_bucket_name }}" \
-backend-config="key=${{ inputs.errored_tfstate_path }}"
- name: 'Terraform validate'
if: ${{ inputs.destroy != true }}
Expand Down

0 comments on commit b8b6f98

Please sign in to comment.