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

LXC: Remove Device IDs #102

Merged
merged 2 commits into from
Oct 14, 2019
Merged

LXC: Remove Device IDs #102

merged 2 commits into from
Oct 14, 2019

Conversation

in0rdr
Copy link
Contributor

@in0rdr in0rdr commented Oct 14, 2019

It is impossible to create LXC containers with more than one network interface, because the code of the Terraform provider includes the device id in the request to the PVE API. The API, however, does not accept such a parameter (id).

This change fixes that issue, such that containers with multiple network devices can be created.

This change removes the device ids as discussed in #98.

The question remains, why ids for devices (network, disk, etc) need to be specified by Terraform users in the first place. Since I relied on DevicesSetToMap to parse the device configuration, this fix pursues the following approach:

  • remove device IDs from the Terraform schema.Set
  • add the IDs whenever needed to use DevicesSetToMap (AddIds)
  • for API requests, make sure the the device configuration does not contain the ID (DevicesSetToMapWithoutId, RemoveIds)

@in0rdr in0rdr mentioned this pull request Oct 14, 2019
@ggongaware ggongaware merged commit 05fe0fb into Telmate:master Oct 14, 2019
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.

None yet

2 participants