Skip to content

[ISSUE] Issue with databricks_alert_v2 resource #4963

@eagan-mackenzie-emn

Description

@eagan-mackenzie-emn

Configuration

# Copy-paste your Terraform configuration here
resource "databricks_alert_v2" "test_alert" {
  display_name = "Test Alert"
  query_text   = <<EOF
SELECT
  to_date(tpep_pickup_datetime) as date,
  SUM(fare_amount) as amount
FROM
  `samples`.`nyctaxi`.`trips`
GROUP BY
  ALL
ORDER BY
  1 DESC
EOF

  warehouse_id = data.databricks_sql_warehouse.serverless_starter_warehouse.id
  parent_path  = databricks_directory.alerts.path

  evaluation = {
    source = {
      name        = "amount"
      display     = "amount"
      aggregation = "SUM"
    }
    comparison_operator = "GREATER_THAN"
    threshold = {
      value = {
        double_value = 4000
      }
    }
    empty_result_state = "OK"

    notification = {
      subscriptions = [
        {
          user_email = "test@email.com"
        }
      ]
      notify_on_ok = true
    }
  }

  schedule = {
    quartz_cron_schedule = "0 0 16 * * ?" # Every day at 4 PM
    timezone_id          = "America/New_York"
    pause_status         = "UNPAUSED"
  }
}

Expected Behavior

Resource should be created without error.

Actual Behavior

The resource was created, but is considered tainted. These errors occurred in the apply step.

Error: Provider produced inconsistent result after apply

When applying changes to databricks_alert_v2.test_alert, provider
"provider[\"registry.terraform.io/databricks/databricks\"]" produced an
unexpected new value: .run_as_user_name: was null, but now
cty.StringVal("<guid>").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Error: Provider produced inconsistent result after apply

When applying changes to databricks_alert_v2.test_alert, provider
"provider[\"registry.terraform.io/databricks/databricks\"]" produced an
unexpected new value: .evaluation.notification.retrigger_seconds: was null,
but now cty.NumberIntVal(0).

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Steps to Reproduce

  1. terraform apply

Terraform and provider versions

Terraform v1.10.1
on linux_amd64
+ provider registry.terraform.io/databricks/databricks v1.87.1
+ provider registry.terraform.io/hashicorp/azuread v3.5.0
+ provider registry.terraform.io/hashicorp/azurerm v4.40.0
+ provider registry.terraform.io/hashicorp/random v3.7.2
+ provider registry.terraform.io/hashicorp/time v0.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions