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

v2.24.3 New style auth0.RolePermissions does not work #308

Closed
1tmb opened this issue Oct 2, 2023 · 2 comments
Closed

v2.24.3 New style auth0.RolePermissions does not work #308

1tmb opened this issue Oct 2, 2023 · 2 comments
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec

Comments

@1tmb
Copy link

1tmb commented Oct 2, 2023

What happened?

  1. Can't attach permissions to a role (pulumi preview successful, pulumi up fails with expected non-nil error with nil state during Create of ... :auth0:index/rolePermissions:RolePermissions:
  2. Failure undeploys unrelated resources without updating the state file
  "dependencies": {
   "@pulumi/pulumi": "^3.86.0",
    "@pulumi/auth0": "^2.24.3"
  }

Example

const myRolePerms = auth0.RolePermissions("myRolePerms", {
    roleId: myroleId,
    permissions: [
      {
        resourceServerIdentifier: myBackendApiIdentifier,
        name: "create:user"
      }
    ],
  });

The permissions are not added to the role.

The roles are then also removed from the resource server and the state file is not updated to describe this.

To work around this, I have needed to use the syntax marked as deprecated to create permissions directly as an array attribute within roles.

Output of pulumi about

Version 3.86.0
Go Version go1.21.1
Go Compiler gc

Plugins
NAME VERSION
auth0 2.24.3
nodejs unknown

Host
OS fedora
Version 38
Arch x86_64

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).

@1tmb 1tmb added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 2, 2023
@1tmb 1tmb changed the title expected non-nil error with nil state during Create of ... :auth0:index/rolePermissions:RolePermissions: New style RolePermissions resource to attach Permissions to Roles does not work Oct 3, 2023
@1tmb 1tmb changed the title New style RolePermissions resource to attach Permissions to Roles does not work New style auth0.RolePermissions does not work Oct 3, 2023
@mikhailshilkov
Copy link
Member

Hi @1tmb, similarly to the other issue - could you try 3.0.0 and see if the issue still reproduces?

@mikhailshilkov mikhailshilkov added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Oct 5, 2023
@1tmb 1tmb changed the title New style auth0.RolePermissions does not work v2.24.3 New style auth0.RolePermissions does not work Oct 6, 2023
@1tmb
Copy link
Author

1tmb commented Oct 6, 2023

@mikhailshilkov all working well in v3.0.0, thank you!

@1tmb 1tmb closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants