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_batch_pool - support node_deallocation_method dynamic_vnet_assignment_scope source_port_ranges #18436

Merged
merged 12 commits into from
Oct 3, 2022

Conversation

liuwuliuyun
Copy link
Contributor

@liuwuliuyun liuwuliuyun commented Sep 19, 2022

Newly support properties:

source_port_ranges
dynamic_vnet_assignment_scope
node_deallocation_method
containter_settings

Update doc accrodingly.

@liuwuliuyun
Copy link
Contributor Author

image

@liuwuliuyun liuwuliuyun marked this pull request as ready for review September 20, 2022 05:29
@liuwuliuyun
Copy link
Contributor Author

These are the last missing properties in batch_pool, hope we could get it merged soon :)

internal/services/batch/batch_pool_resource.go Outdated Show resolved Hide resolved
@@ -83,6 +84,19 @@ func resourceBatchPool() *pluginsdk.Resource {
MaxItems: 1,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
// Property `node_deallocation_option` is set to be a writeOnly property by service team
// It can only perform on PUT operation and is not able to perform GET operation
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems like an API bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have consult with service team about this, they said this is by design a write only property and they are not going to change this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems like a weird choice but is what it is, we have an open issue to discuss that so not a blocker

website/docs/r/batch_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/d/batch_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/d/batch_pool.html.markdown Show resolved Hide resolved
@liuwuliuyun
Copy link
Contributor Author

I think we need additional discussion about node_deallocation_option property. I am also curious about how do we usually dealing with write-only property. Is there any best practice or example?

internal/services/batch/batch_pool_data_source.go Outdated Show resolved Hide resolved
internal/services/batch/batch_pool_resource.go Outdated Show resolved Hide resolved
@liuwuliuyun
Copy link
Contributor Author

liuwuliuyun commented Sep 30, 2022

Azure/azure-rest-api-specs#20948

Property node_deallocation_option is set to be a writeOnly property by service team. It can only perform on PUT operation and is not able to perform GET operation for now.

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.

LGTM 🌵

@@ -83,6 +84,19 @@ func resourceBatchPool() *pluginsdk.Resource {
MaxItems: 1,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
// Property `node_deallocation_option` is set to be a writeOnly property by service team
// It can only perform on PUT operation and is not able to perform GET operation
Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems like a weird choice but is what it is, we have an open issue to discuss that so not a blocker

@katbyte katbyte changed the title azurerm_batch_pool - support four new properties. azurerm_batch_pool - support node_deallocation_method dynamic_vnet_assignment_scope source_port_ranges Oct 3, 2022
@katbyte katbyte merged commit c1735ae into hashicorp:main Oct 3, 2022
@github-actions github-actions bot added this to the v3.26.0 milestone Oct 3, 2022
katbyte added a commit that referenced this pull request Oct 3, 2022
@liuwuliuyun liuwuliuyun deleted the batch_3 branch October 10, 2022 02:37
@github-actions
Copy link

This functionality has been released in v3.26.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 Nov 11, 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.

3 participants