-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f76ca6a
commit 29f2728
Showing
8 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Checkout Repository | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
checkout: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Setup Terraform | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_version: 1.3.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Terraform Apply | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
terraform_apply: | ||
runs-on: ubuntu-latest | ||
needs: terraform_plan | ||
steps: | ||
- name: Terraform apply | ||
run: terraform apply --auto-approve |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Terraform Destroy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
terraform_destroy: | ||
runs-on: ubuntu-latest | ||
needs: terraform_apply | ||
steps: | ||
- name: Terraform destroy | ||
run: terraform destroy --auto-approve |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Terraform Format | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
terraform_format: | ||
runs-on: ubuntu-latest | ||
needs: terraform_init | ||
steps: | ||
- name: Terraform format | ||
run: terraform fmt -check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Terraform Init | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
terraform_init: | ||
runs-on: ubuntu-latest | ||
needs: [checkout, setup] | ||
steps: | ||
- name: Terraform init | ||
run: terraform init -backend-config="bucket=${BUCKET_TF_STATE}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Terraform Plan | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
terraform_plan: | ||
runs-on: ubuntu-latest | ||
needs: terraform_validate | ||
steps: | ||
- name: Terraform plan | ||
run: terraform plan -no-color -input=false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Terraform Validate | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
terraform_validate: | ||
runs-on: ubuntu-latest | ||
needs: terraform_format | ||
steps: | ||
- name: Terraform validate | ||
run: terraform validate |