Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

auth0_branding fails with an error #380

Closed
RishikeshDarandale opened this issue Apr 26, 2021 · 7 comments · Fixed by #438 or alekc/terraform-provider-auth0#1
Closed

auth0_branding fails with an error #380

RishikeshDarandale opened this issue Apr 26, 2021 · 7 comments · Fixed by #438 or alekc/terraform-provider-auth0#1

Comments

@RishikeshDarandale
Copy link
Contributor

RishikeshDarandale commented Apr 26, 2021

Description

When added auth0_branding resource, got an error saying Error: 404 Not Found: Template does not exist.

Terraform Version

Terraform v0.14.9
+ provider registry.terraform.io/alexkappa/auth0 v0.21.0
+ provider registry.terraform.io/hashicorp/local v2.0.0

Your version of Terraform is out of date! The latest version
is 0.15.0. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • auth0_branding

Terraform Configuration Files

# This was already existing with 0.20.0 version and imported using terraform import
resource "auth0_tenant" "tenant" {
  friendly_name   = "My Tenant"
  enabled_locales = ["en"]
  flags {
    enable_public_signup_user_exists_error = true
    enable_custom_domain_in_emails         = true
  }
  universal_login {
    colors {
      primary         = "#0059d6"
      page_background = "#000000"
    }
  }
}

# this is also an existing resource
resource "auth0_prompt" "prompt" {
  universal_login_experience = "new"
}

resource "auth0_branding" "my-brand" {
  logo_url = "<my_image_link>"
  colors {
    primary = "#0059d6"
    page_background = "#000000"
  }
}

terraform plan showed below changes

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # auth0_branding.transformco-brand will be created
  + resource "auth0_branding" "my-brand" {
      + favicon_url = (known after apply)
      + id          = (known after apply)
      + logo_url    = "<my_image_url>"

      + colors {
          + page_background = "#000000"
          + primary         = "#0059d6"
        }
    }

Once applied above changes, the changes got reflected in tenant. But, failed with error mentioned above.

Expected Behavior

Resource should be created without any error.

Actual Behavior

The resource got created and I see the updated values under my tenant! But, failed with below error

Error: 404 Not Found: Template does not exist.

Steps to Reproduce

  1. terraform apply

Debug Output

Panic Output

Important Factoids

  • Using custom domain with tenant
  • As shown colors were already defined under auth0_tenant resource.
  • Using new universal login

References

  • #0000

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@kpurdon
Copy link
Contributor

kpurdon commented May 25, 2021

As a workaround we were able to manually delete the branding resource from state and re-plan/apply. That seems to have resolved the issue.

The API for the branding universal login template was returning:

{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Template does not exist.",
  "errorCode": "inexistent_templates_universal_login"
}

@RishikeshDarandale
Copy link
Contributor Author

As a workaround we were able to manually delete the branding resource from state and re-plan/apply. That seems to have resolved the issue.

The API for the branding universal login template was returning:

{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Template does not exist.",
  "errorCode": "inexistent_templates_universal_login"
}

I removed the branding resource from state manually, then reapplied the changes. I still get the same error!

@jackton1
Copy link
Contributor

jackton1 commented Jul 28, 2021

Any updates on this getting a similar error.

This seems to be linked to
Screen Shot 2021-07-28 at 7 27 10 AM

Disable this before running terraform apply

@sunnz
Copy link

sunnz commented Aug 6, 2021

This is my workaround to add or apply any changes to the resource auth0_branding.this:

  • turn off enable_custom_domain_in_emails and apply changes
  • add / uncomment the auth0_branding resource and apply changes
  • comment out the auth0_branding resource (again) and remove it from the state: terraform state rm auth0_branding.this
  • turn enable_custom_domain_in_emails back on again and apply changes

nekootoko3 added a commit to nekootoko3/terraform-provider-auth0 that referenced this issue Aug 31, 2021
nekootoko3 added a commit to nekootoko3/terraform-provider-auth0 that referenced this issue Aug 31, 2021
alekc added a commit to alekc/terraform-provider-auth0 that referenced this issue Sep 9, 2021
alekc added a commit to alekc/terraform-provider-auth0 that referenced this issue Sep 9, 2021
@davidski
Copy link

It's been terrific seeing the uptick in releases lately. Is there anything we in the community could do to prioritize getting this fix merged? This currently hard stops applies in our environment, forcing us to do janky --target workarounds. Would ❤️ the heck out of a fix for this!

@sergiught
Copy link
Collaborator

Hey @davidski, thanks for raising visibility on this! I'm gonna start diving into the issue ASAP.

sergiught pushed a commit to nekootoko3/terraform-provider-auth0 that referenced this issue Jan 20, 2022
@sergiught
Copy link
Collaborator

Hey folks, appreciate you raising this issue. This is now fixed within https://github.com/alexkappa/terraform-provider-auth0/releases/tag/v0.26.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants