Skip to content

Commit

Permalink
chore(main/resource-policy): tidy naming resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dudymas committed Oct 18, 2024
1 parent 62c1840 commit af83cc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_api_gateway_rest_api" "this" {
}
}

data "aws_iam_policy_document" "default" {
data "aws_iam_policy_document" "this" {
count = local.enabled && length(var.vpc_endpoints) > 0 ? 1 : 0

source_policy_documents = var.rest_api_policy == null ? [] : [var.rest_api_policy]
Expand Down Expand Up @@ -50,7 +50,7 @@ resource "aws_api_gateway_rest_api_policy" "this" {
count = local.create_rest_api_policy || length(var.vpc_endpoints) > 0 ? 1 : 0
rest_api_id = aws_api_gateway_rest_api.this[0].id

policy = data.aws_iam_policy_document.default[0].json
policy = data.aws_iam_policy_document.this[0].json
}

module "cloudwatch_log_group" {
Expand Down

0 comments on commit af83cc3

Please sign in to comment.