Peer VPCs across AWS Accounts and Regions - #71
Conversation
|
Thanks for this PR. Indeed, there is no point of maintaining two very similar modules for the same purpose. And I suggest, this module is adjusted to be compatible with the https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account, so that we don't break things when migrating to the one unified module in the future. |
| vpc_peering_connection_id = aws_vpc_peering_connection.default[0].id | ||
| auto_accept = var.auto_accept | ||
|
|
||
| accepter { |
There was a problem hiding this comment.
Consider using aws_vpc_peering_connection_options resource instead.
| update = var.update_timeout | ||
| delete = var.delete_timeout | ||
| # Accepter's side of the connection. | ||
| resource "aws_vpc_peering_connection_accepter" "default" { |
There was a problem hiding this comment.
Typically, this one won't be needed for the same account/same region case, as it will be treated as the same resource as requester by AWS. For this very reason, the multi-account module exhibits incorrect behavior, trying to rewrite requester tags with accepter tags and vice versa with every next plan/apply cycle, never reaching state convergence. Here, you're using same tags for both requester and accepter, so shouldn't be an issue, however this will break compatibility with multi-account module, if someone tries to migrate from it to this reworked module.
what
aws.requestorandaws.acceptorwhy
references
Terraform Documentation on Provider Usage:
https://developer.hashicorp.com/terraform/language/modules/develop/providers#:~:text=Provider%20configurations%20can%20be%20defined%20only%20in%20a%20root%20Terraform%20module.
TL;DR: "Provider configurations can be defined only in a root Terraform module."
Deprecates: https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account
-
closes #52-
closes #42