-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provider/azurerm: Setting an optional field on Service Bus Topic #13223
provider/azurerm: Setting an optional field on Service Bus Topic #13223
Conversation
90c8f8c
to
2a3f162
Compare
Tests pass:
|
@@ -55,6 +55,7 @@ func resourceArmServiceBusTopic() *schema.Resource { | |||
"duplicate_detection_history_time_window": { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are not setting the default value? We are just getting it from Azure API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - unfortunately setting this to Optional: true, Default: "00:10:00"
leaves a diff in the Import test:
TF_ACC=1 go test ./builtin/providers/azurerm/ -v -run=TestAccAzureRMServiceBusTopic_import -timeout 120m
=== RUN TestAccAzureRMServiceBusTopic_importBasic
--- FAIL: TestAccAzureRMServiceBusTopic_importBasic (349.48s)
testing.go:280: Step 1 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) {
}
(map[string]string) (len=1) {
(string) (len=39) "duplicate_detection_history_time_window": (string) (len=8) "00:10:00"
}
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/builtin/providers/azurerm 349.497s
LGTM! |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The field
duplicate_detection_history_time_window
is defaulted at the API to00:10:00
Due a bug in the current version of the Azure SDK, this value wasn't being surfaced correctly, however we're going to need to make this optional by default
(also fixing the logging to output the error's)