File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,7 +195,8 @@ resource "aws_iam_role_policy_attachment" "ods_report_presign_url" {
195195}
196196
197197resource "aws_iam_role" "api_gateway_cloudwatch" {
198- name = " ${ terraform . workspace } _NdrAPIGatewayLogs"
198+ count = local. is_sandbox ? 0 : 1
199+ name = " ${ terraform . workspace } _NdrAPIGatewayLogs"
199200
200201 assume_role_policy = jsonencode ({
201202 Version = " 2012-10-17"
@@ -212,10 +213,12 @@ resource "aws_iam_role" "api_gateway_cloudwatch" {
212213}
213214
214215resource "aws_iam_role_policy_attachment" "api_gateway_logs" {
216+ count = local. is_sandbox ? 0 : 1
215217 role = aws_iam_role. api_gateway_cloudwatch . name
216218 policy_arn = " arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
217219}
218220
219221resource "aws_api_gateway_account" "logging" {
222+ count = local. is_sandbox ? 0 : 1
220223 cloudwatch_role_arn = aws_iam_role. api_gateway_cloudwatch . arn
221224}
You can’t perform that action at this time.
0 commit comments