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

Add Override root disk offering and Disk Offerings to cloudstack_instance Resource #68

Open
jb2592 opened this issue Aug 8, 2023 · 2 comments
Assignees
Milestone

Comments

@jb2592
Copy link

jb2592 commented Aug 8, 2023

It would be useful to be able to override the root disk offering as part of the compute offering and specify a disk offering as part of the cloudstack_instance resource just like you can via the UI.

Select a Compute Offering
Enable Override root disk offering
Select a disk offering via name or ID from the list available.

@rohityadavcloud rohityadavcloud added this to the v0.5.0 milestone Sep 12, 2023
@kiranchavala
Copy link
Collaborator

@vishesh92

We need to add the parameter "overridediskofferingid" to the resource cloudstack_instance

https://cloudstack.apache.org/api/apidocs-4.19/apis/deployVirtualMachine.html

https://github.com/apache/cloudstack-terraform-provider/blob/main/cloudstack/resource_cloudstack_instance.go

https://github.com/apache/cloudstack-go/blob/main/cloudstack/VirtualMachineService.go#L40

When I added the following code and try to build it locally getting the following exception

"overridediskofferingid": {
				Type:     schema.TypeString,
				Optional: true,
			},
			

if overridediskofferingid, ok := d.GetOk("overridediskofferingid"); ok {
		p.SetOverridediskofferingid(overridediskofferingid.(string))
	}

cloudstack-terraform-provider git:(add-overridediskofferingid) ✗ go build
# github.com/terraform-providers/terraform-provider-cloudstack/cloudstack
cloudstack/resource_cloudstack_instance.go:291:5: p.SetOverridediskofferingid undefined (type *"github.com/apache/cloudstack-go/v2/cloudstack".DeployVirtualMachineParams has no field or method SetOverridediskofferingid)

@vishesh92 vishesh92 modified the milestones: v0.5.0, v0.6.0 Mar 6, 2024
@vishesh92
Copy link
Member

Had a discussion with @kiranchavala. This requires go SDK to be upgraded. Changed the milestone to v0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants