cloudamqp / terraform-provider-cloudamqp

Terraform Provider for CloudAMQP
https://registry.terraform.io/providers/cloudamqp/cloudamqp
Mozilla Public License 2.0
35 stars 39 forks source link

Import: where to find instance ID #60

Closed dhoepelman closed 4 years ago

dhoepelman commented 4 years ago

I'm trying to import an instance as per your docs

terraform import cloudamqp_instance.rmq_url 80

Where to get this instance ID?

I tried using the ID from the URL: https://api.cloudamqp.com/console/{id}/details

but this gives

.....cloudamqp_instance.....: Refreshing state... [id=.....]

Error: ReadInstance failed, status: 404, message: map[error:Invalid ID]
tbroden84 commented 4 years ago

There is another API handling instance information, and the correct request URL is: https://customer.cloudamqp.com/api/instances

For more information the API documentation is: https://docs.cloudamqp.com/#instances

You also need the default API key or create a new one, this can be done on your console page and menu in the right corner. Or directly go to https://customer.cloudamqp.com/apikeys.

dhoepelman commented 4 years ago

Thanks! Would be good to add this to the README