@abhishekreddy481 wrote:
Hi Terraform Team,
We are using an older Terraform version 0.98 to provision the openstack VM hosts. We built the instances 2 year ago and we changed the VM’s memory and cpu configuration from the VM end.
Now the TF plan is showing change to the existing host volumes and one 1 host destroy.
Here is the code related to volume we defined.
resource “openstack_blockstorage_volume_v1” “volume” {
count = “{var.count}" name = "{var.sid}-{var.app_type}-vol-{count.index + 1}”
region = “nova”
size = “${var.vol_size}”
}resource “openstack_compute_instance_v2” “vm” {
count = “{var.count}" name = "{format(“sap%s%s%s%03d”, var.sid, lookup(var.hostname, var.app_type), var.system_role, count.index + 1)}”
region = “nova”
image_name = “{var.image}" flavor_name = "{var.flavor}”
key_pair = “cloud-user”
user_data = “{data.template_cloudinit_config.user_data.*.rendered[count.index]}" security_groups = ["{var.security_groups}”]Please find the attached TF plan.
We are getting as volumes
"volume": [DEPRECATED] Use block_device or openstack_compute_volume_attach_v2 instead
Kindly review the TF plan and help in understand why TF is showing Deprecated vol warnings and changing the volumes & destroying the one host.
Please suggest how to fix this and should i have to do terraform import of the volume ids ?
Terraform plan output.txt (12.9 KB)
Posts: 1
Participants: 1