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

Add support for importing email templates #988

Merged
merged 7 commits into from
Jun 27, 2024

Conversation

weirdian2k3
Copy link
Contributor

🔧 Changes

This adds support for importing email templates into terraform from an existing auth0 install.
This is helpful because if you are onboarding your terraform, you don't have to manually create the resources for the email templates.

🔬 Testing

Go into your auth0 install and set a custom template for one of the templates (for this example, I'm doing reset email)

Run the auth0 cli terraform import to create the auth0_generated.tf file

Note that in the auth0_generated.tf, you have the following block with the pasrameters you set in the auth0 portal populates correctly

resource "auth0_email_template" "reset_email" {
  body                      = "the contents of the email you set up"
  enabled                   = true
  from                      = "Foo <[email protected]>"
  include_email_in_redirect = false
  result_url                = null
  subject                   = ""
  syntax                    = "liquid"
  template                  = "reset_email"
  url_lifetime_in_seconds   = 432000
}

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@weirdian2k3 weirdian2k3 requested a review from a team as a code owner March 19, 2024 14:40
@developerkunal
Copy link
Contributor

Hi @weirdian2k3,

I hope you're having a nice day! I'm looking through your PR, but it requires test cases. If you can add test cases or need help with that, please let me know.

Thank you for the contribution!

@developerkunal
Copy link
Contributor

Hi @weirdian2k3,

I hope you are having a great day.

I have added the necessary documentation and test cases. Could you please merge this branch with yours or open a new PR with these changes?

Here's the link to the branch: GitHub Branch

Thank you!

@developerkunal developerkunal merged commit b612de8 into auth0:main Jun 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants