terraform-aws-eks-blueprints
terraform-aws-eks-blueprints copied to clipboard
Setting enable_external_dns to true causes error
Welcome to Amazon EKS Blueprints!
- [X] Yes, I've searched similar issues on GitHub and didn't find any.
Amazon EKS Blueprints Release version
4.4.0
What is your environment, configuration and the example used?
module "k8s_addons" { source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.4.0"
eks_cluster_id = data.aws_eks_cluster.region_main.id
K8s
enable_external_dns = true }
What did you do and What did you see instead?
when setting the bool enable_external_dns = true
Error: Either name or zone_id must be set │ │ with module.k8s_addons.module.external_dns[0].data.aws_route53_zone.selected, │ on .terraform/modules/k8s_addons/modules/kubernetes-addons/external-dns/data.tf line 1, in data "aws_route53_zone" "selected": │ 1: data "aws_route53_zone" "selected" {
Additional Information
No response
Hi @shawn-motley-dexcare, you will need to pass a value for eks_cluster_domain which is expected by the add-on as shown in this example.
closing with answer provided above
They're is actually an issue here: the cluster_domain variable is used here: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/kubernetes-addons/external-dns/main.tf#L78
Although it's supposed to be deprecated as it says here: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/kubernetes-addons/external-dns/variables.tf#L20
this has been resolved here https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/pull/101