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

aws_route53_zone_association is not complete #617

Closed
hashibot opened this issue Jun 13, 2017 · 13 comments
Closed

aws_route53_zone_association is not complete #617

hashibot opened this issue Jun 13, 2017 · 13 comments
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @gtmtech as hashicorp/terraform#12804. It was migrated here as part of the provider split. The original body of the issue is below.


Terraform 0.8.7

The aws_route53_zone_association resource is not complete.

It is possible to associate a route53 zone to a VPC not in the same account.

Trying to do so with an aws_route53_zone_association yields the following error:

* aws_route53_zone_association.target: NotAuthorizedException: The VPC: vpc-xxxxxxx has not authorized to associate with your hosted zone.
	status code: 401, request id: xxxxxxx

Details of the endpoints used to do cross account zone association are here:

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-associate-vpcs-different-accounts.html

@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@radeksimko radeksimko added the service/route53 Issues and PRs that pertain to the route53 service. label Jan 27, 2018
@JoshiiSinfield
Copy link

I think this is linked to #384 ?

@dgalichet
Copy link

this bug is really annoying. Do you plan a fix or are there some workarounds ?

@maathor
Copy link

maathor commented May 27, 2019

Yeah, really need it too !

@JoshiiSinfield
Copy link

Have you looked at the Route 53 resolvers recently released? Using rules and sharing them across accounts using Resource Access Manager?
It means only one zone association is required and all the other accounts can have the rules shared.

We've moved to that model, meaning this issue is no longer a problem.

If you still want to use zone associations you could always use an external code data source and do the association in code using SDK - our previous method.

Cheers,
Josh

@dgalichet
Copy link

thanks a lot @JoshiiSinfield I will take a look

@JoshiiSinfield
Copy link

JoshiiSinfield commented May 29, 2019 via email

@rschwartz-tpn
Copy link

rschwartz-tpn commented Jan 21, 2020

We make use of the Shared Services DNS Resolver setup, as linked above, but still have this error, which is odd, because the actual vpc associations work - TF just errors-out with the error above, which is annoying.

Our solution allows individual accounts to manage their own Private Hosted Zone's and we ingest those zones via cross-account association to a Shared Services DNS account - that then further shares them to the entire Org. Because the source PHZ is in a different account then the SS-DNS, we cannot use this native TF resource and are instead using a null_resource.

It would be nice if this issue got addressed.

@JoshiiSinfield
Copy link

Hi @rschwartz-tpn ,

If you're using resolvers & sharing rules across the accounts you should be able to remove the need for vpc-associations altogther...

@rschwartz-tpn
Copy link

Hi @JoshiiSinfield - I'm not sure if your advice is based on offering a work around to the bug reported here, or if you didn't understand our setup. If you take a look at Step 3 at this link:

https://aws.amazon.com/blogs/security/simplify-dns-management-in-a-multiaccount-environment-with-route-53-resolver/

The solution for sharing PHZs from other accounts, to other accounts, via an intermediary shared services account, requires zone association's.

This particular architecture was covered at 2019 re-Invent in a great session I think everyone should see. :) The link to the video at the point where this setup is discussed is below:

https://youtu.be/_Z5jAs2gvPA?t=2943

-Rob

@JoshiiSinfield
Copy link

Hi @rschwartz-tpn ,

Apologies, yes I missed your setup of an intermediary account. I was assuming you'd share a rule from each account that points to that PHZ without the need for an intermediary.

Thanks for the video link I'll take a look.

Josh.

@bflad
Copy link
Contributor

bflad commented Aug 7, 2020

Support for cross-account Route 53 VPC Associations via a new aws_route53_vpc_association_authorization resource and updated aws_route53_zone_association resource handling has been merged and will release with version 3.1.0 of the Terraform AWS Provider, later today. Thanks to @goakley and @RyanJarv for implementation. 👍

@bflad bflad closed this as completed Aug 7, 2020
@ghost
Copy link

ghost commented Aug 7, 2020

This has been released in version 3.1.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Sep 7, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

No branches or pull requests

7 participants