-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to switch internal data source to non-deprecated provider (#3)
- Loading branch information
1 parent
886cf74
commit f6bba7b
Showing
8 changed files
with
121 additions
and
9 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,59 @@ | ||
name: "Build" | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
Matrix: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Generate Matrix | ||
id: matrix | ||
uses: Invicton-Labs/terraform-module-testing/matrix@v0.1.0 | ||
with: | ||
minimum_tf_version: '0.13.0' | ||
|
||
- name: Output Matrix | ||
run: | | ||
echo "Strategy: ${{ steps.matrix.outputs.strategy }}" | ||
outputs: | ||
strategy: ${{ steps.matrix.outputs.strategy }} | ||
|
||
Test: | ||
needs: [Matrix] | ||
strategy: ${{ fromJSON(needs.Matrix.outputs.strategy)}} | ||
runs-on: ${{ matrix.runs-on }} | ||
container: ${{ matrix.container }} | ||
steps: | ||
- name: Initialize - Pass | ||
id: init-pass | ||
uses: Invicton-Labs/terraform-module-testing/initialize@v0.1.0 | ||
with: | ||
tf_path: tests/pass | ||
- name: Run Tests - Pass | ||
id: tests-pass | ||
uses: Invicton-Labs/terraform-module-testing/apply-destroy@v0.1.0 | ||
with: | ||
tf_path: tests/pass | ||
|
||
- name: Initialize - Fail | ||
id: init-fail | ||
uses: Invicton-Labs/terraform-module-testing/initialize@v0.1.0 | ||
with: | ||
tf_path: tests/fail | ||
- name: Run Tests - Fail | ||
id: tests-fail | ||
uses: Invicton-Labs/terraform-module-testing/apply-failure@v0.1.0 | ||
with: | ||
tf_path: tests/fail | ||
|
||
# This job just waits for all other jobs to pass. We have it here | ||
# so our branch protection rule can reference a single job, instead | ||
# of needing to list every matrix value of every job above. | ||
Passed: | ||
runs-on: ubuntu-latest | ||
needs: [Test] | ||
steps: | ||
- name: Mark tests as passed | ||
run: echo "🎉" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
output "checked" { | ||
description = "Whether the condition has been checked (used for assertion dependencies)." | ||
value = data.template_file.check.rendered == "" ? true : true | ||
value = data.cloudinit_config.check.rendered == "" ? true : true | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,5 @@ | ||
module "fail" { | ||
source = "../../" | ||
condition = false | ||
error_message = "sample error" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,5 @@ | ||
module "pass" { | ||
source = "../../" | ||
condition = true | ||
error_message = "sample error" | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
terraform { | ||
required_version = ">= 0.13.0" | ||
required_providers { | ||
template = { | ||
source = "hashicorp/template" | ||
version = ">= 2.2.0" | ||
cloudinit = { | ||
source = "hashicorp/cloudinit" | ||
version = ">= 2.3.1" | ||
} | ||
} | ||
} |