port-labs / pulumi-port

Pulumi Port provider
https://www.pulumi.com/registry/packages/port/
Apache License 2.0
9 stars 3 forks source link

Clarification on Support for Importing Port Blueprints #370

Open phalbert opened 2 months ago

phalbert commented 2 months ago

I'm trying to import an existing Port Blueprint into my Pulumi project using the pulumi import command. However, I'm encountering errors during the import process. Specifically, when running the following command:

pulumi import port:index/blueprint:Blueprint teamBlueprint _team

I'm getting the following error:

error: Preview failed: cannot encode resource inputs to call ValidateResourceConfig: objectEncoder failed on property "properties": objectEncoder failed on property "string_props": encMap failed on {[]}

My Terraform configuration for this Blueprint is:

terraform {
  required_providers {
    port = {
      source  = "port-labs/port-labs"
      version = "~> 2.0.0"
    }
  }

}

resource "port_blueprint" "teamBlueprint" {
  title       = "Team"
  identifier  = "_team"
  description = "This blueprint is synced with Port teams"
  icon        = "Team"
  properties = {
    string_props = {
      "description" = {
        title = "Description"
      }
    }
  }
}

Questions:

Additional Information:

Pulumi Version: 3.28.1 pulumi-port Provider Version: v2.0.10 Blueprint Type: teamBlueprint Blueprint Identifier: _team

phalbert commented 2 months ago

@dirien

dirien commented 1 month ago

Hey @phalbert,

I could recreate the issue and created a issue in our repo here: https://github.com/pulumi/pulumi-terraform-bridge/issues/2219

Normally, importing of resources is fully supported in Pulumi and I think this needs to be evaluated from our engineering team.

phalbert commented 1 month ago

Thank you @dirien. I will await your feedback then