[PR #3661/58eb94ff backport][stable-4] lxd_container: support lxd instance types #3761
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.
This is a backport of PR #3661 as merged into main (58eb94f).
SUMMARY
This MR adds support to lxd_container module to deploy either containers or virtual-machines. For that it was necessary to create two new parameters
api_endpoint
andtype
:api_endpoint
: is required in order to be backwards compatible with old LXD servers, which does not support the new API endpoint/1.0/virtual-machines
or/1.0/instances
(implemented in lxd 3.19)type
: there is two different types of instances, “container” or “virtual-machine”It is related to:
It is a different approach of an open MR:
ISSUE TYPE
COMPONENT NAME
lxd_container
ADDITIONAL INFORMATION
The old functionality has not changed. Additionally I've tested the changes only with the latest LXD version 4.19.
container
tovirtual-machine
or vice-versa, it fails with a warning, otherwise I was only getting changed as status, which is not correct.