terraform-provider-vultr
terraform-provider-vultr copied to clipboard
allow attaching block off instances
Description
This PR will allow you to attach block storage from instances. This works well but does cause a little bit of drift but gets cleaned up on a apply
or refresh
. We will need to update the docs saying that this can be a bit drifty and it may be recommended to only use this if you must and if you do to ignore the attached_instance_to
field on block.
Here is an example tf
resource "vultr_block_storage" "my_blockstorage" {
size_gb = 10
region = "ewr"
}
resource "vultr_block_storage" "bs2" {
size_gb = 10
region = "ewr"
}
resource "vultr_block_storage" "bs3" {
size_gb = 10
region = "ewr"
}
resource "vultr_instance" "prod-1" {
region = "ewr"
plan = "vhf-1c-2gb"
os_id = 167
block_storage_ids = [vultr_block_storage.bs2.id]
}
Once we test this a bit more I'll update the docs portion for instances
Related Issues
#176
Checklist:
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [x] Have you linted your code locally prior to submission?
- [x] Have you successfully ran tests with your changes locally?
@optik-aper Please remove me from reviewers on this 🙏🏻