Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding capability to configure private Route53 domains #350

Closed
wants to merge 1 commit into from

Conversation

chrislovecnm
Copy link

Description

At times a user will want to configure private Route53 domains.
This introduces the capability to set a flag and have terraform
create the private Route53 DNS entries.

This feature is useful to configure such things as split DNS and
also allow for private DNS entries for such things as nexus and
chartmuseum.

Notes for reviewers

I have not checked the use case where we are creating the VPC itself. How would I get the vpc id then?

Which issue this PR fixes

fixes #349

Release notes

New flag added to allow for the create a private Route53 domain. Set create_and_configure_private_subdomain to true
and this module will create and manage the private domain.

@chrislovecnm
Copy link
Author

/ok-to-test

@chrislovecnm
Copy link
Author

I think I have a bug with the for_each, when we don't want to create the associated vpns

@chrislovecnm chrislovecnm force-pushed the private-dns branch 3 times, most recently from feb93c2 to 79b11b0 Compare May 16, 2022 18:58
At times a user will want to configure private Route53 domains.
This introduces the capbility to set a flag and have terraform
create the private Route53 DNS entries.

This feature is useful to configure such things as split DNS and
also allow for private DNS entries for such things as nexus and
chartmuseum.
@@ -15,6 +15,28 @@ resource "aws_route53_zone" "subdomain_zone" {
force_destroy = var.force_destroy_subdomain
}

resource "aws_route53_zone" "private_zone" {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: extra line


resource "aws_route53_zone_association" "secondary" {
zone_id = aws_route53_zone.private_zone[0].zone_id
for_each = tomap(var.private_dns_associated_vpc_ids)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do u need tomap when private_dns_associated_vpc_ids is a map?

}

resource "aws_route53_zone_association" "secondary" {
zone_id = aws_route53_zone.private_zone[0].zone_id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably better to use element?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create private zone DNS
2 participants