Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

rabbitmq_permissions: Fix error on empty permissions. #52

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

cyrilgdn
Copy link
Contributor

We want to be able to create permissions for a user with no permissions.

e.g:


resource "rabbitmq_permissions" "readonly" {
  user  = "test"
  vhost = "/"

  permissions {
    configure = ""
    write     = ""
    read      = ""
  }
}

When putting only empty string, Terraform puts nil in the list of permissions object
instead of a map with 3 empty strings.

fix #42

We want to be able to create permissions for a user with no permissions.
e.g:

```

resource "rabbitmq_permissions" "readonly" {
  user  = "test"
  vhost = "/"

  permissions {
    configure = ""
    write     = ""
    read      = ""
  }
}
```

When putting only empty string, Terraform puts nil in the list of permissions object
instead of a map with 3 empty strings.

fix #42
@ghost ghost added size/S and removed size/M labels Feb 10, 2020
@aminueza
Copy link
Contributor

I've tested the changes and it's working perfectly. You can merge this PR. Thank you @cyrilgdn.

@cyrilgdn
Copy link
Contributor Author

@aminueza Thanks a lot for your time on this review 👍

@cyrilgdn cyrilgdn merged commit 9c2e1c5 into master Feb 11, 2020
@cyrilgdn cyrilgdn deleted the empty-permissions branch February 11, 2020 07:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to parse permissions with empty string
2 participants