Skip to content

Commit

Permalink
#94 ci evolution to use map and upgrade setup-terraform to v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xp-1000 committed Oct 5, 2020
1 parent 304aae2 commit 8701e97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v1.2.0
with:
terraform_version: 0.13.3
terraform_wrapper: false
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_tf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ esac

module_vars=$(cat <<-EOF
environment = var.environment
notifications = [local.pagerduty_notification]
notifications = local.notifications
EOF
)
env_vars=$(terraform-config-inspect $(dirname $0)/../test --json | jq -cr '.variables[] | select(.required) | .name')
Expand Down
8 changes: 8 additions & 0 deletions test/locals.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
locals {
pagerduty_notification = format("PagerDuty,%s", var.pagerduty_integration_id)
notifications = {
critical = [local.pagerduty_notification]
major = [local.pagerduty_notification]
minor = [local.pagerduty_notification]
warning = ["Email,docs@example.org"]
info = []
}
}

0 comments on commit 8701e97

Please sign in to comment.