Introduce source_pif_device
(replacement for pif_id
) to better match TF's mental model fix import issues
#260
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 PR introduce a
source_pif_device
argument (replacement forpif_id
) to thexenorchestra_network
resource to better match Terraform's mental model and fix the import issues reported in #257.The issue with the previous resource was that the
pif_id
could not be determined once a network was created (a network's PIFs change as hosts are added to the pool). Rather than directly expose what the XO api requires (a pif id), this PR adds a "source device" argument, which can always be determined even after a network was created. In addition to fixing #257, this means that if a network wasterraform destroy && terraform apply
ed the network would be recreated properly.Testing done