-
Notifications
You must be signed in to change notification settings - Fork 4.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
azurerm_stream_analytics_function_javascript_udf - support new property is_configuration_parameter #16579
Conversation
…ty is_configuration_parameter
|
||
"is_configuration_parameter": { | ||
Type: pluginsdk.TypeBool, | ||
Optional: true, | ||
Default: false, | ||
}, |
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.
I'm wondering whether this might be better as it's own block
"is_configuration_parameter": { | |
Type: pluginsdk.TypeBool, | |
Optional: true, | |
Default: false, | |
}, | |
"configuration_parameter": { | |
Type: pluginsdk.TypeList, | |
Required: true, | |
MinItems: 1, | |
Elem: &pluginsdk.Resource{ | |
Schema: map[string]*pluginsdk.Schema{ | |
"type": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
ValidateFunc: validation.StringInSlice([]string{ | |
"any", | |
"datetime", | |
"array", | |
"bigint", | |
"float", | |
"nvarchar(max)", | |
"record", | |
}, false), |
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.
In the future, if service team expands the sub properties of the root property "FunctionInput", then we have to maintain two blocks and append these same sub properties in these two blocks.
And if service team expands new types of FunctionInput via introducing new sub properties, then we have to maintain more blocks for them.
So based on above reasons, I assume it would increase the cost of maintanence. Hence, I assume it's better to align with service api.
Does it make sense?
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.
Is there any different between a configuration and non configuration input parameter?
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.
@katbyte , There is no difference between them. I assume if there is difference between them, it's proper to split them into two blocks. But for this case, as there is no difference between them, I suggest keep them in one block to align with service api. Does it make sense? If I am wrong, please correct me. Thanks.
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.
this makes sense, however it is quite an odd name. A single block sounds good but could we change the property name to configuration_parameter
, making an exception for bools as is really stands out as wrong to me. WDYT?
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.
@katbyte , Updated property name from is_configuration_parameter
to configuration_parameter
.
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.
Thanks @neil-yechenwei, LGTM 👍
This functionality has been released in v3.6.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR is to support new property is_configuration_parameter.
--- PASS: TestAccStreamAnalyticsFunctionJavaScriptUDF_basic (239.56s)
--- PASS: TestAccStreamAnalyticsFunctionJavaScriptUDF_requiresImport (274.65s)
--- PASS: TestAccStreamAnalyticsFunctionJavaScriptUDF_isConfigurationParameter (354.59s)
--- PASS: TestAccStreamAnalyticsFunctionJavaScriptUDF_inputs (364.07s)