Skip to content

Commit

Permalink
Fix bug where some rabbitmq config changes trigger erroneous mount re…
Browse files Browse the repository at this point in the history
…creation. (#1542)

* Fix bug where rabbitmq config changes deleted mount

* Update vault/resource_rabbitmq_secret_backend.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_rabbitmq_secret_backend.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_rabbitmq_secret_backend.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_rabbitmq_secret_backend.go

Co-authored-by: Ben Ash <[email protected]>

Co-authored-by: Ben Ash <[email protected]>
  • Loading branch information
jasonodonnell and benashz authored Jul 21, 2022
1 parent d6462e6 commit c2ae1a2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vault/resource_rabbitmq_secret_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,24 @@ func rabbitMQSecretBackendResource() *schema.Resource {
"connection_uri": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "Specifies the RabbitMQ connection URI.",
},
"username": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Sensitive: true,
Description: "Specifies the RabbitMQ management administrator username",
},
"password": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Sensitive: true,
Description: "Specifies the RabbitMQ management administrator password",
},
"verify_connection": {
Type: schema.TypeBool,
Optional: true,
Default: true,
ForceNew: true,
Description: "Specifies whether to verify connection URI, username, and password.",
},
"password_policy": {
Expand Down Expand Up @@ -197,7 +193,7 @@ func rabbitMQSecretBackendUpdate(d *schema.ResourceData, meta interface{}) error
log.Printf("[DEBUG] Updated lease TTLs for %q", path)
}
if d.HasChanges("connection_uri", "username", "password", "verify_connection", "username_template", "password_policy") {
log.Printf("[DEBUG] Updating connecion credentials at %q", path+"/config/connection")
log.Printf("[DEBUG] Updating connection credentials at %q", path+"/config/connection")
data := map[string]interface{}{
"connection_uri": d.Get("connection_uri").(string),
"username": d.Get("username").(string),
Expand Down

0 comments on commit c2ae1a2

Please sign in to comment.