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

Cross account name resolution failing - despite network connectivity #25

Open
liamraeAL opened this issue Aug 2, 2022 · 1 comment
Open

Comments

@liamraeAL
Copy link

liamraeAL commented Aug 2, 2022

We have deployed a standard hub and spoke architecture using this repository, and the example-spoke-vpc code.

Everything has run smoothly, and we can communicate via ICMP from an application in our dev spoke, to another EC2 instance in our test account (via the TGW)

However name resolution is failing - e.g. from DEVELOPMENT account - ping instance.test.network.internal (a Route53 A record in the TEST account, in the PHZ test.network.internal. The above command returns ping: instance.test.network.internal: Name or service not known

We have a top-level domain in the networking account network.internal but we get NXDOMAIN when we try to resolve that from any of the spoke accounts.

Any idea what we might be missing? We haven't changed any of the code from this repository, apart from non-consequential variables such as tags and IPAM CIDR ranges.

@liamraeAL liamraeAL changed the title Cross account network resolution Cross account network resolution failing - despite network connectivity Aug 2, 2022
@liamraeAL liamraeAL changed the title Cross account network resolution failing - despite network connectivity Cross account name resolution failing - despite network connectivity Aug 2, 2022
@liamraeAL
Copy link
Author

The fix for this was amending the target of the forward rule to point to the aws_route53_resolver_endpoint.inbound.ip_address rather than the outbound resolver endpoint IPs.

Our use-case is purely internal AWS traffic, and name resolution. No external/on-prem outbound resolvers required.

resource "aws_route53_resolver_rule" "fwd" {
  domain_name          = var.private_root_domain
  name                 = "network-internal"
  rule_type            = "FORWARD"
  resolver_endpoint_id = aws_route53_resolver_endpoint.outbound.id

  dynamic "target_ip" {
    for_each = aws_route53_resolver_endpoint.inbound.ip_address

    content {
      ip = target_ip.value.ip
    }
  }
}

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

No branches or pull requests

1 participant