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

#237 - fix: Inject user connection name attribute to allow resource import #456

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

asvinours
Copy link
Contributor

@asvinours asvinours commented Mar 7, 2024

Fixes #237

I'm unsure why the path commits were modified to 0000000000000000000000000000000000000000, I guess I must have made a mistake somewhere.

here are the steps I followed:

- make upstream
- make upstream.rebase
- I made the changes to upstream/internal/auth0/user/flatten.go and upstream/internal/auth0/user/resource.go then created a new git commit
- make upstream.finalize

I generated a build of the plugin and the python SDK and tested this change locally and I can confirm that the connectionName is properly imported and does not generate a change anymore

before the patch:

warning: inputs to import do not match the existing resource; importing this resource will fail
    = auth0:index/user:User: (import)
        [id=auth0|65b3cf64d3feda60bbc6bd01]
        [urn=urn:pulumi:dev::test-pulumi-auth0::auth0:index/user:User::this]
        [provider=urn:pulumi:dev::test-pulumi-auth0::pulumi:providers:auth0::this::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
      + connectionName: "c63b249c-47ce-4c26-a2c6-20dd9101af86-LocalUserDatabase"

with the patch

    = auth0:index/user:User: (import)
        [id=auth0|65b3cf64d3feda60bbc6bd01]
        [urn=urn:pulumi:dev::test-pulumi-auth0::auth0:index/user:User::this]
        [provider=urn:pulumi:dev::test-pulumi-auth0::pulumi:providers:auth0::this::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
        connectionName: "c63b249c-47ce-4c26-a2c6-20dd9101af86-LocalUserDatabase"
        email         : "me@example.com"
        name          : "Administrator"
        nickname      : "administrator"
        picture       : "https://s.gravatar.com/avatar/b3a263843d9b28612b381b3a01e4543c?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fla.png"
        userId        : "auth0|65b3cf64d3feda60bbc6bd01"

Copy link

github-actions bot commented Mar 7, 2024

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@iwahbe
Copy link
Member

iwahbe commented Mar 12, 2024

Hey @asvinours. Thanks for taking the time to open a PR. The change looks good.

@iwahbe
Copy link
Member

iwahbe commented Mar 13, 2024

/run-acceptance-tests

@iwahbe iwahbe self-requested a review March 13, 2024 16:52
@pulumi-bot
Copy link
Contributor

Please view the PR build: https://github.com/pulumi/pulumi-auth0/actions/runs/8268522868

@iwahbe iwahbe merged commit c553b16 into pulumi:master Mar 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to import existing User resource
3 participants