Giter Site home page Giter Site logo

Imports are failing about pulumi-proxmoxve HOT 12 CLOSED

muhlba91 avatar muhlba91 commented on June 12, 2024
Imports are failing

from pulumi-proxmoxve.

Comments (12)

muhlba91 avatar muhlba91 commented on June 12, 2024 1

thank you for providing this update on upstream's response.
it's unfortunate to hear about this but i also understand that some features don't have priority - it's the same here. this is a personal project besides others which also take time commitments.


i wanted to take some time to elaborate on the choice i made back then.

  1. back when i planned for the provider, i initially planned to use https://github.com/Telmate/terraform-provider-proxmox.
    unfortunately, (at least back then) i was not able to get it working for my use case (cloud-init and some VM settings were not easily achievable). (note: this doesn't necessarily have to be true anymore.)

  2. then i found https://github.com/bpg/terraform-provider-proxmox which had a broader functionality (and still has), and supported my use cases in a very user friendly and easy to maintain manner. it still has some caveats for some particular use cases but those are minor and negligible for me.

  3. the last option i was eyeing with was making this provider native, meaning cutting out the terraform upstream and implementing all resources in a native way. the downsides are the work required, not being able to rely on a tested and used upstream provider, ongoing maintenance, and lack of knowledge on my side.
    this would also come with a reduced set of functionality - at least initially - geared towards my use cases, and dependent on implementation work necessary for any additional feature. even in that case, importing would not be my priority though.

hence, the choice was made towards https://github.com/bpg/terraform-provider-proxmox.


now, swapping upstream would introduce a major change and break in functionality, and reduce the exposed feature set. currently - and i'm sorry to say this - i don't see this as a viable option.

going forward if upstream doesn't implement this, i see (3) as the only option to have this supported within this provider in the future. i do lack time for this, and it would definitely not be high on my priority list to write a new provider (and support importing straight away). speaking openly though, i'm still eyeing with this idea for future developments.

alternatively, you can always spin off a new provider and plug in the other upstream. (i'm happy to support initially but will not take ownership or commitments, and maintenance towards that.)

from pulumi-proxmoxve.

bpg avatar bpg commented on June 12, 2024 1

Hi there!

Most of the resources (including proxmox_virtual_environment_vm) now support import functionality. Please check upstream provider's documentation for more details, resources with import support have Import section in their docs.

from pulumi-proxmoxve.

thomaswienecke avatar thomaswienecke commented on June 12, 2024

I'm also facing similar issues when trying to import existing configurations from my proxmox cluster.
Is this related to the workaround for the provider-configuration somehow?

I tried running

pulumi import proxmoxve:VM/virtualMachine:VirtualMachine Faraday 200 --provider=urn:pulumi:prod::pulum::pulumi:providers:proxmoxve::proxmoxve

where Faraday would be the name of my vm and 200 would be its vmId.

The response looks like that:

proxmoxve:VM:VirtualMachine (Faraday):
    error: Preview failed: refreshing urn:pulumi:prod::pulum::proxmoxve:VM/virtualMachine:VirtualMachine::Faraday: 1 error occurred:
        * received an HTTP 501 response - Reason: Method 'GET /nodes//qemu/200/config' not implemented

Is this even a supported feature?

from pulumi-proxmoxve.

BongoEADGC6 avatar BongoEADGC6 commented on June 12, 2024

@muhlba91 Any thoughts about this? Is this currently supported?

from pulumi-proxmoxve.

muhlba91 avatar muhlba91 commented on June 12, 2024

as @BongoEADGC6 noted the request to proxmox needs to contain the node.
this provider relies on the terraform upstream provider, and code generation is automated.

hence, this is not implemented and supported currently.
supporting this feature would need be implemented besides the automatically generated code, or the provider been rewritten natively for pulumi by not leveraging an already existing terraform provider.
currently i do not have any plans on supporting this but happy to accept PRs as long as they are working side by side with the autogeneration.

from pulumi-proxmoxve.

BongoEADGC6 avatar BongoEADGC6 commented on June 12, 2024

That's disappointing to hear as I noticed that the upstream Terraform module chosen for this provider decided they won't bother to support importing (bpg/terraform-provider-proxmox#29). However, the more popular Terraform module (https://github.com/Telmate/terraform-provider-proxmox) for proxmox supports all functions. Any thoughts on potentially swapping the upstream?

from pulumi-proxmoxve.

BongoEADGC6 avatar BongoEADGC6 commented on June 12, 2024

Does this Pulumi module now include this feature as well after having been updated to use upstream 0.31?

from pulumi-proxmoxve.

muhlba91 avatar muhlba91 commented on June 12, 2024

i just had a try with the following import.json:

{
    "nameTable": {
        "proxmoxve": "urn:pulumi:dev::pulumi-proxmoxve-test::pulumi:providers:proxmoxve::proxmoxve"
    },
    "resources": [
        {
            "type": "proxmoxve:VM/virtualMachine:VirtualMachine",
            "name": "vm-test-test.proxmox-dev",
            "id": "pve/102",
            "provider": "proxmoxve"
        }
    ]
}

importing seemed to work; however, some values/properties couldn't be fetched/appropriately filled and had to be adapted manually after the importing. a refresh seemed to have updated them though.

from pulumi-proxmoxve.

BongoEADGC6 avatar BongoEADGC6 commented on June 12, 2024

* strconv.Atoi: parsing "pve/102": invalid syntax

I'm receiving the above error using the same config as you provided with the urn of proxmox updated. Using Pulumi v3.85.0 and PVE 8.0.4.

What versions are you using?

from pulumi-proxmoxve.

muhlba91 avatar muhlba91 commented on June 12, 2024

all relevant versions are the following.

pulumi version: v3.85.0
pve: 8.0.4
@muhlba91/pulumi-proxmoxve: 5.11.1

from pulumi-proxmoxve.

muhlba91 avatar muhlba91 commented on June 12, 2024

@BongoEADGC6 take care with my example that my PVE host is named pve - hence, the "id": "pve/102" referring to my node and the vm id. if your PVE host is named differently, you also need to adapt that id.

from pulumi-proxmoxve.

BongoEADGC6 avatar BongoEADGC6 commented on June 12, 2024

After fixing my node_modules, things seem to be working now! Thanks for all of your help.

from pulumi-proxmoxve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.