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

[FEATURE] Support resource import #25

Open
seanhoughton opened this issue May 5, 2020 · 1 comment · May be fixed by #29
Open

[FEATURE] Support resource import #25

seanhoughton opened this issue May 5, 2020 · 1 comment · May be fixed by #29
Labels
Milestone

Comments

@seanhoughton
Copy link

seanhoughton commented May 5, 2020

Is your feature request related to a problem? Please describe.

I would like to be able to import existing resources to aid in getting a matching config and to avoid having to re-image existing VMs to bring them under terraform management.

Describe the solution you'd like

The ability to import VM resources (and others)

Describe alternatives you've considered

The other ProxMox plugin supports imports, but it hasn't seen any active development so I'm considering using this one.

Additional context

I looked in to what it would take to support imports. Usually the resource can implement the "Importer" field using the included schema.ImportStatePassthrough identity function which sets the ID and relies on the resource read to populate the current state. However, because this plugin is using just the numerical ID to as the resource ID it's not possible to use the REST API with just the ID.

The other proxmox plugin uses a string containing both fields as a VM id, for example "host10/qemu/100" instead of just "100" which makes import easy.

@danitso-dp danitso-dp added this to the v0.5.0 milestone May 6, 2020
@danitso-dp
Copy link
Collaborator

Hi @seanhoughton

I've added this feature as part of the v0.5.0 milestone. I'll get back to you once initial support for this is available.

@seanhoughton seanhoughton linked a pull request May 18, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants