Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 30, 2024
1 parent 4f261dd commit 238a6a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dns_zones.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ locals {
vpc_domain_name = var.vpc_domain_name
cluster_domain_name = format("%v.%v", var.cluster_name, local.vpc_domain_name)
cluster_domain_description = format("%v EKS Cluster DNS Zone", var.cluster_name)
region = var.region
}

#---
Expand Down Expand Up @@ -51,8 +52,8 @@ resource "aws_route53_zone" "cluster_domain" {
lifecycle {
ignore_changes = [vpc]
precondition {
condition = (var.shared_vpc_label == null || var.shared_vpc_label == "") || (! (var.shared_vpc_label == null || var.shared_vpc_label == "") && ! (var.domain == null || var.domain == ""))
error_message = "var.domain must be provided when shared VPCs are in use."
condition = (var.shared_vpc_label == null || var.shared_vpc_label == "") || (! (var.shared_vpc_label == null || var.shared_vpc_label == "") && ! (var.vpc_domain_name == null || var.vpc_domain_name == ""))
error_message = "var.vpc_domain_name must be provided when shared VPCs are in use."
}
}

Expand Down

0 comments on commit 238a6a1

Please sign in to comment.