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

provider does not support importing resources #1300

Open
chainlink opened this issue Jun 5, 2024 · 2 comments
Open

provider does not support importing resources #1300

chainlink opened this issue Jun 5, 2024 · 2 comments
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/enhancement Improvements or new features

Comments

@chainlink
Copy link

chainlink commented Jun 5, 2024

What happened?

Attempting to import a resource created using the awsx module.

Example

pulumi import awsx:ecr/Repository:repository backend-repo backend-repo-f0dd567

reports error

Preview failed: provider does not support importing resources; please try updating the 'awsx' plugin

Output of pulumi about

Version      3.113.3
Go Version   go1.22.2
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.38.1
resource  awsx        2.9.0
resource  docker      4.5.4
resource  eks         2.3.0
resource  kubernetes  4.13.1
language  python      unknown

Host     
OS       darwin
Version  14.5
Arch     arm64

This project is written in python: executable='/Users/kyle/mzai/mzai-platform/infra/ci/venv/bin/python3' version='3.9.7'


TYPE                           URN
pulumi:pulumi:Stack            urn:pulumi:dev-ci::pulumi-aws::pulumi:pulumi:Stack::pulumi-aws-dev-ci
pulumi:providers:aws           urn:pulumi:dev-ci::pulumi-aws::pulumi:providers:aws::default_6_38_1
aws:ecr/repository:Repository  urn:pulumi:dev-ci::pulumi-aws::aws:ecr/repository:Repository::backend-repo-new


Found no pending operations associated with dev-ci

Backend        
Name           pulumi.com
URL            xxx
User           xxx
Organizations  xxx
Token type     personal

Dependencies:
NAME         VERSION
pip          24.0
pulumi_awsx  2.9.0
pulumi_eks   2.3.0
setuptools   70.0.0
wheel        0.43.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@chainlink chainlink added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 5, 2024
@flostadler
Copy link
Contributor

Hey @chainlink, I'm sorry you're running into this issue. The components in awsx do not support importing them.

As a workaround you can import the underlying resources using the aws classic provider.
Right now (v2.9.0) for the ECR repository component these are:

@flostadler flostadler added kind/enhancement Improvements or new features impact/accessibility Something that is difficult or impossible for some people to use and removed needs-triage Needs attention from the triage team labels Jun 6, 2024
@mikhailshilkov mikhailshilkov removed the kind/bug Some behavior is incorrect or out of spec label Jun 20, 2024
@benjy44
Copy link

benjy44 commented Jul 4, 2024

Just to clarify, it's possible to use the awsx provider and import each underlying resources, one simple way is to run:
pulumi preview --import-file my_ressources.json

Update the ID for each resource in the json file (and the ID required can be found in the AWS classic provider doc for that resource), then:
pulumi import -f my_ressources.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

4 participants