Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I really like this provider and I appreciate the work you've done.
I've had issues with cloud-init and Q35 machines in the past, gave up on libvirt with Terraform for some time and then I've stumbled upon this issue: #1018
I've decided to make the changes mentioned by issue creator in my fork and it seemed to solve my issue.
I didn't want to blindly make it hard-coded for SATA though, that's why I'm proposing a parameter.
Basically, I think the most backwards compatible approach is to add a new field to the
libvirt_domain
resource, calledcloudinit_bus
. By default it will be set to"ide"
, but can be changed to"sata"
for Q35 machines (for example).I've added some basic acceptance tests, but I'm not proud of them - let's say that they are just to cover the lines.
I wanted to add some test that will verify that the VM will be recreated when the bus type is changed, but this project is not using the
terraform-plugin-test
module and I didn't want to bring it in immediately.If you think I should make some higher quality tests then let me know and maybe give me some tips - I'm fairly new to Go and especially to testing it, not even mentioning developing Terraform plugins.