3

I have added terraform script to create an organization account.

After creation, when I ran destroy, it is not deleting the account.

Getting this error:

An error occurred (ConstraintViolationException) when calling the RemoveAccountFromOrganization operation: The member account must be configured with a valid payment method, such as a credit card.

Using the similar question and answer provided in it, I tried adding close_on_deletion flag to the resource, this time terraform destroy is successful but account is just in suspended state and reapply won't work anyway because of this.

suspended

Removing manually again shows ConstraintViolationException.

Jor-El
  • 187
  • 3
  • 11
  • Reopen the account again via https://aws.amazon.com/premiumsupport/knowledge-center/reopen-aws-account/ which will make you add a payment method and then try to remove it from the org. – Ermiya Eskandary May 03 '22 at 09:54
  • 1
    The account is created as part of terraform, so that we can use it for automation purpose and delete it at the end of it. This solution doesn't work for this – Jor-El May 03 '22 at 13:17

0 Answers0