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

Cannot create a vdc with system default Sizing Policy (used as default compute policy) and VM Placement Policies #1216

Closed
carmine73 opened this issue Mar 4, 2024 · 0 comments · Fixed by #1313
Assignees

Comments

@carmine73
Copy link

carmine73 commented Mar 4, 2024

Terraform Version

$ terraform version 
Terraform v1.7.2
on linux_amd64
+ provider registry.terraform.io/vmware/vcd v3.11.0

Affected Resource(s)

  • vcd_org_vdc

Terraform Configuration Files

I can create a vdc not specifying vm policies:

resource "vcd_org_vdc" "vdc" {
  . . .
  default_compute_policy_id = null
  vm_placement_policy_ids   = []
  vm_sizing_policy_ids      = []
  vm_vgpu_policy_ids        = []
  . . .
}

vcd creates a vdc with a system default sizing policy (empty) used as:

default_compute_policy_id
default_vm_sizing_policy_id (deprecated)

Expected Behavior

Using the UI it is possible adding VM Placement Policies leaving the default_compute_policy_id and default_vm_sizing_policy_id (deprecated) untouched.
Using terraform, I cannot create a vdc with system default Sizing Policy (used as default compute policy) and VM Placement Policies, because I cannot specify the id of the system default Sizing Policy (known after apply) and cannot be null.
I think it should be possible to set system default Sizing Policy as default_compute_policy_id even when a placement policy is added to the vdc.

As a workaround I created a dummy/empty VM Sizing Policy on cloud director, I assign it to the vdc and set it as default compute policy, so I can set placement policies.

I've added a comment on the closed issue #1037 but I think it's better to open a new issue.

thanks

@carmine73 carmine73 changed the title Cannot create a vdc with system default Compute Policy (used as default compute policy) and VM Placement Policies Cannot create a vdc with system default Sizing Policy (used as default compute policy) and VM Placement Policies Mar 4, 2024
@adambarreiro adambarreiro self-assigned this Aug 29, 2024
adambarreiro added a commit that referenced this issue Sep 3, 2024
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

Successfully merging a pull request may close this issue.

2 participants