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
I've updated the libvirt provider from 0.7.6 to 0.8.1. Doing so, I noticed that the attribute path of libvirt_pool is now deprecated.
path
libvirt_pool
The documentation also shows that:
path - Deprecated (Optional) use path in the target block.
I then changed the source code to this:
resource "libvirt_pool" "this" { name = local.name type = "dir" target { path = join("/", [var.images_directory, local.name]) } }
Before that, it was:
resource "libvirt_pool" "this" { name = local.name type = "dir" path = join("/", [var.images_directory, local.name]) }
When I then ran terraform plan, I saw that it would destroy and recreate the pool:
terraform plan
-/+ resource "libvirt_pool" "this" { ~ allocation = 172974288896 -> (known after apply) ~ available = 5322446831616 -> (known after apply) ~ capacity = 5495421120512 -> (known after apply) ~ id = "bb50964a-48c8-4e1e-ada5-e000e7f29d27" -> (known after apply) name = "vtcl-qatestvm-zbl-110.domain.tld" - path = "/var/lib/libvirt/images/vtcl-qatestvm-zbl-110.domain.tld" -> null # forces replacement # (1 unchanged attribute hidden) + target { + path = "/var/lib/libvirt/images/vtcl-qatestvm-zbl-110.domain.tld" # forces replacement } }
This change cannot be performed, though. terraform apply fails:
terraform apply
… │ Error: error deleting storage pool: failed to remove pool '/var/lib/libvirt/images/vtcl-qatestvm-zbl-110.domain.tld': Directory not empty …
How to migrate to the new structure of libvirt_pool?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've updated the libvirt provider from 0.7.6 to 0.8.1. Doing so, I noticed that the attribute
path
oflibvirt_pool
is now deprecated.The documentation also shows that:
I then changed the source code to this:
Before that, it was:
When I then ran
terraform plan
, I saw that it would destroy and recreate the pool:This change cannot be performed, though.
terraform apply
fails:How to migrate to the new structure of
libvirt_pool
?The text was updated successfully, but these errors were encountered: