Skip to content

Commit ef0bf58

Browse files
committed
add working count logic to is sandbox
1 parent c39af18 commit ef0bf58

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

infrastructure/iam.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ resource "aws_iam_role" "api_gateway_cloudwatch" {
214214

215215
resource "aws_iam_role_policy_attachment" "api_gateway_logs" {
216216
count = local.is_sandbox ? 0 : 1
217-
role = aws_iam_role.api_gateway_cloudwatch.name
217+
role = aws_iam_role.api_gateway_cloudwatch[0].name
218218
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
219219
}
220220

221221
resource "aws_api_gateway_account" "logging" {
222222
count = local.is_sandbox ? 0 : 1
223-
cloudwatch_role_arn = aws_iam_role.api_gateway_cloudwatch.arn
223+
cloudwatch_role_arn = aws_iam_role.api_gateway_cloudwatch[0].arn
224224
}

0 commit comments

Comments
 (0)