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

vcd_vapp_vm: Update for storage_profile is missing #546

Closed
NilsBusche opened this issue Aug 18, 2020 · 2 comments
Closed

vcd_vapp_vm: Update for storage_profile is missing #546

NilsBusche opened this issue Aug 18, 2020 · 2 comments
Assignees

Comments

@NilsBusche
Copy link
Contributor

Terraform Version

Terraform v0.12.29
terraform-provider-vcd_v2.9.0_x4

Affected Resource(s)

  • vcd_vapp_vm

Terraform Configuration Files

resource "vcd_vapp_vm" "instance" {
  vapp_name       = vcd_vapp.vapp.id == "always-not-equal" ? null : var.hostname
  name            = var.hostname
  computer_name   = var.hostname
  
  [...]

  storage_profile = "profile-1"

  [...]

}

Debug Output

2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] [VM update] started with lock
2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] Locking "***"
2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] Locked "***"
2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] [VM update] started without lock
2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] [VM update] checking if only field 'network_dhcp_wait_seconds' has change during update
2020-08-18T12:08:22.999+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:22 [DEBUG] [VM update] field 'storage_profile' has change
2020-08-18T12:08:26.317+0200 [DEBUG] plugin.terraform-provider-vcd_v2.9.0_x4: 2020/08/18 12:08:26 [DEBUG] [VM update] finished

Expected Behavior

If you change storage_profile this should update the storage profile of your VM in vCloud Director

Actual Behavior

terraform apply succeeds with Apply complete but nothing has changed in the real infrastructure. If you run terraform apply again, you will see the same behaviour again and again.

Furthermore you can specify a value for storage_profile which is not existent on your vCloud Director platform and terraform apply will still succeed without errors.

I think the update functionality for storage_profile might be completely missing at the moment. In the debug output you can see, that change is recognized but nothing is triggered then.

Steps to Reproduce

  1. terraform apply
  2. Change storage_profile
  3. terraform apply
@vbauzys
Copy link
Contributor

vbauzys commented Aug 19, 2020

Looked at the code - only create uses storage_profile.

@vbauzys
Copy link
Contributor

vbauzys commented Nov 10, 2020

fixed and will be released in 3.1 version

@vbauzys vbauzys closed this as completed Nov 10, 2020
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

2 participants