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

azurerm_stream_analytics_function_javascript_udf - support new property is_configuration_parameter #16579

Merged
merged 2 commits into from
May 9, 2022

Conversation

neil-yechenwei
Copy link
Contributor

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)

Comment on lines 74 to 79

"is_configuration_parameter": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},
Copy link
Member

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

Suggested change
"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),

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei Apr 29, 2022

Choose a reason for hiding this comment

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

@stephybun ,

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?

Copy link
Collaborator

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?

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei May 5, 2022

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.

Copy link
Collaborator

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?

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei May 6, 2022

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.

Copy link
Member

@stephybun stephybun left a 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 👍

@stephybun stephybun merged commit 791c1f8 into hashicorp:main May 9, 2022
@github-actions github-actions bot added this to the v3.6.0 milestone May 9, 2022
stephybun added a commit that referenced this pull request May 9, 2022
@github-actions
Copy link

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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2022
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