Hi there,
Terraform v0.12.24
resource "vault_rabbitmq_secret_backend" "rabbitmq" {
connection_uri = "https://rabbitmq.endpoint"
username = var.rabbitmq_username
password = var.rabbitmq_password
}
resource "vault_rabbitmq_secret_backend_role" "role" {
backend = vault_rabbitmq_secret_backend.rabbitmq.path
name = "app"
tags = "app"
vhosts = "{\"/\": {\"write\":\".*\", \"read\": \".*\"}}"
}
An argument named "vhosts" is not expected here.
Need this argument to set permissions on the vhost, I've tried with vhost or vhosts but they're both not expected, in equivalent I did vault write rabbitmq/roles/app vhosts='{"/":{"write": ".*", "read": ".*"}}'
Followed the example referenced in the docs:
https://github.com/terraform-providers/terraform-provider-vault/blob/master/website/docs/r/rabbitmq_secret_backend_role.html.md
I just encountered this. The docs seems to have drifted from the schema.
I'm now passing vhosts in like this:
resource "vault_rabbitmq_secret_backend_role" "role" {
backend = vault_rabbitmq_secret_backend.rabbitmq.path
name = "app"
vhost {
host = "/"
configure = ".*"
write = ".*"
read = ".*"
}
}
Passing a vhost list would probably work as well.
Most helpful comment
I just encountered this. The docs seems to have drifted from the schema.
I'm now passing vhosts in like this:
Passing a
vhostlist would probably work as well.