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

auth0_branding_theme requires all args #412

Closed
6 tasks done
ghost opened this issue Dec 7, 2022 · 7 comments
Closed
6 tasks done

auth0_branding_theme requires all args #412

ghost opened this issue Dec 7, 2022 · 7 comments
Labels
🌱 feature New feature or request

Comments

@ghost
Copy link

ghost commented Dec 7, 2022

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

auth0_branding_theme schema requires all fields (which made me click around manually in the end - I do NOT want to provide all the arguments - auth0 defaults work well for me except a couple of exceptions)
meanwhile auth0_branding has all fields optional (which is nice and easy to use)

Expectation

auth0_branding_theme fields are optional, just like auth0_branding

Reproduction

go to https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/branding_theme

Auth0 Terraform Provider version

0.40.0

Terraform version

1.3.5

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

Hey @TiltUp-Rad 👋🏻

Thanks for opening an issue!

The provider leverages the Auth0 Management API in order to manage branding themes through e.g. https://auth0.com/docs/api/management/v2#!/Branding/post_branding_theme. As you can see almost all the arguments are required when executing this request.

We could however provide sensible defaults within the provider code to be sent to the API, perhaps using the ones available when no branding theme is set. What do you think? 🤔

I'll mark this as a feature request instead as this is not currently a bug.

@ghost
Copy link
Author

ghost commented Dec 12, 2022

hey @sergiught
yes, providing sensible defaults sounds like a great idea :)

cheers,
Rad

@ghost
Copy link
Author

ghost commented Mar 3, 2023

oh someone actually picked it up. you guys are amazing <3

@sergiught
Copy link
Contributor

Hey @TiltUp-Rad 👋🏻 indeed:) @nialdaly did an awesome contribution 💪🏻 We will be able to merge that in today and cut a release.

However instead of

resource "auth0_branding_theme" "my_theme" { }

We will have the following as the minimal config

resource "auth0_branding_theme" "my_theme" { 
  borders {}
  colors {}
  fonts {
    title {}
    subtitle {}
    links {}
    input_labels {}
    buttons_text {}
    body_text {}
  }
  page_background {}
  widget {}
}

Would this work for your use case?

@ghost
Copy link
Author

ghost commented Mar 3, 2023

yup. that works as well :)
cheers

@sergiught
Copy link
Contributor

This is now available within the latest release https://github.com/auth0/terraform-provider-auth0/releases/tag/v0.44.1 :) Thanks again @TiltUp-Rad for raising the issue with us!

@nialdaly
Copy link
Contributor

nialdaly commented Mar 3, 2023

Thanks! @sergiught for your work and guidance on it 😀

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

2 participants