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

409 Conflict: There was an error creating branding settings #406

Closed
6 tasks done
Nightapes opened this issue Nov 28, 2022 · 4 comments
Closed
6 tasks done

409 Conflict: There was an error creating branding settings #406

Nightapes opened this issue Nov 28, 2022 · 4 comments
Labels
🌱 feature New feature or request

Comments

@Nightapes
Copy link

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this provider and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Resource auth0_branding_theme is not working.
When adding the resource to terraform i get an 409 even on the first try, i also don't see any Themes in the auth0 UI

│ Error: 409 Conflict: There was an error creating branding settings: theme already exists

If i try to import the default Theme first i get after changing the Theme

│ Error: 400 Bad Request: Path validation error: 'Object didn't pass validation for format theme-id: default' on property themeId (The ID of the theme).

Expectation

Setting a custom theme or updating the default Theme should work without any error.

Reproduction

  1. Create auth0_branding_theme
  2. Run Terraform apply

Auth0 Terraform Provider version

v0.40.0

Terraform version

v1.3.3

@Nightapes Nightapes added the 🪲 bug Something isn't working label Nov 28, 2022
@danmcgee-soda
Copy link

We hit this same issue this morning as well. Ultimately, we realized we could work around it. It seems that auth0 is using default as a read-only alias to the underlying theme ID, but writes are rejected.

If you look at the payload returned from /api/branding/themes/default, you'll see a themeID property in the JSON document. If you import using this ID, rather than default, everything starts working and you can make updates to the theme via code.

@Nightapes
Copy link
Author

@danmcgee-soda thanks for the workaround. It worked

For Auth0:
I think it should work without the need to import the default theme first. We have multiple tenants and is a little bit annoying to import the theme for every tenant.

@sergiught sergiught added 🌱 feature New feature or request and removed 🪲 bug Something isn't working labels Dec 12, 2022
@sergiught
Copy link
Contributor

Hey folks, thanks for opening the issue and for providing a workaround @danmcgee-soda ! 👍

At the moment we can only ever have 1 branding theme created and active, thus the 409 when trying to create another one without importing the already created one in the dashboard.

As this is a singleton resource we can further enhance the behavior of the resource to directly update the branding theme when one is found, instead of trying to create another one.

I'll mark this however as an enhancement / feature rather than a bug.

I don't have an exact ETA for when we can improve this, but most likely in mid/end of Q1.

@sergiught
Copy link
Contributor

Hey folks 👋🏻 ,

We simplified management of this resource to no longer force a user to import the resource if already existing in the latest release: https://registry.terraform.io/providers/auth0/auth0/0.44.0/docs.

Thanks again for raising awareness of this! 🙏🏻

If you encounter any issues with this release please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants