terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Problems with the settings resources generation
Right now, there are a few problems with the settings resources, such as databricks_default_namespace_setting:
- Because ETag is used as a resource ID, it's not possible to import the resource easily - we need to have predictable ID for each of the settings
- When ETag is changing on update, the resource ID is also updated, leading to warnings from the Terraform, like this:
2024-02-16T11:10:43.113+0100 [WARN] Provider "provider[\"registry.terraform.io/databricks/databricks\"]" produced an unexpected new value for databricks_default_namespace_setting.this, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .etag: was cty.StringVal("ACi1L_0ASHABAAosCh0KCXdvcmtzcGFjZRIQNjY4ODgwODEzMDU2MjMxNxIJbmFtZXNwYWNlGAQBAAA="), but now cty.StringVal("ACi1L_0ASHABAAosCh0KCXdvcmtzcGFjZRIQNjY4ODgwODEzMDU2MjMxNxIJbmFtZXNwYWNlGAUBAAA=")
- .id: was cty.StringVal("ACi1L_0ASHABAAosCh0KCXdvcmtzcGFjZRIQNjY4ODgwODEzMDU2MjMxNxIJbmFtZXNwYWNlGAQBAAA="), but now cty.StringVal("ACi1L_0ASHABAAosCh0KCXdvcmtzcGFjZRIQNjY4ODgwODEzMDU2MjMxNxIJbmFtZXNwYWNlGAUBAAA=")
Proposal:
- Generate predictable resource ID, like,
setting_<name>orsettings|name, or just a constant, like we do for some resources, like databricks_sql_global_config