Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Databricks provider version #329

Merged
merged 6 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/lukewiwa/features/shellcheck:0": {},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:1": {
"jqVersion": "1.6",
"yqVersion": "4"
},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {},
"ghcr.io/jlaundry/devcontainer-features/mssql-odbc-driver:1": {
"version": "18"
},
Expand Down
56 changes: 28 additions & 28 deletions apps/app/aad_app/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions infrastructure/core/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ locals {
databricks_container_address_space = local.subnet_address_spaces[2]
serve_webapps_address_space = local.subnet_address_spaces[3]

create_dns_zones = var.private_dns_zones_rg == null
datalake_enabled = try(var.transform.datalake, null) != null
create_dns_zones = var.private_dns_zones_rg == null
datalake_enabled = try(var.transform.datalake, null) != null
unity_catalog_enabled = try(var.transform.unity_catalog, null) != null
required_private_dns_zones = merge({
blob = "privatelink.blob.core.windows.net"
keyvault = "privatelink.vaultcore.azure.net"
cosmos = "privatelink.documents.azure.com"
databricks = "privatelink.azuredatabricks.net"
sql = "privatelink.database.windows.net"
}, local.datalake_enabled ? {
}, local.datalake_enabled || local.unity_catalog_enabled ? {
dfs = "privatelink.dfs.core.windows.net"
} : {})
}
29 changes: 16 additions & 13 deletions infrastructure/transform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions infrastructure/transform/databricks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ resource "databricks_cluster" "cluster" {
tomap({ for secret_name, secret_value in var.transform.databricks_secrets :
"spark.secret.${secret_name}" => "{{secrets/${databricks_secret_scope.secrets.name}/${secret_name}}}"
}),
local.unity_catalog_enabled ? tomap({
"spark.secret.unity-catalog-catalog-name" = "{{secrets/${databricks_secret_scope.secrets.name}/${databricks_secret.unity_catalog_catalog_name[0].key}}}"
"spark.secret.unity-catalog-schema-name" = "{{secrets/${databricks_secret_scope.secrets.name}/${databricks_secret.unity_catalog_schema_name[0].key}}}"
}) : tomap({}),
# Any values set in the config
var.transform.spark_config,
# Special config if in single node configuration
Expand Down
24 changes: 10 additions & 14 deletions infrastructure/transform/datalake/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions infrastructure/transform/pipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ resource "azurerm_data_factory_pipeline" "pipeline" {
parameters = merge(
tomap({
for param_name, param in each.value.properties.parameters : param_name => param.defaultValue
}),
local.unity_catalog_enabled ? tomap({
"catalog_name" = module.unity_catalog[0].catalog_name,
"schema_name" = module.unity_catalog[0].schema_name
}) : tomap({}))
}))

depends_on = [
azurerm_data_factory_linked_service_azure_databricks.msi_linked
Expand Down
14 changes: 14 additions & 0 deletions infrastructure/transform/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,17 @@ resource "databricks_secret" "databricks_config_secret" {
string_value = each.value
scope = databricks_secret_scope.secrets.id
}

resource "databricks_secret" "unity_catalog_catalog_name" {
count = local.unity_catalog_enabled ? 1 : 0
key = "unity-catalog-catalog-name"
string_value = module.unity_catalog[0].catalog_name
scope = databricks_secret_scope.secrets.id
}

resource "databricks_secret" "unity_catalog_schema_name" {
count = local.unity_catalog_enabled ? 1 : 0
key = "unity-catalog-schema-name"
string_value = module.unity_catalog[0].schema_name
scope = databricks_secret_scope.secrets.id
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions infrastructure/transform/unity-catalog/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# limitations under the License.

resource "databricks_metastore_assignment" "workspace_assignment" {
provider = databricks.accounts
workspace_id = data.azurerm_databricks_workspace.workspace.workspace_id
metastore_id = var.metastore_id

depends_on = [databricks_metastore_data_access.metastore_data_access]
}

resource "databricks_metastore_data_access" "metastore_data_access" {
provider = databricks.accounts
metastore_id = var.metastore_id
name = "dbks-metastore-access-${var.naming_suffix}"

Expand All @@ -28,4 +28,6 @@ resource "databricks_metastore_data_access" "metastore_data_access" {
}

is_default = var.metastore_created

depends_on = [databricks_metastore_assignment.workspace_assignment]
}
2 changes: 1 addition & 1 deletion providers.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ EOF
required_provider_databricks = <<EOF
databricks = {
source = "databricks/databricks"
version = "1.9.1"
version = "1.25.1"
configuration_aliases = [ databricks.accounts ]
}
EOF
Expand Down
Loading