Comments (2)
this looks like an underlying issue with the API, Terraform provider is sending both libraries in the definition
locals {
default_policy = {
"dbus_per_hour" : {
"type" : "range",
"maxValue" : 10
},
"autotermination_minutes" : {
"type" : "fixed",
"value" : 20,
"hidden" : true
},
"custom_tags.Team" : {
"type" : "fixed",
"value" : "test"
}
}
}
resource "databricks_cluster_policy" "fair_use" {
name = "test cluster policy"
definition = jsonencode(local.default_policy)
libraries {
pypi {
package = "databricks-sdk==0.12.0"
}
maven {
coordinates = "com.oracle.database.jdbc:ojdbc8:XXXX"
}
}
}
the debug log
2024-06-25T14:27:32.659+0100 [DEBUG] provider.terraform-provider-databricks_v1.48.0: POST /api/2.0/policies/clusters/edit
> {
> "definition": "{\"autotermination_minutes\":{\"hidden\":true,\"type\":\"fixed\",\"value\":20},\"custom_tags.Team\":{\"type\":... (71 more bytes)",
> "libraries": [
> {
> "maven": {
> "coordinates": "com.oracle.database.jdbc:ojdbc8:XXXX"
> },
> "pypi": {
> "package": "databricks-sdk==0.12.0"
> }
> }
> ],
> "name": "test cluster policy",
> "policy_id": "001C043340CD70D0"
> }
< HTTP/2.0 200 OK
< {}: @module=databricks tf_provider_addr=registry.terraform.io/databricks/databricks @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/logger/logger.go:33 tf_rpc=ApplyResourceChange tf_req_id=74d2d271-e26e-1592-452a-98b7cc2575db tf_resource_type=databricks_cluster_policy timestamp="2024-06-25T14:27:32.658+0100"
2024-06-25T14:27:32.888+0100 [DEBUG] provider.terraform-provider-databricks_v1.48.0: GET /api/2.0/policies/clusters/get?policy_id=001C043340CD70D0
< HTTP/2.0 200 OK
< {
< "created_at_timestamp": 1719321848000,
< "definition": "{\"autotermination_minutes\":{\"hidden\":true,\"type\":\"fixed\",\"value\":20},\"custom_tags.Team\":{\"type\":... (71 more bytes)",
< "is_default": false,
< "libraries": [
< {
< "maven": {
< "coordinates": "com.oracle.database.jdbc:ojdbc8:XXXX"
< }
< }
< ],
< "name": "test cluster policy",
< "policy_id": "001C043340CD70D0"
< }
from terraform-provider-databricks.
the issue is with the user code - this is how you specify multiple libraries.
@edwardfeng-db normally, we need to alias plural to singular, i.e. library
to avoid confusion for users. Especially as clusters & jobs use singular library
resource "databricks_cluster_policy" "fair_use" {
name = "test cluster policy"
definition = jsonencode(local.default_policy)
libraries {
maven {
coordinates = "com.oracle.database.jdbc:ojdbc8:XXXX"
}
}
libraries {
pypi {
package = "databricks-sdk==0.12.0"
}
}
}
from terraform-provider-databricks.
Related Issues (20)
- [Exporter] Exclude serving endpoints for foundational models provided by Databricks HOT 1
- [ISSUE] Issue with `databricks_external_location` resource - cannot create `read_only` external locations
- [ISSUE] Identity not found error when switching to Managed Identity as authentication type
- [ISSUE] Issue with `databricks_storage_credential` resource with MSI. 500 Internal Server Error HOT 1
- [FEATURE] databricks_quality_monitor sql dashboard run as permissions
- [ISSUE] Issue with `databricks_mws_workspaces` resource with SA and oauth2 HOT 7
- [DOC] In databricks_schema data resource there is a misspelling in the example.
- [ISSUE] Issue with `databricks_metastore_assignment` resource
- [ISSUE] Issue with `databricks_pipeline` resource after migrating it to Go SDK
- [ISSUE] Provider wants to redeploy `databricks_entitlements` when importing it
- [ISSUE] Issues with `Quality Monitor` resource
- [FEATURE] Add support for table constraints
- [ISSUE] Empty lines or tabs inside SQL query of view definition will trigger redeployment of `databricks_sql_table` resource
- [ISSUE] Tables with struct subcolumns which have dot in their name are redeployed on `databricks_sql_table` resource
- [ISSUE] Changes to databricks_job.notebook_task.base_parameters block escape drift detection
- [ISSUE] Identity not found with `databricks_storage_credential` HOT 1
- [ISSUE] databricks_workspace_binding produces inconsistent final plan error when changing catalog name HOT 1
- [FEATURE] Add dedicated `databricks_git_folder` resource and deprecate `databricks_repo`
- [ISSUE] Issue with `databricks_job` resource `timeout_seconds` argument
- [ISSUE] Provider wants to redeploy `databricks_permissions` when importing it HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-databricks.