azurerm_batch_pool - add support for bind_mount property#32000
azurerm_batch_pool - add support for bind_mount property#32000LingyuTang wants to merge 15 commits intohashicorp:mainfrom
azurerm_batch_pool - add support for bind_mount property#32000Conversation
azurerm_batch_pool - support for host_batch_bind_mounts property
azurerm_batch_pool - support for host_batch_bind_mounts propertyazurerm_batch_pool - support for host_batch_bind_mounts property
liuwuliuyun
left a comment
There was a problem hiding this comment.
Left some comments, thanks~
…atchHostBindMounts-in-azurerm_batch_pool
azurerm_batch_pool - support for host_batch_bind_mounts propertyazurerm_batch_pool - support for host_directory_mount property
azurerm_batch_pool - support for host_directory_mount propertyazurerm_batch_pool - support for host_directory_mount property
azurerm_batch_pool - support for host_directory_mount propertyazurerm_batch_pool - support for host_batch_bind_mounts property
azurerm_batch_pool - support for host_batch_bind_mounts propertyazurerm_batch_pool - support for host_directory_mount property
|
Hey @liuwuliuyun thanks for reviewing. I have made the changes based on your above comments and test result. Let me know if further actions needed. |
|
Hey @liuwuliuyun , thanks for reviewing. I have made below changes:
|
liuwuliuyun
left a comment
There was a problem hiding this comment.
Hi @LingyuTang , the PR looks good to me know. Before you ask for another reviewer, could you help to address the linter issue in the pipeline? Thanks
…ounts-in-azurerm_batch_pool
|
Hey @magodo, thanks for reviewing this. I have updated branch as discussed - remove one of the repetitive |
magodo
left a comment
There was a problem hiding this comment.
Thanks for this PR!
I have left some additional mostly minor comments that once addressed this should be good to merge 👍
| if containerConfiguration, err := ExpandBatchPoolContainerConfiguration(v.([]interface{})); err == nil { | ||
| parameters.Properties.DeploymentConfiguration.VirtualMachineConfiguration.ContainerConfiguration = containerConfiguration | ||
| } else { | ||
| return fmt.Errorf("expanding `container_configuration` for %s: %+v", *id, err) | ||
| } |
There was a problem hiding this comment.
Can we reorder this like below:
| if containerConfiguration, err := ExpandBatchPoolContainerConfiguration(v.([]interface{})); err == nil { | |
| parameters.Properties.DeploymentConfiguration.VirtualMachineConfiguration.ContainerConfiguration = containerConfiguration | |
| } else { | |
| return fmt.Errorf("expanding `container_configuration` for %s: %+v", *id, err) | |
| } | |
| containerConfiguration, err := ExpandBatchPoolContainerConfiguration(v.([]interface{})) | |
| if err != nil { | |
| return fmt.Errorf("expanding `container_configuration` for %s: %+v", *id, err) | |
| } | |
| parameters.Properties.DeploymentConfiguration.VirtualMachineConfiguration.ContainerConfiguration = containerConfiguration |
There was a problem hiding this comment.
Thanks for the suggestion and I have changed the order as you suggested. Just out of curiosity, can I ask why this is preferred over the original one?
There was a problem hiding this comment.
Go's convention is to avoid if ... else ....
|
This PR is now ready for review. |
Community Note
Description
This PR is to support the property host_batch_bind_mounts.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_batch_pool- add support for thehost_batch_bind_mountspropertyThis is a (please select all that apply):
Related Issue(s)
Fixes #0000
AI Assistance Disclosure
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.