Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added vhost, user and exchange datasources #37

Merged
merged 1 commit into from
Aug 20, 2022

Conversation

Skeen
Copy link

@Skeen Skeen commented Apr 27, 2022

Fixes #35

This PR introduces data sources for rabbitmq_user, rabbitmq_vhost and rabbitmq_exchange that can be used as such:

data "rabbitmq_user" "test" {
  name = "mctest"
}

data "rabbitmq_vhost" "vhost" {
  name = "my_vhost"
}

data "rabbitmq_exchange" "test" {
  name  = "test"
  vhost = data.rabbitmq_vhost.vhost.name
}

Corresponding with these resources:

resource "rabbitmq_user" "test" {
  name     = "mctest"
  password = "foobar"
  tags     = ["administrator", "management"]
}

resource "rabbitmq_vhost" "vhost" {
  name = "my_vhost"
}

resource "rabbitmq_exchange" "test" {
  name  = "test"
  vhost = rabbitmq_vhost.vhost.name

  settings {
    type        = "fanout"
    durable     = false
    auto_delete = true
  }
}

@taybin
Copy link

taybin commented Aug 19, 2022

Can we get this merged? Is there a problem with the PR?

Copy link
Owner

@cyrilgdn cyrilgdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on that, and sorry for the delay.

@cyrilgdn cyrilgdn merged commit 3302641 into cyrilgdn:master Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Data sources
3 participants