terraform-provider-terracurl
terraform-provider-terracurl copied to clipboard
creating and deleting an API object that is referenced as a UUID explicitely in the URL path
the API i am using can creates (POST) an object, the result of the creation is a UUID returned in a JSON response. The suppression of the same objet (DELETE) is done using the object UUID referenced in the delete_url request.
for example
resource "terracurl_request" "myobject" {
...
url = "https://10.1.11.111/api/v1/objects"
...
}
output "id" {
value = jsondecode(terracurl_request.myobject.response.id)
}
the "id" is the UUID of the object which is used as the reference for the object suppression.
the destroy_url is then
destroy_url = "https://10.1.11.111/api/v1/objects/<UUIDv4_value>"
destroy_method = "DELETE"
could you help me understand is there are any way moving forward?
I have the same issue. Did you manage to find a solution, @fchmainy ?
hi @m0ps nope!
@fchmainy @m0ps I switched to https://github.com/Mastercard/terraform-provider-restapi for this exact reason
Nice! Thanks @m0ps for sharing