Skip to content

Commit

Permalink
* 2.10.6 -- 2024-11-13
Browse files Browse the repository at this point in the history
  - vpc-interface-endpoint
    - fix route53 creation to base it off private_dns_name
  • Loading branch information
badra001 committed Nov 13, 2024
1 parent 3ef76da commit 7bd7b0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,7 @@
* 2.10.5 -- 2024-11-13
- vpc-interface-endpoint
- fix service vs service_name to better handle service name which are not short and non-regional (for new iam endpoint)

* 2.10.6 -- 2024-11-13
- vpc-interface-endpoint
- fix route53 creation to base it off private_dns_name
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
_module_version = "2.10.5"
_module_version = "2.10.6"
_module_names = {
"_main_" = "aws-vpc-setup"

Expand Down
4 changes: 3 additions & 1 deletion vpc-interface-endpoint/route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ locals {
service_domain_parts = split(".", data.aws_vpc_endpoint_service.interface_endpoint.private_dns_name)
is_wildcard = local.service_domain_parts[0] == "*"
has_service = data.aws_vpc_endpoint_service.interface_endpoint.service != null
has_domain_name = data.aws_vpc_endpoint_service.interface_endpoint.private_dns_name != null
domain_name = local.is_wildcard ? join(".", slice(local.service_domain_parts, 1, length(local.service_domain_parts))) : data.aws_vpc_endpoint_service.interface_endpoint.private_dns_name
r53_create = contains(local.permitted_accounts, local.account_id) && var.create_central_vpc_endpoint && length(local.domain_name) > 0 && local.has_service
# r53_create = contains(local.permitted_accounts, local.account_id) && var.create_central_vpc_endpoint && length(local.domain_name) > 0 && local.has_service
r53_create = contains(local.permitted_accounts, local.account_id) && var.create_central_vpc_endpoint && length(local.domain_name) > 0 && local.has_domain_name
}

resource "aws_route53_zone" "vpce" {
Expand Down

0 comments on commit 7bd7b0f

Please sign in to comment.