bpg/terraform-provider-proxmox

Enable terraform import

Closed this issue · 6 comments

Hey there!
First of all nice work and thx for keeping this project alive!

I am using packer to create templates for my vms and it would be amazing, if it was possible, to import these templates into my terraform state. Therefore I wanted to ask if it was possible to add the terraform import functionality to this provider.
Another option could be to create a data resource for vms.

Thanks a lot!

bpg commented

Hey @Soras2919!

I appreciate your feedback! I took a quick pick at the spec: https://www.terraform.io/docs/extend/resources/import.html and it looks like the implementation would require quite a bit of work.

I'm using this provider for my hobby projects, and I have no particular interest in the import functionality, so that's unlikely I will have time to pull that by myself.

VM data source seems to be doable though, let me see into this.

Cheers,
@bpg

Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

are there any plans to add the import functionality?

bpg commented

Hi @pescobar! 👋🏼
No, I don't have plans of adding this at the moment. But I'll reopen this ticket to collect more feedback from the community, and perhaps someone could contribute implementation of this feature.

In a meantime, would some minimalistic datasource(s) would be enough to unblock you, e.g. if you need to read just a few attributes of a PVE resource? There was a similar case before: #261

Thanks for the kind reply @bpg . No worries, no need to invest any time on adding extra datasources.

Was pretty simple, added a bunch of resources as a part of #390