File tree Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1+
2+ Combine lambdas into 1
3+ - determine which integration to setup by parsing event data
Original file line number Diff line number Diff line change 1+ module "enabled" {
2+ source = " devops-workflow/boolean/local"
3+ version = " 0.1.2"
4+ value = " ${ var . enabled } "
5+ }
6+
17locals {
2- enabled = " ${ length (var. service_key ) > 0 ? 1 : 0 } "
8+ enabled = " ${ module . enabled . value && length (var. service_key ) > 0 ? 1 : 0 } "
39}
410
511data "template_file" "pagerduty_service" {
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ variable "datadog_default" {
33 default = " "
44}
55
6+ variable "enabled" {
7+ description = " Set to false to prevent the module from creating anything"
8+ default = true
9+ }
10+
611variable "service_key" {
712 description = " PagerDuty service integration key"
813 default = " "
Original file line number Diff line number Diff line change 33# Channel name is empty
44# Channel name has format mon-<env>-<service short name> but nothing after second -
55
6+ module "enabled" {
7+ source = " devops-workflow/boolean/local"
8+ version = " 0.1.2"
9+ value = " ${ var . enabled } "
10+ }
11+
612locals {
7- enabled = " ${ length (replace (var. channel_name , " /(mon-\\ w+-)(.*)$/" , " $2" )) > 0 ? 1 : 0 } "
13+ enabled = " ${ module . enabled . value && length (replace (var. channel_name , " /(mon-\\ w+-)(.*)$/" , " $2" )) > 0 ? 1 : 0 } "
814}
915
1016data "template_file" "slack_channel" {
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ variable "channel_name" {
33 default = " "
44}
55
6+ variable "enabled" {
7+ description = " Set to false to prevent the module from creating anything"
8+ default = true
9+ }
10+
611variable "s3_base" {
712 description = " Base path in S3 bucket for Slack configuration pieces"
813 default = " datadog/integration/slack"
You can’t perform that action at this time.
0 commit comments