terraform-provider-rabbitmq icon indicating copy to clipboard operation
terraform-provider-rabbitmq copied to clipboard

Feature Request: Ability to target different Management API endpoints per resource

Open floge07 opened this issue 1 year ago • 0 comments

The current configuration of the management server happens via the provider block. Because of technical limitations of Terraform, the providers can only ever be static.

This is not usable for our use-case, where we have lots of dynamic rabbitmq servers via cloudamqp.

Would it be possible to create a configuration method, which would allow us to target multiple/different Management APIs in the same terraform runtime? Something like this would work for us:

resource "rabbitmq_policy" "message_ttl" {
  for_each = x

  management = {
      endpoint = each.value.host
      username = each.value.username
      password = each.value.password
  }

  name  = "MessageTTL"
  vhost = "/"

  policy {
    ...
  }
}

floge07 avatar Jun 13 '23 16:06 floge07