hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.75k stars 9.11k forks source link

[Enhancement]: Network Manager policy document edge location region update/removal with VPC Attachment removal in that region #29707

Open GlennChia opened 1 year ago

GlennChia commented 1 year ago

Description

Main issue

When there is a change in edge_location to a different region in aws_networkmanager_core_network_policy_attachment with an existing aws_networkmanager_vpc_attachment resource attached to the aws_networkmanager_core_network we get an error:

Proposed fix

Add a retry when the line of error is detected (set it for 4 minutes for retry because VPC attachments could take a while to delete). This retry is added to aws_networkmanager_core_network_policy_attachment.

Trade off

There could be false positives where the policy is truly invalid and it is not an actual error with the vpc attachments. This means that users would have to wait the entire retry duration before getting the accurate error message.

Other useful information

For aws_networkmanager_vpc_attachment resources to be attached to aws_networkmanager_core_network there needs to be a policy_document with an edge_location in the region that the aws_networkmanager_vpc_attachment is created in.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue