[Bug]: replacing a aws_ec2_network_insights_path does not delete analyses first #28330
Labels
bug
Addresses a defect in current functionality.
service/vpc
Issues and PRs that pertain to the vpc service.
Milestone
Terraform Core Version
1.3
AWS Provider Version
4.46
Affected Resource(s)
Expected Behavior
When a network insights path needs to be replaced, any dependencies that prevent destruction should be removed.
Actual Behavior
Terraform aborts with an error saying there are some analyses that must be removed. This involves a manual step therefore towards automation there should at least be a flag that allows to automate destruction of analyses.
Relevant Error/Panic Output Snippet
Error: deleting EC2 Network Insights Path (nip-xxxx): AnalysisExistsForNetworkInsightsPath: At least one analysis [nia-yyyy] exists for path nip-xxxx. Delete all the analyses before deleting this network path.
Terraform Configuration Files
Steps to Reproduce
Note: the edits were done by editing a larger terraform config that replaced the destination server by a new one. Here for simplicity the ec2 instance creation is done manually.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: