Delete a role trust from a Vultr IAM role. Remove the trust relationship to prevent specified users, groups, or issuers from assuming the role going forward.
Deleting a role trust removes the trust relationship, preventing the trusted entity from assuming the role. The role itself is not deleted. The trust can be restored using the Restore Role Trust endpoint if you have its id.
Follow this guide to delete a role trust using the Vultr API or Terraform.
Send a GET request to the List Role Trusts endpoint to retrieve all role trusts in your organization.
$ curl "https://api.vultr.com/v2/role-trusts" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the role trust you want to delete.
Send a DELETE request to the Delete Role Trust endpoint to delete the trust. Replace {role-trust-id} with the id of the role trust you want to delete.
$ curl "https://api.vultr.com/v2/role-trusts/{role-trust-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
A successful deletion returns an HTTP 204 No Content response with no response body.
Send a GET request to the List Role Trusts endpoint to retrieve all role trusts.
$ curl "https://api.vultr.com/v2/role-trusts" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Verify that the deleted trust no longer appears in the list.
Ensure the Vultr Terraform provider is configured in your Terraform project.
Destroy the role trust resource. Replace my_role_trust with the resource label used in your configuration.
$ terraform destroy -target=vultr_organization_role_trust.my_role_trust
Alternatively, remove the vultr_organization_role_trust block from your configuration and run:
$ terraform apply
Verify that the output shows vultr_organization_role_trust.my_role_trust: Destruction complete.