equinix-labs / terraform-equinix-metal-eks-anywhere

EKS Anywhere on Equinix Metal (Baremetal)
https://deploy.equinix.com/labs/terraform-equinix-metal-eks-anywhere/
Apache License 2.0
10 stars 5 forks source link

Labs: document that you should not add yourself as a collaborator if you own the org #47

Closed displague closed 2 years ago

displague commented 2 years ago

It is not safe to add organization owners to the collaborator email list. terraform destroy will fail with:

Error: API Error HTTP 422 At least one Admin is required.; Cannot remove the Organization Owner

To remedy this, remove yourself from the email list and run:

terraform state rm 'module.lab["me@example.com"].equinix_metal_organization_member.user

This probably could also be address on the Terraform Equinix Provider side by warning, rather than erroring, when a membership is removed for an owner (which can be discovered from the organization's owners property).