-
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_batch_pool
- support user_accounts
, data_disks
and etc properties
#18226
Conversation
nodeAgentSkuID := d.Get("node_agent_sku_id").(string) | ||
|
||
storageImageReferenceSet := d.Get("storage_image_reference").([]interface{}) | ||
imageReference, err := ExpandBatchPoolImageReference(storageImageReferenceSet) | ||
if err != nil { | ||
return fmt.Errorf("creating %s: %+v", id, err) | ||
} | ||
|
||
if imageReference != nil { | ||
// if an image reference ID is specified, the user wants use a custom image. This property is mutually exclusive with other properties. | ||
if imageReference.ID != nil && (imageReference.Offer != nil || imageReference.Publisher != nil || imageReference.Sku != nil || imageReference.Version != nil) { | ||
return fmt.Errorf("creating %s: Properties version, offer, publish cannot be defined when using a custom image id", id) | ||
} else if imageReference.ID == nil && (imageReference.Offer == nil || imageReference.Publisher == nil || imageReference.Sku == nil || imageReference.Version == nil) { | ||
return fmt.Errorf("creating %s: Properties version, offer, publish and sku are mandatory when not using a custom image", id) | ||
} | ||
} else { | ||
return fmt.Errorf("creating %s: image reference property can not be empty", id) | ||
} | ||
|
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 check logic is moved to expandBatchPoolVirtualMachineConfiguration in batch_pool.go
azurerm_batch_pool
- support user_accounts
, data_disks
and etc propertiesazurerm_batch_pool
- support user_accounts
, data_disks
and etc properties
This PR also fixes #18267 |
Co-authored-by: kt <[email protected]>
Thanks @katbyte for your review and feedbacks, here is the test result on the latest comments: |
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 @liuwuliuyun - LGTM 🚜
This functionality has been released in v3.23.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. |
azurerm_batch_pool
support following new properties/property blocks:data_disks
disk_encryption_configuration
extensions
inter_node_communication
license_type
node_placement_configuration
os_disk_placement_setting
windows_configuration
user_accounts
task_scheduling_policy
fixes #18267