Copilot commented on code in PR #208: URL: https://github.com/apache/cloudstack-terraform-provider/pull/208#discussion_r2300210072
########## cloudstack/resource_cloudstack_instance.go: ########## @@ -502,6 +534,7 @@ func resourceCloudStackInstanceRead(d *schema.ResourceData, meta interface{}) er d.Set("tags", tagsToMap(vm.Tags)) setValueOrID(d, "service_offering", vm.Serviceofferingname, vm.Serviceofferingid) + setValueOrID(d, "disk_offering", vm.Diskofferingname, vm.Diskofferingid) Review Comment: The `override_disk_offering` field is not being set in the read function, which means its value won't be persisted in the Terraform state. This could cause drift detection issues and inconsistent state management. ```suggestion setValueOrID(d, "disk_offering", vm.Diskofferingname, vm.Diskofferingid) // Set override_disk_offering if present if v, ok := d.GetOk("override_disk_offering"); ok { d.Set("override_disk_offering", v) } ``` ########## website/docs/r/instance.html.markdown: ########## @@ -34,6 +34,18 @@ The following arguments are supported: * `service_offering` - (Required) The name or ID of the service offering used for this instance. +* `disk_offering` - (Optional) The name or ID of the disk offering for the virtual machine. + If the template is of ISO format, the disk offering is for the root disk volume. + Otherwise this parameter is used to indicate the offering for the data disk volume. + If the template parameter passed is from a Template object, the disk offering refers + to a DATA Disk Volume created. If the template parameter passed is from an ISO object, + the disk offering refers to a ROOT Disk Volume created. + +* `override_disk_offering` - (Optional) The name or ID of the disk offering for the virtual + machine to be used for root volume instead of the disk offering mapped in service offering. + In case of virtual machine deploying from ISO, then the diskOffering specified for root Review Comment: Inconsistent capitalization of 'diskOffering' - should be 'disk offering' to match the rest of the documentation style. ```suggestion In case of virtual machine deploying from ISO, then the disk offering specified for root ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org