You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "vishesh92 (via GitHub)" <gi...@apache.org> on 2025/08/26 08:22:51 UTC
[PR] Add disk_offering & override_disk_offering to instance resource [cloudstack-terraform-provider]
vishesh92 opened a new pull request, #208:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/208
Fixes https://github.com/apache/cloudstack-terraform-provider/issues/68
Changes in these fields is ignored as of now.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add disk_offering & override_disk_offering to instance resource [cloudstack-terraform-provider]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add disk_offering & override_disk_offering to instance resource [cloudstack-terraform-provider]
Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala merged PR #208:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/208
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org