You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to set this up so I can do a separate slack channel per account, which can be done with a for_each per account which results in duplicating a lot of infrastructure.
What's more ideal is if we can do something like this
per account for separate channel using multiple hooks
Using the key as the account instead of the channel name
module"clickops_notifier" {
source="cloudandthings/clickops-notifier/aws"version="5.0.4"cloudtrail_bucket_name="org-cloudtrail"included_accounts=[
module.account_map["production"],
module.account_map["corp"],
]
# written out without a for loop to show mapping is# account = slack-web-hookwebhooks_slack_notifications_per_account={
module.account_map["production"] = jsondecode(data.aws_secretsmanager_secret_version.webhook["production"].secret_string)["webhook"]
module.account_map["corp"] = jsondecode(data.aws_secretsmanager_secret_version.webhook["corp"].secret_string)["webhook"]
}
# or# webhooks_slack_notifications_per_account = {# for account in data.aws_secretsmanager_secret_version.webhook:# module.account_map[account] = jsondecode(data.aws_secretsmanager_secret_version.webhook[account].secret_string)["webhook"]# }
}
I have a client setup like this
current setup - single channel for multiple accounts
I want to set this up so I can do a separate slack channel per account, which can be done with a
for_each
per account which results in duplicating a lot of infrastructure.per account for separate channel using for_each
What's more ideal is if we can do something like this
per account for separate channel using multiple hooks
Using the key as the account instead of the channel name
terraform-aws-clickops-notifier/main.tf
Lines 142 to 148 in be9694c
terraform-aws-clickops-notifier/main.tf
Lines 104 to 105 in be9694c
terraform-aws-clickops-notifier/clickopsnotifier/app.py
Lines 56 to 64 in be9694c
The text was updated successfully, but these errors were encountered: