Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelezovartem committed Jan 14, 2025
1 parent 0a82896 commit acd745f
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,40 +84,40 @@ module "slack_notifications" {

cloudwatch_logs_retention_in_days = var.cloudwatch_logs_retention_in_days

# attach_policy_json = (var.slack_webhook_url_source_type != "text")
# policy_json = var.slack_webhook_url_source_type == "secretsmanager" ? jsonencode(
# {
# "Version" : "2012-10-17",
# "Statement" : [
# {
# "Effect" : "Allow",
# "Action" : [
# "secretsmanager:GetSecretValue",
# ],
# "Resource" : [
# "arn:aws:secretsmanager:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:secret:${var.slack_webhook_url}*",
# ]
# }
# ]
# }
# ) : var.slack_webhook_url_source_type == "ssm" ? jsonencode(
# {
# "Version" : "2012-10-17",
# "Statement" : [
# {
# "Effect" : "Allow",
# "Action" : [
# "ssm:GetParameter",
# "ssm:GetParameters",
# "ssm:GetParametersByPath",
# ],
# "Resource" : [
# "arn:aws:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter${var.slack_webhook_url}*",
# ]
# }
# ]
# }
# ) : null
attach_policy_json = (var.slack_webhook_url_source_type != "text")
policy_json = var.slack_webhook_url_source_type == "secretsmanager" ? jsonencode(
{
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Action" : [
"secretsmanager:GetSecretValue",
],
"Resource" : [
"arn:aws:secretsmanager:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:secret:${var.slack_webhook_url}*",
]
}
]
}
) : var.slack_webhook_url_source_type == "ssm" ? jsonencode(
{
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Action" : [
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParametersByPath",
],
"Resource" : [
"arn:aws:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter${var.slack_webhook_url}*",
]
}
]
}
) : null


tags = var.tags
Expand Down

0 comments on commit acd745f

Please sign in to comment.