We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Removing a disk from VM Template in terraform doesn't generate one.template.update in ONe, only a one.template.info request for the diff as there's no if d.HasChange("disk") condition in https://github.com/OpenNebula/terraform-provider-opennebula/blob/master/opennebula/resource_opennebula_template.go#L541C67-L541C67
one.template.update
one.template.info
if d.HasChange("disk")
Terraform v1.5.1 on darwin_arm64
opennebula_template
resource "opennebula_template" "instance-template" { name = var.instance_template_name cpu = var.cpu vcpu = var.vcpu memory = var.memory_gb * 1024 permissions = "660" sched_requirements = var.cluster_id context = { AXC_VMTYPE = "cf" DNS = var.dns DNS_HOSTNAME = "YES" NETWORK = "YES" REPORT_READY = "YES" SEARCH_DOMAIN = var.search_domain START_SCRIPT_BASE64 = var.start_script_base64 TOKEN = "YES" } cpumodel { model = "IvyBridge-IBRS" } disk { dev_prefix = "sd" discard = "unmap" image_id = 11 size = 20480 } features { guest_agent = "YES" virtio_scsi_queues = "3" } os { arch = "x86_64" boot = "" } raw { data = "<console/>" type = "kvm" } graphics { listen = "0.0.0.0" type = "VNC" } nic { network_id = var.network_id security_groups = [ 0, ] } }
only 20G disk should exist, any other disks in this template should be deleted:
# module.instance-template["cf"].opennebula_template.instance-template will be updated in-place ~ resource "opennebula_template" "instance-template" { id = "70" name = "cf" # (13 unchanged attributes hidden) - disk { - cache = "writeback" -> null - dev_prefix = "sd" -> null - discard = "unmap" -> null - image_id = -1 -> null - size = 358400 -> null - volatile_format = "raw" -> null - volatile_type = "fs" -> null } # (7 unchanged blocks hidden) }
Apply completes successfully, reporting template change:
and Disk deletion does not take effect in ONe interface:
create Template with 2 disks or more, then delete one disk from terraform code and see if it takes effect in ONe console
No response
The text was updated successfully, but these errors were encountered:
Same for nic section
nic
Sorry, something went wrong.
I confirm, same problem. Provider version 1.3, 1.2.2. Terraform version 1.6.4, 1.5.7
B #491: template: add disk and nic update
a08b456
f28c04a
7ee1581
c69a462
treywelsh
Successfully merging a pull request may close this issue.
Description
Removing a disk from VM Template in terraform doesn't generate
one.template.update
in ONe, only aone.template.info
request for the diff as there's noif d.HasChange("disk")
condition in https://github.com/OpenNebula/terraform-provider-opennebula/blob/master/opennebula/resource_opennebula_template.go#L541C67-L541C67Terraform and Provider version
Terraform v1.5.1
on darwin_arm64
Affected resources and data sources
opennebula_template
Terraform configuration
Expected behavior
only 20G disk should exist, any other disks in this template should be deleted:
Actual behavior
Apply completes successfully, reporting template change:
![image](https://private-user-images.githubusercontent.com/112185602/272073255-763d0dd7-3d17-4bbe-8ebc-645d89d35abf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzAyMjYsIm5iZiI6MTczOTEyOTkyNiwicGF0aCI6Ii8xMTIxODU2MDIvMjcyMDczMjU1LTc2M2QwZGQ3LTNkMTctNGJiZS04ZWJjLTY0NWQ4OWQzNWFiZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxOTM4NDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zODAzYjc2YTQyZDRjYTE0N2ZlYWM4MzY1N2UyNGU4MGUwNjVjZDkxYWNhZjJiM2Q1Mzk0MWNjNDQ5ZTkyZTMzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CBJUp8Xgjq6E9hZZuF_9ZOQVZK3rUW3HV7V-YtGICSw)
and Disk deletion does not take effect in ONe interface:
![image](https://private-user-images.githubusercontent.com/112185602/272073413-80e4f716-88d1-4d8e-9ead-97f28a39afa8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzAyMjYsIm5iZiI6MTczOTEyOTkyNiwicGF0aCI6Ii8xMTIxODU2MDIvMjcyMDczNDEzLTgwZTRmNzE2LTg4ZDEtNGQ4ZS05ZWFkLTk3ZjI4YTM5YWZhOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxOTM4NDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYjE1NjZiNzk2ZGVkNjM5NTYxZDE3NzQxNGQ2Y2Y4NWZlNjQ1YTcwOWQxMzhlY2NlOWVjYzVmMmZkMzk5YTI4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.imLAqdU2mAWh_445_YQjFvob9OkyWaky0dH_w5F-5dw)
Steps to Reproduce
create Template with 2 disks or more, then delete one disk from terraform code and see if it takes effect in ONe console
Debug output
No response
Panic output
No response
Important factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: