Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed subscriber input variable handler #73

Merged
merged 3 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ provider "aws" {
region = var.region
}

locals {
subscribers = {
email = {
protocol = "email"
endpoint = "test@example.com"
endpoint_auto_confirms = true
}
}
}

module "aws_config_storage" {
source = "cloudposse/config-storage/aws"
version = "1.0.0"
Expand All @@ -22,6 +32,7 @@ module "aws_config" {
s3_bucket_id = module.aws_config_storage.bucket_id
s3_bucket_arn = module.aws_config_storage.bucket_arn
global_resource_collector_region = var.global_resource_collector_region
subscribers = local.subscribers

context = module.this.context
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module "sns_topic" {

attributes = concat(module.this.attributes, ["config"])
subscribers = {
for subscriber in var.subscribers : subscriber => {
for key, subscriber in var.subscribers : key => {
protocol = lookup(subscriber, "protocol")
endpoint = lookup(subscriber, "endpoint")
endpoint_auto_confirms = lookup(subscriber, "endpoint_auto_confirms", false)
Expand Down