Skip to content
New issue

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

Introduce source_pif_device (replacement for pif_id) to better match TF's mental model fix import issues #260

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

ddelnano
Copy link
Collaborator

@ddelnano ddelnano commented Sep 16, 2023

This PR introduce a source_pif_device argument (replacement for pif_id) to the xenorchestra_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 was terraform destroy && terraform applyed the network would be recreated properly.

Testing done

Signed-off-by: Dom Del Nano <[email protected]>
@ddelnano ddelnano merged commit 7a13658 into master Sep 26, 2023
3 checks passed
@ddelnano ddelnano deleted the ddelnano/fix-network-resource-import-issues branch September 26, 2023 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant