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

Commit

Permalink
Merge pull request #53 from terraform-providers/queue-settings-forcenew
Browse files Browse the repository at this point in the history
rabbitmq_queue: Set ForceNew on all attributes
  • Loading branch information
cyrilgdn authored Feb 21, 2020
2 parents 9c2e1c5 + 3df07d3 commit c34b0a4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rabbitmq/resource_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ func resourceQueue() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
},

"auto_delete": {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
},

"arguments": {
Expand Down
30 changes: 30 additions & 0 deletions rabbitmq/resource_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func TestAccQueue_basic(t *testing.T) {
"rabbitmq_queue.test", &queueInfo,
),
},
{
Config: testAccQueueConfig_update,
Check: testAccQueueCheck(
"rabbitmq_queue.test", &queueInfo,
),
},
},
})
}
Expand Down Expand Up @@ -147,6 +153,30 @@ resource "rabbitmq_queue" "test" {
}
}`

const testAccQueueConfig_update = `
resource "rabbitmq_vhost" "test" {
name = "test"
}
resource "rabbitmq_permissions" "guest" {
user = "guest"
vhost = "${rabbitmq_vhost.test.name}"
permissions {
configure = ".*"
write = ".*"
read = ".*"
}
}
resource "rabbitmq_queue" "test" {
name = "test"
vhost = "${rabbitmq_permissions.guest.vhost}"
settings {
durable = true
auto_delete = false
}
}`

func testAccQueueConfig_jsonArguments(j string) string {
return fmt.Sprintf(`
variable "arguments" {
Expand Down

0 comments on commit c34b0a4

Please sign in to comment.