Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Updated terraform workflow to stored file to GitHub artifact #142

Merged
merged 26 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b8b6f98
feat: Added inputs for tf-init step
Tanveer143s Jul 1, 2024
e0c02a2
feat: Added inputs for tf-init step
Tanveer143s Jul 1, 2024
0c0a673
feat: updated input names
Tanveer143s Jul 1, 2024
6bf5950
feat: fixed syntax issue
Tanveer143s Jul 1, 2024
3d31354
feat: fixed syntax issue
Tanveer143s Jul 1, 2024
a44a02e
feat: updated apply command
Tanveer143s Jul 1, 2024
b1a1b3d
feat: commented handle error step
Tanveer143s Jul 1, 2024
dee3213
feat: updated handle errored step
Tanveer143s Jul 1, 2024
d32f8b1
feat: updated handle errored step
Tanveer143s Jul 1, 2024
e58b507
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
12e826f
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
5a9cb62
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
b2c1323
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
e989a88
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
856d173
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
54721a2
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
2f57296
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
770675b
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
0de2e0e
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
9fcf0dd
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
6dcacc6
feat: created artifact upload steps
Tanveer143s Jul 1, 2024
9953446
feat: updated provide input
Tanveer143s Jul 2, 2024
d917557
feat: updated input default value
Tanveer143s Jul 2, 2024
6f45b54
feat: updated input default value
Tanveer143s Jul 2, 2024
9b49f62
feat: updated input
Tanveer143s Jul 2, 2024
592ca24
Merge branch 'master' into feat/update-tf-workflow
VishwajitNagulkar Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/terraform_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,24 @@ jobs:
terraform apply -auto-approve
fi

- name: Find Errored Terraform State
if: ${{ always() }}
run: |
cd ${{ inputs.working_directory }}
if [ -f "errored.tfstate" ]; then
ls -la errored.tfstate
echo "Uploading errored.tfstate as artifact..."
else
echo "Errored Terraform state file not found."
fi

- name: Upload Errored Terraform State Artifact
if: ${{ always() }} && success() && steps.find_errored_tfstate.outputs['errored_found'] == 'true'
uses: actions/upload-artifact@v4
with:
name: errored_tfstate
path: ${{ inputs.working_directory }}/errored.tfstate

- name: Terraform destroy
if: ${{ inputs.destroy == true }}
id: destroy
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ on:
type: string
default: './examples/complete/'
provider:
required: true
required: false
type: string
default: gcp
description: 'Cloud provider to run the workflow. e.g. azurerm or aws or gcp'
terraform_version:
description: 'Terraform version to use. Leave empty for the latest version.'
Expand Down