Closed jmturwy closed 3 years ago
It seems like it works from the UI because it uses a different endpoint which accepts an extra providerid
argument in the request, presumably corresponding to the VPC. Namely, something like:
curl -sL https://customer.cloudamqp.com/instance/create \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:86.0) Gecko/20100101 Firefox/86.0' \
-H 'Cookie: rack.session=redacted' \
-d authenticity_token=redacted \
-d name=bobby2 \
-d plan=squirrel-1 \
-d region=google-compute-engine::us-east4 \
-d vpc=on \
-d providerid=6451617f-d5d3-43bf-b14d-0a907d071b4b \
-d subnet=10.210.64.0
Will reuse an existing VPC, and not create a new one.
This providerid
argument isn't supported by the equivalent API endpoint POST https://customer.cloudamqp.com/api/instances
as documented at https://docs.cloudamqp.com/, so until the API changes, it doesn't seem like any changes to this Terraform provider will help. :(
The backend API do support this, albeit is not documented yet. I've created https://github.com/cloudamqp/terraform-provider-cloudamqp/pull/123 to add the functionality to our provider. Please take a look and let me know if you have any feedback.
I have created a terraform-vpc-accepter rabbitmq instnace that has peerlinked enabled.
I am able to successfully dig and telnet to that instance from my VPC
When i create a new rabbitmq cluster via terraform, i need to be able to referance the VPC that already has peerlinking enabled. Entering the same CIDR results in a new VPC being created and not using the original peerlinked vpc