-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* relocate images under assets Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * code format Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * fix full-size image links Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * lowercase url Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * reword Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * remove sample and assets Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * update examples Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * fix absolute path root Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * fix link Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * quotes Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> --------- Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
- Loading branch information
Showing
27 changed files
with
117 additions
and
375 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
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
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,43 @@ | ||
--- | ||
name: Trigger on pull_request (plan or apply) event with Terraform and OpenTofu on self-hosted runner. | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, closed] | ||
|
||
jobs: | ||
tf: | ||
runs-on: self-hosted | ||
|
||
permissions: | ||
actions: read # Required to identify workflow run. | ||
checks: write # Required to add status summary. | ||
contents: read # Required to checkout repository. | ||
pull-requests: write # Required to add comment and label. | ||
|
||
env: | ||
tool: terraform | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Terraform | ||
if: env.tool == 'terraform' | ||
uses: hashicorp/setup-terraform@v3 | ||
|
||
- name: Setup OpenTofu | ||
if: env.tool == 'tofu' | ||
uses: opentofu/setup-opentofu@v1 | ||
|
||
- name: Install GitHub CLI | ||
run: sudo apt update && sudo apt install gh -y | ||
|
||
- name: Provision TF | ||
uses: devsectop/tf-via-pr@v12 | ||
with: | ||
command: ${{ github.event.pull_request.merged && 'apply' || 'plan' }} | ||
arg-lock: ${{ github.event.pull_request.merged }} | ||
working-directory: path/to/directory | ||
plan-encrypt: ${{ secrets.PASSPHRASE }} | ||
tool: ${{ env.tool }} |
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
--- | ||
name: Trigger on schedule (cron) event with 'fmt' and 'validate' checks to identify configuration drift. | ||
|
||
on: | ||
schedule: | ||
- cron: "0 */8 * * 1-5" # Every 8 hours on weekdays. | ||
|
||
jobs: | ||
tf: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
actions: read # Required to identify workflow run. | ||
checks: write # Required to add status summary. | ||
contents: read # Required to checkout repository. | ||
pull-requests: write # Required to add comment and label. | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup TF | ||
uses: hashicorp/setup-terraform@v3 | ||
|
||
- name: Provision TF | ||
id: provision | ||
uses: devsectop/tf-via-pr@v12 | ||
with: | ||
command: plan | ||
arg-lock: false | ||
arg-parallelism: 20 | ||
arg-refresh-only: true | ||
working-directory: path/to/directory | ||
plan-encrypt: ${{ secrets.PASSPHRASE }} | ||
format: true | ||
validate: true | ||
|
||
- name: Check drift | ||
if: steps.provision.outputs.exitcode != 0 | ||
run: echo "Configuration drift detected." |
Binary file not shown.
Binary file not shown.
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
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.