We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5fcd02 commit f59b33eCopy full SHA for f59b33e
modules/ami-updater/main.tf
@@ -122,7 +122,7 @@ resource "aws_iam_role_policy" "ami_updater_logging" {
122
}
123
124
resource "aws_iam_role_policy_attachment" "ami_updater_vpc_execution_role" {
125
- count = length(var.lambda_subnet_ids) > 0 ? 1 : 0
+ count = var.lambda_subnet_ids != null && var.lambda_security_group_ids != null ? 1 : 0
126
role = aws_iam_role.ami_updater.name
127
policy_arn = "arn:${var.aws_partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
128
0 commit comments