Skip to content

Commit

Permalink
fixed aws_api_gateway_rest_api_policy definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Bakhmetev committed Sep 18, 2024
1 parent 303c8be commit dc86526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf-aws-rest-api-gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ terraform {

locals {
create_log_group = var.logging_level != "OFF"
stage_name = var.stage_name != "" ? var.stage_name : module.name.environment
stage_name = var.stage_name != "" ? var.stage_name : var.environment
}

data "template_file" "this" {
Expand Down Expand Up @@ -35,7 +35,7 @@ resource "aws_api_gateway_rest_api" "this" {
}

resource "aws_api_gateway_rest_api_policy" "this" {
count = var.rest_api_policy ? 1 : 0
count = var.rest_api_policy != null ? 1 : 0
rest_api_id = aws_api_gateway_rest_api.this.id

policy = var.rest_api_policy
Expand Down

0 comments on commit dc86526

Please sign in to comment.