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

Removing template for New Universal Login Experience from TF files does not delete the template from Auth0 #659

Closed
6 tasks done
taikodragon opened this issue Jun 26, 2023 · 2 comments
Labels
🪲 bug Something isn't working

Comments

@taikodragon
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

When removing the NULE template (block resource here: https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/branding#universal_login)
The provider does not make a call to https://manage.navex-dev.auth0app.com/docs/api/management/v2#!/Branding/delete_universal_login to delete the template from the Auth0 tenant.

Expectation

Removing the universal_login block would remove the associated template.

Reproduction

  1. Create a branding resource e.g.
resource "auth0_branding" "global-branding" {
  logo_url = local.logoUrl
  colors {
    primary         = local.brand_orange
    page_background = local.brand_black
  }
  universal_login {
    # Ensure that "{%- auth0:head -%}" and "{%- auth0:widget -%}"
    # are present in the body.
    body = file("login-template.html")
  }
}
  1. Push configuration to Auth0 tenant
  2. Remove universal_login block:
resource "auth0_branding" "global-branding" {
  logo_url = local.logoUrl
  colors {
    primary         = local.brand_orange
    page_background = local.brand_black
  }
}
  1. Push configuration to Auth0 tenant
  2. Attempt to login and observe that the old template is still present

Auth0 Terraform Provider version

0.49.0

Terraform version

1.4.4

@taikodragon taikodragon added the 🪲 bug Something isn't working label Jun 26, 2023
@sergiught
Copy link
Contributor

Hey @taikodragon 👋🏻

Thanks for taking the time to raise this with us. Indeed the branding template gets deleted only if the entire resource is deleted currently. We'll look into improving this for the upcoming v1 release. I'll keep this issue open and post an update once we have one. Appreciate your patience!

@sergiught
Copy link
Contributor

Hey @taikodragon a fix for this is now available within https://github.com/auth0/terraform-provider-auth0/releases/tag/v0.50.0. Please give it a try and let us know if you encounter any issues with it! Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants