Cannot destroy aws_ram_resource_share_accepter
from member account when share contains some resource types
#19319
Labels
bug
Addresses a defect in current functionality.
partition/aws-iso
Pertains to the aws-iso partition.
partition/aws-us-gov
Pertains to the aws-us-gov partition.
service/ram
Issues and PRs that pertain to the ram service.
upstream
Addresses functionality related to the cloud provider.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
aws_ram_resource_share_accepter
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
Terraform should be able to destroy the resources without error.
Actual Behavior
Steps to Reproduce
terraform apply
terraform destroy
Workaround
terraform state rm aws_ram_resource_share_accepter.member
terraform destroy
Important Factoids
I've been in communication with AWS Support about a related issue where issuing the Disassociate command from the member account would claim to succeed but do nothing in the member account and actually leave the association in an error state in the owner account (preventing any further attempts to Disassociate from the owner account). It seems they have decided to update the API to simply fail.
Because success depends on the resources in the share, I would suggest trying the Disassociate command. However, if this specific error occurs then the accepter should simply be removed from state without error. The owner would then be able to Disassociate the principal successfully.
AWS currently offers no API that would allow the member to Disassociate successfully. In a call with the AWS service team, they indicated they are working on supporting it internally, so trying and passing on this specific error would allow the command to succeed when they do add that support.
Here is the list of impacted resources they gave me. When shared, these will all cause the Disassociate to fail from the member account:
The text was updated successfully, but these errors were encountered: