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

service_bus_queue: support for max_delivery_count #2028

Merged

Conversation

tkbky
Copy link
Contributor

@tkbky tkbky commented Oct 5, 2018

This change adds max_delivery_count to the service bus queue's schema so that it is configurable.

See #1977

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @tkbky

Thanks for this PR - I've taken a look through and this mostly LGTM - if we can fix up the test so the configuration is valid we can kick off the tests and get this merged :)

Thanks!

name = "acctestservicebusqueue-%d"
resource_group_name = "${azurerm_resource_group.test.name}"
namespace_name = "${azurerm_servicebus_namespace.test.name}"
maxDeliveryCount = 20
Copy link
Contributor

Choose a reason for hiding this comment

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

can we update this to max_delivery_count to match the schema field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

"max_delivery_count": {
Type: schema.TypeInt,
Optional: true,
Default: 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

out of interest where does this default value come from? (and if so, are there any validation requirements for this field?)

Copy link
Contributor Author

@tkbky tkbky Oct 5, 2018

Choose a reason for hiding this comment

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

It's coming from the doc over here, not sure about the validation requirements though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was able to set it to 999999999 but it does have to be at least 1 so we could go with validation.IntAtleast(1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@katbyte yes, having it to be at least 1 makes sense to me.

@tombuildsstuff tombuildsstuff added this to the Soon milestone Oct 5, 2018
@tkbky
Copy link
Contributor Author

tkbky commented Oct 5, 2018

@tombuildsstuff Thanks for reviewing the PR. I've made the requested changes.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

@tkbky,

I was just wondering if there was a reason you are not reading the value back in after setting it?

azurerm/resource_arm_servicebus_queue_test.go Show resolved Hide resolved
@tkbky
Copy link
Contributor Author

tkbky commented Oct 6, 2018

@katbyte It's my miss. Thanks for the catch. I've updated the PR to include the import check step, and include the max delivery count when read.

katbyte
katbyte previously requested changes Oct 9, 2018
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @tkbky,

Thanks for the updates, this LGTM now outside the travis CI build is failing and one minor formatting comment i've left inline. Once these are fixed we can get this merged 😃

func testAccAzureRMServiceBusQueue_maxDeliveryCount(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we align all the assignments in the TF code to match the other tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely. Sorry for not noticing the inconsistency.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @tkbky

Thanks for pushing those changes - this now LGTM 👍

Thanks!

@tombuildsstuff tombuildsstuff dismissed katbyte’s stale review October 10, 2018 02:37

dismissing since changes have been pushed

@tombuildsstuff tombuildsstuff modified the milestones: Soon, 1.17.0 Oct 10, 2018
@tombuildsstuff
Copy link
Contributor

Tests pass:

screenshot 2018-10-10 at 14 28 31

@tombuildsstuff tombuildsstuff merged commit 76389e3 into hashicorp:master Oct 10, 2018
tombuildsstuff added a commit that referenced this pull request Oct 10, 2018
tombuildsstuff added a commit that referenced this pull request Oct 10, 2018
@ghost
Copy link

ghost commented Mar 6, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants