cyrilgdn / terraform-provider-rabbitmq

Terraform RabbitMQ provider
https://www.terraform.io/docs/providers/rabbitmq/
Mozilla Public License 2.0
45 stars 36 forks source link

401 Unauthorized with CloudAMQP RabbitMQ instance #46

Open dpellier opened 1 year ago

dpellier commented 1 year ago

Hi,

I'm unable to interact with a CloudAMQP RabbitMQ instance, every resource return a 401 Unauthorized response.

I've double checked the user used on provider configuration and it has administrator rights on the RabbitMQ. I've also tried to call directly the AMQP API using Postman with Basic Authentication and it works. (I've also tried with proxy and insecure param but it doesn't change anything)

Am I missing something or is this provider not compatible with CloudAMQP RabbitMQ instance ?

Terraform Version

Terraform v1.3.9 + provider registry.terraform.io/cyrilgdn/rabbitmq v1.7.0

Affected Resource(s)

rabbitmq_*

Terraform Configuration Files

provider "rabbitmq" {
  endpoint = "https://xxxxxx.rmq3.cloudamqp.com"
  password = "xxxxx"
  username = "xxxxx"
}

resource "rabbitmq_vhost" "vhost_tf_test" {
  name = "vhost_tf_test"
}

Debug Output

https://gist.github.com/dpellier/d499a493f1805996eca3068b1b3ed5b9

Expected Behavior

vhost should have been created

Actual Behavior

A 401 Unauthorized response is returned

Steps to Reproduce

terraform apply

ashuraits commented 1 year ago

+1, sometimes it works and sometimes not, without any changes

fermentfan commented 10 months ago

I may be late to the party, but I am facing the same issue. Have you found out what's going on there?

fermentfan commented 10 months ago

Ok I think I found out what's the problem on my side. I am using a free shared instance at CloudAMQP which does not allow the creation of users, vhosts & permissions.

https://www.cloudamqp.com/plans.html

Seems like they then throw a 401.