diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2bf095fe7..db353c619 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,9 @@ jobs: go-version-file: go.mod check-latest: true + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3 + - name: Check that docs were generated run: make check-docs diff --git a/docs/resources/log_stream.md b/docs/resources/log_stream.md index c24f638d3..d12d7d61f 100644 --- a/docs/resources/log_stream.md +++ b/docs/resources/log_stream.md @@ -65,6 +65,7 @@ resource "auth0_log_stream" "example_aws" { ### Optional - `filters` (List of Map of String) Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. Filters available: `auth.ancillary.fail`, `auth.ancillary.success`, `auth.login.fail`, `auth.login.notification`, `auth.login.success`, `auth.logout.fail`, `auth.logout.success`, `auth.signup.fail`, `auth.signup.success`, `auth.silent_auth.fail`, `auth.silent_auth.success`, `auth.token_exchange.fail`, `auth.token_exchange.success`, `management.fail`, `management.success`, `system.notification`, `user.fail`, `user.notification`, `user.success`, `other`. +- `is_priority` (Boolean) Set True for priority log streams, False for non-priority - `status` (String) The current status of the log stream. Options are "active", "paused", "suspended". ### Read-Only diff --git a/docs/resources/prompt_custom_text.md b/docs/resources/prompt_custom_text.md index f444c923a..a272409e4 100644 --- a/docs/resources/prompt_custom_text.md +++ b/docs/resources/prompt_custom_text.md @@ -48,7 +48,7 @@ resource "auth0_prompt_custom_text" "example" { ### Required - `body` (String) JSON containing the custom texts. You can check the options for each prompt [here](https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts#prompt-values). -- `language` (String) Language of the custom text. Options include: `ar`, `ar-EG`, `ar-SA`, `az`, `bg`, `bs`, `ca-ES`, `cs`, `cy`, `da`, `de`, `el`, `en`, `es`, `es-AR`, `es-MX`, `et`, `eu-ES`, `fa`, `fi`, `fr`, `fr-CA`, `fr-FR`, `gl-ES`, `he`, `hi`, `hr`, `hu`, `hy`, `id`, `is`, `it`, `ja`, `ko`, `lt`, `lv`, `ms`, `nb`, `nl`, `nn`, `no`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sq`, `sr`, `sv`, `th`, `tl`, `tr`, `uk`, `ur`, `vi`, `zh-CN`, `zh-HK`, `zh-TW`. +- `language` (String) Language of the custom text. Options include: `am`, `ar`, `ar-EG`, `ar-SA`, `az`, `bg`, `bn`, `bs`, `ca-ES`, `cnr`, `cs`, `cy`, `da`, `de`, `el`, `en`, `en-CA`, `es`, `es-419`, `es-AR`, `es-MX`, `et`, `eu-ES`, `fa`, `fi`, `fr`, `fr-CA`, `fr-FR`, `gl-ES`, `gu`, `he`, `hi`, `hr`, `hu`, `hy`, `id`, `is`, `it`, `ja`, `ka`, `kk`, `kn`, `ko`, `lt`, `lv`, `mk`, `ml`, `mn`, `mr`, `ms`, `my`, `nb`, `nl`, `nn`, `no`, `pa`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `so`, `sq`, `sr`, `sv`, `sw`, `ta`, `te`, `th`, `tl`, `tr`, `uk`, `ur`, `vi`, `zgh`, `zh-CN`, `zh-HK`, `zh-TW`. - `prompt` (String) The term `prompt` is used to refer to a specific step in the login flow. Options include: `captcha`, `common`, `consent`, `custom-form`, `customized-consent`, `device-flow`, `email-otp-challenge`, `email-verification`, `invitation`, `login`, `login-email-verification`, `login-id`, `login-password`, `login-passwordless`, `logout`, `mfa`, `mfa-email`, `mfa-otp`, `mfa-phone`, `mfa-push`, `mfa-recovery-code`, `mfa-sms`, `mfa-voice`, `mfa-webauthn`, `organizations`, `passkeys`, `phone-identifier-challenge`, `phone-identifier-enrollment`, `reset-password`, `signup`, `signup-id`, `signup-password`, `status`. ### Read-Only diff --git a/internal/auth0/logstream/expand.go b/internal/auth0/logstream/expand.go index 0c5ebd06a..5702b5621 100644 --- a/internal/auth0/logstream/expand.go +++ b/internal/auth0/logstream/expand.go @@ -26,6 +26,10 @@ func expandLogStream(data *schema.ResourceData) *management.LogStream { logStream.Status = value.String(config.GetAttr("status")) } + if data.HasChange("is_priority") { + logStream.IsPriority = value.Bool(config.GetAttr("is_priority")) + } + filtersConfig := config.GetAttr("filters") if !filtersConfig.IsNull() { filters := make([]map[string]string, 0) diff --git a/internal/auth0/logstream/flatten.go b/internal/auth0/logstream/flatten.go index 8ad8ceb8e..16c30e7c1 100644 --- a/internal/auth0/logstream/flatten.go +++ b/internal/auth0/logstream/flatten.go @@ -10,6 +10,7 @@ func flattenLogStream(data *schema.ResourceData, logStream *management.LogStream result := multierror.Append( data.Set("name", logStream.GetName()), data.Set("status", logStream.GetStatus()), + data.Set("is_priority", logStream.GetIsPriority()), data.Set("type", logStream.GetType()), data.Set("filters", logStream.Filters), data.Set("sink", flattenLogStreamSink(data, logStream.Sink)), diff --git a/internal/auth0/logstream/resource.go b/internal/auth0/logstream/resource.go index 8e972a673..9ea841ce1 100644 --- a/internal/auth0/logstream/resource.go +++ b/internal/auth0/logstream/resource.go @@ -49,6 +49,12 @@ func NewResource() *schema.Resource { Description: "Type of the log stream, which indicates the sink provider. " + "Options include: `" + strings.Join(validLogStreamTypes, "`, `") + "`.", }, + "is_priority": { + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Set True for priority log streams, False for non-priority", + }, "status": { Type: schema.TypeString, Optional: true, @@ -63,6 +69,7 @@ func NewResource() *schema.Resource { "filters": { Type: schema.TypeList, Optional: true, + Computed: true, Description: "Only logs events matching these filters will be delivered by the stream." + " If omitted or empty, all events will be delivered. " + "Filters available: `auth.ancillary.fail`, `auth.ancillary.success`, `auth.login.fail`, " + @@ -237,7 +244,8 @@ func NewResource() *schema.Resource { Description: "Sent in the HTTP \"Authorization\" header with each request.", }, "http_custom_headers": { - Type: schema.TypeList, + Type: schema.TypeList, + Computed: true, Elem: &schema.Schema{ Type: schema.TypeMap, Elem: &schema.Schema{