auth0 / terraform-provider-auth0

The Auth0 Terraform Provider is the official plugin for managing Auth0 tenant configuration through the Terraform tool.
https://registry.terraform.io/providers/auth0/auth0/latest/docs
Mozilla Public License 2.0
167 stars 86 forks source link

Add support for rendering the settings of prompt-screen #1077

Open ramya18101 opened 1 week ago

ramya18101 commented 1 week ago

🔧 Changes

Added new resources and data sources: "auth0_prompt_screen_renderer" Added relevant expand and flatten rules. Added relevant test cases for data_source and resource. Added relevant docs and examples.

Example

resource "auth0_prompt_screen_renderer" "prompt_screen_renderer" {
  prompt_type                = "login-id"
  screen_name                = "login-id"
  rendering_mode             = "advanced"
  default_head_tags_disabled = false
  context_configuration = [
    "branding.settings",
    "branding.themes.default",
    "client.logo_uri",
    "client.description",
    "organization.display_name",
    "organization.branding",
    "screen.texts",
    "tenant.name",
    "tenant.friendly_name",
    "tenant.enabled_locales",
    "untrusted_data.submitted_form_data",
    "untrusted_data.authorization_params.ui_locales",
    "untrusted_data.authorization_params.login_hint",
    "untrusted_data.authorization_params.screen_hint"
  ]
  head_tags = jsonencode([
    {
      attributes : {
        "async" : true,
        "defer" : true,
        "integrity" : [
          "sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
        ],
        "src" : "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
      },
      tag : "script"
    }
  ])
}

📝 Checklist

kushalshit27 commented 1 week ago

e2e test recordings are not available

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 80.92784% with 37 lines in your changes missing coverage. Please review.

Project coverage is 89.31%. Comparing base (de227d1) to head (5970ce5).

Files with missing lines Patch % Lines
internal/auth0/prompt/expand.go 56.66% 10 Missing and 3 partials :warning:
internal/auth0/prompt/resource_screen_render.go 88.23% 8 Missing and 4 partials :warning:
internal/auth0/prompt/data_source_screen_render.go 80.00% 4 Missing and 2 partials :warning:
internal/auth0/prompt/flatten.go 76.92% 4 Missing and 2 partials :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077/graphs/tree.svg?width=650&height=150&src=pr&token=geObb1Hn9E&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) ```diff @@ Coverage Diff @@ ## main #1077 +/- ## ========================================== - Coverage 89.41% 89.31% -0.10% ========================================== Files 126 128 +2 Lines 17464 17652 +188 ========================================== + Hits 15615 15766 +151 - Misses 1309 1335 +26 - Partials 540 551 +11 ``` | [Files with missing lines](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Δ | | |---|---|---| | [internal/auth0/user/resource.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fuser%2Fresource.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvdXNlci9yZXNvdXJjZS5nbw==) | `75.00% <100.00%> (ø)` | | | [internal/auth0/user/resource\_role.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fuser%2Fresource_role.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvdXNlci9yZXNvdXJjZV9yb2xlLmdv) | `78.00% <100.00%> (ø)` | | | [internal/auth0/user/resource\_roles.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fuser%2Fresource_roles.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvdXNlci9yZXNvdXJjZV9yb2xlcy5nbw==) | `80.00% <100.00%> (ø)` | | | [internal/provider/provider.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fprovider%2Fprovider.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvcHJvdmlkZXIvcHJvdmlkZXIuZ28=) | `100.00% <ø> (ø)` | | | [internal/auth0/prompt/data\_source\_screen\_render.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fprompt%2Fdata_source_screen_render.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvcHJvbXB0L2RhdGFfc291cmNlX3NjcmVlbl9yZW5kZXIuZ28=) | `80.00% <80.00%> (ø)` | | | [internal/auth0/prompt/flatten.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fprompt%2Fflatten.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvcHJvbXB0L2ZsYXR0ZW4uZ28=) | `86.56% <76.92%> (-2.33%)` | :arrow_down: | | [internal/auth0/prompt/resource\_screen\_render.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fprompt%2Fresource_screen_render.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvcHJvbXB0L3Jlc291cmNlX3NjcmVlbl9yZW5kZXIuZ28=) | `88.23% <88.23%> (ø)` | | | [internal/auth0/prompt/expand.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1077?src=pr&el=tree&filepath=internal%2Fauth0%2Fprompt%2Fexpand.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvcHJvbXB0L2V4cGFuZC5nbw==) | `81.18% <56.66%> (-10.37%)` | :arrow_down: |
kushalshit27 commented 1 week ago

looks like a lint ERROR, please lint the code.