From 01f1ae13639242671beecb0ddb3e422a3f81bac3 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Wed, 8 May 2024 23:32:56 +0200 Subject: [PATCH 1/9] `azurerm_databrocks_workspace`: Add support for `default_storage_firewall_enabled` property Fixes #25899 --- go.mod | 4 +- go.sum | 8 +- internal/services/databricks/client/client.go | 4 +- ...atabricks_customer_managed_key_resource.go | 2 +- ...icks_customer_managed_key_resource_test.go | 2 +- ...root_dbfs_customer_managed_key_resource.go | 2 +- ...dbfs_customer_managed_key_resource_test.go | 2 +- ...bricks_virtual_network_peering_resource.go | 4 +- ...s_virtual_network_peering_resource_test.go | 2 +- .../databricks_workspace_data_source.go | 2 +- ...private_endpoint_connection_data_source.go | 2 +- .../databricks_workspace_resource.go | 68 +++- .../databricks_workspace_resource_test.go | 127 +++++++- .../migration/customer_managed_key.go | 2 +- .../workspaces/model_workspaceproperties.go | 42 --- .../vnetpeering/README.md | 6 +- .../vnetpeering/client.go | 0 .../vnetpeering/constants.go | 0 .../vnetpeering/id_virtualnetworkpeering.go | 0 .../vnetpeering/id_workspace.go | 0 .../vnetpeering/method_createorupdate.go | 0 .../vnetpeering/method_delete.go | 0 .../vnetpeering/method_get.go | 0 .../vnetpeering/method_listbyworkspace.go | 0 .../vnetpeering/model_addressspace.go | 0 .../model_virtualnetworkpeering.go | 0 ...l_virtualnetworkpeeringpropertiesformat.go | 0 ...ropertiesformatdatabricksvirtualnetwork.go | 0 ...ingpropertiesformatremotevirtualnetwork.go | 0 .../vnetpeering/predicates.go | 0 .../vnetpeering/version.go | 2 +- .../workspaces/README.md | 8 +- .../workspaces/client.go | 0 .../workspaces/constants.go | 290 ++++++++++++++++++ .../workspaces/id_workspace.go | 0 .../workspaces/method_createorupdate.go | 0 .../workspaces/method_delete.go | 38 ++- .../workspaces/method_get.go | 0 .../workspaces/method_listbyresourcegroup.go | 0 .../workspaces/method_listbysubscription.go | 0 .../workspaces/method_update.go | 0 .../model_automaticclusterupdatedefinition.go | 8 + ...del_compliancesecurityprofiledefinition.go | 9 + .../workspaces/model_createdby.go | 0 .../model_defaultcatalogproperties.go | 9 + .../workspaces/model_encryption.go | 0 .../model_encryptionentitiesdefinition.go | 0 .../workspaces/model_encryptionv2.go | 0 .../model_encryptionv2keyvaultproperties.go | 0 ...el_enhancedsecuritycompliancedefinition.go | 10 + ...el_enhancedsecuritymonitoringdefinition.go | 8 + .../workspaces/model_manageddiskencryption.go | 0 ...manageddiskencryptionkeyvaultproperties.go | 0 .../model_managedidentityconfiguration.go | 0 .../workspaces/model_privateendpoint.go | 0 .../model_privateendpointconnection.go | 0 ...del_privateendpointconnectionproperties.go | 0 ...model_privatelinkserviceconnectionstate.go | 0 .../workspaces/model_sku.go | 0 .../workspaces/model_workspace.go | 0 .../model_workspacecustombooleanparameter.go | 0 .../model_workspacecustomobjectparameter.go | 0 .../model_workspacecustomparameters.go | 32 +- .../model_workspacecustomstringparameter.go | 0 .../model_workspaceencryptionparameter.go | 0 ...del_workspacenopublicipbooleanparameter.go | 9 + .../workspaces/model_workspaceproperties.go | 47 +++ ...odel_workspacepropertiesaccessconnector.go | 10 + .../model_workspacepropertiesencryption.go | 0 .../model_workspaceproviderauthorization.go | 0 .../workspaces/model_workspaceupdate.go | 0 .../workspaces/predicates.go | 0 .../workspaces/version.go | 2 +- vendor/modules.txt | 8 +- 74 files changed, 669 insertions(+), 100 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/id_virtualnetworkpeering.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/id_workspace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/method_listbyworkspace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/model_addressspace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/model_virtualnetworkpeering.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/model_virtualnetworkpeeringpropertiesformat.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/model_virtualnetworkpeeringpropertiesformatdatabricksvirtualnetwork.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/model_virtualnetworkpeeringpropertiesformatremotevirtualnetwork.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/vnetpeering/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/README.md (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/constants.go (60%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/id_workspace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_delete.go (64%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_listbyresourcegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_listbysubscription.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/method_update.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_automaticclusterupdatedefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_compliancesecurityprofiledefinition.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_createdby.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_defaultcatalogproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_encryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_encryptionentitiesdefinition.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_encryptionv2.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_encryptionv2keyvaultproperties.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritycompliancedefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritymonitoringdefinition.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_manageddiskencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_manageddiskencryptionkeyvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_managedidentityconfiguration.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_privateendpoint.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_privateendpointconnection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_privateendpointconnectionproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_privatelinkserviceconnectionstate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_sku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspacecustombooleanparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspacecustomobjectparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspacecustomparameters.go (60%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspacecustomstringparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspaceencryptionparameter.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacenopublicipbooleanparameter.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesaccessconnector.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspacepropertiesencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspaceproviderauthorization.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/model_workspaceupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/{2023-02-01 => 2024-05-01}/workspaces/version.go (88%) diff --git a/go.mod b/go.mod index f5b525cbeaad..597d0a723d79 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.4.0 github.com/hashicorp/go-azure-helpers v0.69.0 - github.com/hashicorp/go-azure-sdk/resource-manager v0.20240506.1094936 - github.com/hashicorp/go-azure-sdk/sdk v0.20240506.1094936 + github.com/hashicorp/go-azure-sdk/resource-manager v0.20240507.1095453 + github.com/hashicorp/go-azure-sdk/sdk v0.20240507.1095453 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index d1b3bf456bf3..5013dc0c03e8 100644 --- a/go.sum +++ b/go.sum @@ -95,10 +95,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.69.0 h1:JwUWXyDgyr6OafU4CgSvrbEP1wcMjfz4gxRQciDQkBQ= github.com/hashicorp/go-azure-helpers v0.69.0/go.mod h1:BmbF4JDYXK5sEmFeU5hcn8Br21uElcqLfdQxjatwQKw= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240506.1094936 h1:7Y8i1HYjupSg1yYDosrrfc1fLCxdYUEzrBIedKwJeFs= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240506.1094936/go.mod h1:p1P+kBwN54NLKGg35s5O7sBoFP3Zk60nBTA5PsOqFus= -github.com/hashicorp/go-azure-sdk/sdk v0.20240506.1094936 h1:a7vuK6yajMRRpONXqOYOl0dE4TRIjzV8Rw5SFlUlYgw= -github.com/hashicorp/go-azure-sdk/sdk v0.20240506.1094936/go.mod h1:Ts5vRL3KPw8iLit+4WSi1hOWlRCx++wJrCkMGj69xBY= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240507.1095453 h1:6nCJQT1WCzjVZ1dljs7RKVPiscy0V3DnNvfxBIYNm7Y= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240507.1095453/go.mod h1:CDmjXxvqpnFrRAX5xAKczebKevwO2C7HELMygEeX4ss= +github.com/hashicorp/go-azure-sdk/sdk v0.20240507.1095453 h1:HHrx24Kjo0diFIjAxlaS8KVB9rO99QMYaQ/tkKqRA1I= +github.com/hashicorp/go-azure-sdk/sdk v0.20240507.1095453/go.mod h1:Ts5vRL3KPw8iLit+4WSi1hOWlRCx++wJrCkMGj69xBY= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/internal/services/databricks/client/client.go b/internal/services/databricks/client/client.go index 454910a91332..bbfeb9258f9e 100644 --- a/internal/services/databricks/client/client.go +++ b/internal/services/databricks/client/client.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/databricks/databricks_customer_managed_key_resource.go b/internal/services/databricks/databricks_customer_managed_key_resource.go index 2d890fda8920..f65bc1ee38e1 100644 --- a/internal/services/databricks/databricks_customer_managed_key_resource.go +++ b/internal/services/databricks/databricks_customer_managed_key_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" diff --git a/internal/services/databricks/databricks_customer_managed_key_resource_test.go b/internal/services/databricks/databricks_customer_managed_key_resource_test.go index e80a16865ee4..4f8f7de5d5ed 100644 --- a/internal/services/databricks/databricks_customer_managed_key_resource_test.go +++ b/internal/services/databricks/databricks_customer_managed_key_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource.go b/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource.go index 1ebe5df87905..44c38f1426e0 100644 --- a/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource.go +++ b/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" diff --git a/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource_test.go b/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource_test.go index 5b1decc65765..df3e54ccc01d 100644 --- a/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource_test.go +++ b/internal/services/databricks/databricks_root_dbfs_customer_managed_key_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/databricks/databricks_virtual_network_peering_resource.go b/internal/services/databricks/databricks_virtual_network_peering_resource.go index 845377cf666f..7457609e30b9 100644 --- a/internal/services/databricks/databricks_virtual_network_peering_resource.go +++ b/internal/services/databricks/databricks_virtual_network_peering_resource.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" diff --git a/internal/services/databricks/databricks_virtual_network_peering_resource_test.go b/internal/services/databricks/databricks_virtual_network_peering_resource_test.go index 2c2834ab18d9..45fe230ef1b9 100644 --- a/internal/services/databricks/databricks_virtual_network_peering_resource_test.go +++ b/internal/services/databricks/databricks_virtual_network_peering_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/databricks/databricks_workspace_data_source.go b/internal/services/databricks/databricks_workspace_data_source.go index 97b6a4e7d885..cac3b6507b16 100644 --- a/internal/services/databricks/databricks_workspace_data_source.go +++ b/internal/services/databricks/databricks_workspace_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/databricks/databricks_workspace_private_endpoint_connection_data_source.go b/internal/services/databricks/databricks_workspace_private_endpoint_connection_data_source.go index aa6ef8db059f..b79db66b9cac 100644 --- a/internal/services/databricks/databricks_workspace_private_endpoint_connection_data_source.go +++ b/internal/services/databricks/databricks_workspace_private_endpoint_connection_data_source.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/privateendpoints" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 84e0324d2804..ca030cc862f1 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -15,7 +15,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" mlworkspace "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaces" "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/loadbalancers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" @@ -126,6 +127,19 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { Default: true, }, + "default_storage_firewall_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + RequiredWith: []string{"access_connector_id"}, + }, + + "access_connector_id": { + Type: pluginsdk.TypeString, + Optional: true, + RequiredWith: []string{"default_storage_firewall_enabled"}, + }, + "network_security_group_rules_required": { Type: pluginsdk.TypeString, Optional: true, @@ -326,6 +340,7 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, d *pluginsdk.ResourceDiff, v interface{}) error { _, customerEncryptionEnabled := d.GetChange("customer_managed_key_enabled") + _, defaultStorageFirewallEnabled := d.GetChange("default_storage_firewall_enabled") _, infrastructureEncryptionEnabled := d.GetChange("infrastructure_encryption_enabled") _, publicNetworkAccess := d.GetChange("public_network_access_enabled") _, requireNsgRules := d.GetChange("network_security_group_rules_required") @@ -357,8 +372,8 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { } } - if (customerEncryptionEnabled.(bool) || infrastructureEncryptionEnabled.(bool) || managedServicesCMK.(string) != "" || managedDiskCMK.(string) != "") && !strings.EqualFold("premium", newSku.(string)) { - return fmt.Errorf("'customer_managed_key_enabled', 'infrastructure_encryption_enabled', 'managed_disk_cmk_key_vault_key_id' and 'managed_services_cmk_key_vault_key_id' are only available with a 'premium' workspace 'sku', got %q", newSku) + if (customerEncryptionEnabled.(bool) || defaultStorageFirewallEnabled.(bool) || infrastructureEncryptionEnabled.(bool) || managedServicesCMK.(string) != "" || managedDiskCMK.(string) != "") && !strings.EqualFold("premium", newSku.(string)) { + return fmt.Errorf("'customer_managed_key_enabled', 'default_storage_firewall_enabled', 'infrastructure_encryption_enabled', 'managed_disk_cmk_key_vault_key_id' and 'managed_services_cmk_key_vault_key_id' are only available with a 'premium' workspace 'sku', got %q", newSku) } return nil @@ -368,6 +383,7 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).DataBricks.WorkspacesClient + acClient := meta.(*clients.Client).DataBricks.AccessConnectorClient lbClient := meta.(*clients.Client).LoadBalancers.LoadBalancersClient keyVaultsClient := meta.(*clients.Client).KeyVault subscriptionId := meta.(*clients.Client).Account.SubscriptionId @@ -433,6 +449,11 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int managedResourceGroupID := resourcesParse.NewResourceGroupID(subscriptionId, managedResourceGroupName).ID() customerEncryptionEnabled := d.Get("customer_managed_key_enabled").(bool) infrastructureEncryptionEnabled := d.Get("infrastructure_encryption_enabled").(bool) + defaultStorageFirewallEnabledRaw := d.Get("default_storage_firewall_enabled").(bool) + defaultStorageFirewallEnabled := workspaces.DefaultStorageFirewallDisabled + if defaultStorageFirewallEnabledRaw { + defaultStorageFirewallEnabled = workspaces.DefaultStorageFirewallEnabled + } publicNetowrkAccessRaw := d.Get("public_network_access_enabled").(bool) publicNetworkAccess := workspaces.PublicNetworkAccessDisabled if publicNetowrkAccessRaw { @@ -563,6 +584,35 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int encrypt.Entities.ManagedDisk.RotationToLatestKeyVersionEnabled = utils.Bool(rotationEnabled) } + accessConnectorIdRaw := d.Get("access_connector_id").(string) + accessConnectorId, err := accessconnector.ParseAccessConnectorID(accessConnectorIdRaw) + + if err != nil { + return fmt.Errorf("parsing Access Connector ID %s: %+v", accessConnectorIdRaw, err) + } + + accessConnector, err := acClient.Get(ctx, *accessConnectorId) + if err != nil { + return fmt.Errorf("retrieving Access Connector %s: %+v", accessConnectorId.AccessConnectorName, err) + } + + accessConnectorProperties := workspaces.WorkspacePropertiesAccessConnector{} + if accessConnector.Model.Identity != nil { + + accIdentityId := "" + for raw := range accessConnector.Model.Identity.IdentityIds { + id, err := commonids.ParseUserAssignedIdentityIDInsensitively(raw) + if err != nil { + return fmt.Errorf("parsing %q as a User Assigned Identity ID: %+v", raw, err) + } + accIdentityId = id.ID() + } + + accessConnectorProperties.Id = *accessConnector.Model.Id + accessConnectorProperties.IdentityType = workspaces.IdentityType(accessConnector.Model.Identity.Type) + accessConnectorProperties.UserAssignedIdentityId = &accIdentityId + } + // Including the Tags in the workspace parameters will update the tags on // the workspace only workspace := workspaces.Workspace{ @@ -571,7 +621,9 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int }, Location: location, Properties: workspaces.WorkspaceProperties{ + AccessConnector: &accessConnectorProperties, PublicNetworkAccess: &publicNetworkAccess, + DefaultStorageFirewall: &defaultStorageFirewallEnabled, ManagedResourceGroupId: managedResourceGroupID, Parameters: customParams, }, @@ -677,6 +729,12 @@ func resourceDatabricksWorkspaceRead(d *pluginsdk.ResourceData, meta interface{} d.Set("managed_resource_group_id", model.Properties.ManagedResourceGroupId) d.Set("managed_resource_group_name", managedResourceGroupID.ResourceGroup) + defaultStorageFirewall := model.Properties.DefaultStorageFirewall + if defaultStorageFirewall != nil { + d.Set("default_storage_firewall_enabled", *defaultStorageFirewall != workspaces.DefaultStorageFirewallDisabled) + d.Set("access_connector_id", model.Properties.AccessConnector.Id) + } + publicNetworkAccess := model.Properties.PublicNetworkAccess if publicNetworkAccess != nil { d.Set("public_network_access_enabled", *publicNetworkAccess != workspaces.PublicNetworkAccessDisabled) @@ -790,7 +848,7 @@ func resourceDatabricksWorkspaceDelete(d *pluginsdk.ResourceData, meta interface return err } - if err = client.DeleteThenPoll(ctx, *id); err != nil { + if err = client.DeleteThenPoll(ctx, *id, workspaces.DeleteOperationOptions{}); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } @@ -976,7 +1034,7 @@ func expandWorkspaceCustomParameters(input []interface{}, customerManagedKeyEnab } if v, ok := config["no_public_ip"].(bool); ok { - parameters.EnableNoPublicIP = &workspaces.WorkspaceCustomBooleanParameter{ + parameters.EnableNoPublicIP = &workspaces.WorkspaceNoPublicIPBooleanParameter{ Value: v, } } diff --git a/internal/services/databricks/databricks_workspace_resource_test.go b/internal/services/databricks/databricks_workspace_resource_test.go index 1d09f5b3e4b2..14a3f9ee0ffb 100644 --- a/internal/services/databricks/databricks_workspace_resource_test.go +++ b/internal/services/databricks/databricks_workspace_resource_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -40,6 +40,21 @@ func TestAccDatabricksWorkspace_basic(t *testing.T) { }) } +func TestAccDatabricksWorkspace_defaultStorageFirewall(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_databricks_workspace", "test") + r := DatabricksWorkspaceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.defaultStorageFirewall(data, "premium"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("custom_parameters.0.public_subnet_network_security_group_association_id", "custom_parameters.0.private_subnet_network_security_group_association_id"), + }) +} + func TestAccDatabricksWorkspace_sameName(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_databricks_workspace", "test") r := DatabricksWorkspaceResource{} @@ -442,6 +457,116 @@ resource "azurerm_databricks_workspace" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, sku) } +func (DatabricksWorkspaceResource) defaultStorageFirewall(data acceptance.TestData, sku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-databricks-%[1]d" + location = "%[2]s" +} + +resource "azurerm_virtual_network" "test" { + name = "acctest-vnet-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + address_space = ["10.0.0.0/16"] +} + +resource "azurerm_subnet" "public" { + name = "acctest-sn-public-%[1]d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.1.0/24"] + + delegation { + name = "acctest" + + service_delegation { + name = "Microsoft.Databricks/workspaces" + + actions = [ + "Microsoft.Network/virtualNetworks/subnets/join/action", + "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", + "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action", + ] + } + } +} + +resource "azurerm_subnet" "private" { + name = "acctest-sn-private-%[1]d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] + + delegation { + name = "acctest" + + service_delegation { + name = "Microsoft.Databricks/workspaces" + + actions = [ + "Microsoft.Network/virtualNetworks/subnets/join/action", + "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", + "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action", + ] + } + } +} + +resource "azurerm_network_security_group" "nsg" { + name = "acctest-nsg-private-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_subnet_network_security_group_association" "public" { + subnet_id = azurerm_subnet.public.id + network_security_group_id = azurerm_network_security_group.nsg.id +} + +resource "azurerm_subnet_network_security_group_association" "private" { + subnet_id = azurerm_subnet.private.id + network_security_group_id = azurerm_network_security_group.nsg.id +} + + +resource "azurerm_databricks_access_connector" "test" { + name = "acctestDBWACC%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + + identity { + type = "SystemAssigned" + } +} + +resource "azurerm_databricks_workspace" "test" { + name = "acctestDBW-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + sku = "%[3]s" + + custom_parameters { + no_public_ip = false + public_subnet_name = azurerm_subnet.public.name + private_subnet_name = azurerm_subnet.private.name + virtual_network_id = azurerm_virtual_network.test.id + + public_subnet_network_security_group_association_id = azurerm_subnet_network_security_group_association.public.id + private_subnet_network_security_group_association_id = azurerm_subnet_network_security_group_association.private.id + } + + access_connector_id = azurerm_databricks_access_connector.test.id + default_storage_firewall_enabled = true + +} +`, data.RandomInteger, data.Locations.Primary, sku) +} + func (DatabricksWorkspaceResource) sameName(data acceptance.TestData, sku string) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/databricks/migration/customer_managed_key.go b/internal/services/databricks/migration/customer_managed_key.go index ed870ef2bddc..6974b03fa054 100644 --- a/internal/services/databricks/migration/customer_managed_key.go +++ b/internal/services/databricks/migration/customer_managed_key.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" - "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproperties.go deleted file mode 100644 index f5241b4722f9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package workspaces - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WorkspaceProperties struct { - Authorizations *[]WorkspaceProviderAuthorization `json:"authorizations,omitempty"` - CreatedBy *CreatedBy `json:"createdBy,omitempty"` - CreatedDateTime *string `json:"createdDateTime,omitempty"` - DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` - Encryption *WorkspacePropertiesEncryption `json:"encryption,omitempty"` - ManagedDiskIdentity *ManagedIdentityConfiguration `json:"managedDiskIdentity,omitempty"` - ManagedResourceGroupId string `json:"managedResourceGroupId"` - Parameters *WorkspaceCustomParameters `json:"parameters,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` - RequiredNsgRules *RequiredNsgRules `json:"requiredNsgRules,omitempty"` - StorageAccountIdentity *ManagedIdentityConfiguration `json:"storageAccountIdentity,omitempty"` - UiDefinitionUri *string `json:"uiDefinitionUri,omitempty"` - UpdatedBy *CreatedBy `json:"updatedBy,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceUrl *string `json:"workspaceUrl,omitempty"` -} - -func (o *WorkspaceProperties) GetCreatedDateTimeAsTime() (*time.Time, error) { - if o.CreatedDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *WorkspaceProperties) SetCreatedDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedDateTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/README.md index 2a781f0e3e5d..65527a7b9902 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering` Documentation -The `vnetpeering` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `vnetpeering` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering" +import "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_listbyworkspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_listbyworkspace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/method_listbyworkspace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/method_listbyworkspace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_addressspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_addressspace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_addressspace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_addressspace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeering.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeering.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeering.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformat.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformat.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformat.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatdatabricksvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatdatabricksvirtualnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatdatabricksvirtualnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatdatabricksvirtualnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatremotevirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatremotevirtualnetwork.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatremotevirtualnetwork.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/model_virtualnetworkpeeringpropertiesformatremotevirtualnetwork.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/version.go index 1d9a4d8e1b22..9dfae6e7ab09 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2023-02-01" +const defaultApiVersion = "2024-05-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/vnetpeering/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/README.md index c9da14715184..edfa240488e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces" +import "github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces" ``` @@ -44,7 +44,7 @@ if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { ctx := context.TODO() id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue") -if err := client.DeleteThenPoll(ctx, id); err != nil { +if err := client.DeleteThenPoll(ctx, id, workspaces.DefaultDeleteOperationOptions()); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/constants.go similarity index 60% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/constants.go index 0ae4a3d9335f..85e284f53620 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/constants.go @@ -9,6 +9,132 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AutomaticClusterUpdateValue string + +const ( + AutomaticClusterUpdateValueDisabled AutomaticClusterUpdateValue = "Disabled" + AutomaticClusterUpdateValueEnabled AutomaticClusterUpdateValue = "Enabled" +) + +func PossibleValuesForAutomaticClusterUpdateValue() []string { + return []string{ + string(AutomaticClusterUpdateValueDisabled), + string(AutomaticClusterUpdateValueEnabled), + } +} + +func (s *AutomaticClusterUpdateValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutomaticClusterUpdateValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutomaticClusterUpdateValue(input string) (*AutomaticClusterUpdateValue, error) { + vals := map[string]AutomaticClusterUpdateValue{ + "disabled": AutomaticClusterUpdateValueDisabled, + "enabled": AutomaticClusterUpdateValueEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutomaticClusterUpdateValue(input) + return &out, nil +} + +type ComplianceSecurityProfileValue string + +const ( + ComplianceSecurityProfileValueDisabled ComplianceSecurityProfileValue = "Disabled" + ComplianceSecurityProfileValueEnabled ComplianceSecurityProfileValue = "Enabled" +) + +func PossibleValuesForComplianceSecurityProfileValue() []string { + return []string{ + string(ComplianceSecurityProfileValueDisabled), + string(ComplianceSecurityProfileValueEnabled), + } +} + +func (s *ComplianceSecurityProfileValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComplianceSecurityProfileValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComplianceSecurityProfileValue(input string) (*ComplianceSecurityProfileValue, error) { + vals := map[string]ComplianceSecurityProfileValue{ + "disabled": ComplianceSecurityProfileValueDisabled, + "enabled": ComplianceSecurityProfileValueEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComplianceSecurityProfileValue(input) + return &out, nil +} + +type ComplianceStandard string + +const ( + ComplianceStandardHIPAA ComplianceStandard = "HIPAA" + ComplianceStandardNONE ComplianceStandard = "NONE" + ComplianceStandardPCIDSS ComplianceStandard = "PCI_DSS" +) + +func PossibleValuesForComplianceStandard() []string { + return []string{ + string(ComplianceStandardHIPAA), + string(ComplianceStandardNONE), + string(ComplianceStandardPCIDSS), + } +} + +func (s *ComplianceStandard) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComplianceStandard(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComplianceStandard(input string) (*ComplianceStandard, error) { + vals := map[string]ComplianceStandard{ + "hipaa": ComplianceStandardHIPAA, + "none": ComplianceStandardNONE, + "pci_dss": ComplianceStandardPCIDSS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComplianceStandard(input) + return &out, nil +} + type CustomParameterType string const ( @@ -53,6 +179,47 @@ func parseCustomParameterType(input string) (*CustomParameterType, error) { return &out, nil } +type DefaultStorageFirewall string + +const ( + DefaultStorageFirewallDisabled DefaultStorageFirewall = "Disabled" + DefaultStorageFirewallEnabled DefaultStorageFirewall = "Enabled" +) + +func PossibleValuesForDefaultStorageFirewall() []string { + return []string{ + string(DefaultStorageFirewallDisabled), + string(DefaultStorageFirewallEnabled), + } +} + +func (s *DefaultStorageFirewall) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDefaultStorageFirewall(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDefaultStorageFirewall(input string) (*DefaultStorageFirewall, error) { + vals := map[string]DefaultStorageFirewall{ + "disabled": DefaultStorageFirewallDisabled, + "enabled": DefaultStorageFirewallEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DefaultStorageFirewall(input) + return &out, nil +} + type EncryptionKeySource string const ( @@ -91,6 +258,129 @@ func parseEncryptionKeySource(input string) (*EncryptionKeySource, error) { return &out, nil } +type EnhancedSecurityMonitoringValue string + +const ( + EnhancedSecurityMonitoringValueDisabled EnhancedSecurityMonitoringValue = "Disabled" + EnhancedSecurityMonitoringValueEnabled EnhancedSecurityMonitoringValue = "Enabled" +) + +func PossibleValuesForEnhancedSecurityMonitoringValue() []string { + return []string{ + string(EnhancedSecurityMonitoringValueDisabled), + string(EnhancedSecurityMonitoringValueEnabled), + } +} + +func (s *EnhancedSecurityMonitoringValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnhancedSecurityMonitoringValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnhancedSecurityMonitoringValue(input string) (*EnhancedSecurityMonitoringValue, error) { + vals := map[string]EnhancedSecurityMonitoringValue{ + "disabled": EnhancedSecurityMonitoringValueDisabled, + "enabled": EnhancedSecurityMonitoringValueEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnhancedSecurityMonitoringValue(input) + return &out, nil +} + +type IdentityType string + +const ( + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" + IdentityTypeUserAssigned IdentityType = "UserAssigned" +) + +func PossibleValuesForIdentityType() []string { + return []string{ + string(IdentityTypeSystemAssigned), + string(IdentityTypeUserAssigned), + } +} + +func (s *IdentityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIdentityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIdentityType(input string) (*IdentityType, error) { + vals := map[string]IdentityType{ + "systemassigned": IdentityTypeSystemAssigned, + "userassigned": IdentityTypeUserAssigned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IdentityType(input) + return &out, nil +} + +type InitialType string + +const ( + InitialTypeHiveMetastore InitialType = "HiveMetastore" + InitialTypeUnityCatalog InitialType = "UnityCatalog" +) + +func PossibleValuesForInitialType() []string { + return []string{ + string(InitialTypeHiveMetastore), + string(InitialTypeUnityCatalog), + } +} + +func (s *InitialType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseInitialType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseInitialType(input string) (*InitialType, error) { + vals := map[string]InitialType{ + "hivemetastore": InitialTypeHiveMetastore, + "unitycatalog": InitialTypeUnityCatalog, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InitialType(input) + return &out, nil +} + type KeySource string const ( diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_delete.go similarity index 64% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_delete.go index fc920d351a29..979b1a59ad78 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_delete.go @@ -20,8 +20,35 @@ type DeleteOperationResponse struct { OData *odata.OData } +type DeleteOperationOptions struct { + ForceDeletion *bool +} + +func DefaultDeleteOperationOptions() DeleteOperationOptions { + return DeleteOperationOptions{} +} + +func (o DeleteOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o DeleteOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o DeleteOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.ForceDeletion != nil { + out.Append("forceDeletion", fmt.Sprintf("%v", *o.ForceDeletion)) + } + return &out +} + // Delete ... -func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId) (result DeleteOperationResponse, err error) { +func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -29,8 +56,9 @@ func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId) (result De http.StatusNoContent, http.StatusOK, }, - HttpMethod: http.MethodDelete, - Path: id.ID(), + HttpMethod: http.MethodDelete, + Path: id.ID(), + OptionsObject: options, } req, err := c.Client.NewRequest(ctx, opts) @@ -57,8 +85,8 @@ func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId) (result De } // DeleteThenPoll performs Delete then polls until it's completed -func (c WorkspacesClient) DeleteThenPoll(ctx context.Context, id WorkspaceId) error { - result, err := c.Delete(ctx, id) +func (c WorkspacesClient) DeleteThenPoll(ctx context.Context, id WorkspaceId, options DeleteOperationOptions) error { + result, err := c.Delete(ctx, id, options) if err != nil { return fmt.Errorf("performing Delete: %+v", err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_listbysubscription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_listbysubscription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_listbysubscription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_automaticclusterupdatedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_automaticclusterupdatedefinition.go new file mode 100644 index 000000000000..155168bd980b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_automaticclusterupdatedefinition.go @@ -0,0 +1,8 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AutomaticClusterUpdateDefinition struct { + Value *AutomaticClusterUpdateValue `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_compliancesecurityprofiledefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_compliancesecurityprofiledefinition.go new file mode 100644 index 000000000000..c303cf3f4e8d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_compliancesecurityprofiledefinition.go @@ -0,0 +1,9 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ComplianceSecurityProfileDefinition struct { + ComplianceStandards *[]ComplianceStandard `json:"complianceStandards,omitempty"` + Value *ComplianceSecurityProfileValue `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_createdby.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_createdby.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_createdby.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_createdby.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_defaultcatalogproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_defaultcatalogproperties.go new file mode 100644 index 000000000000..511ef1ad94c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_defaultcatalogproperties.go @@ -0,0 +1,9 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DefaultCatalogProperties struct { + InitialName *string `json:"initialName,omitempty"` + InitialType *InitialType `json:"initialType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionentitiesdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionentitiesdefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionentitiesdefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionentitiesdefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionv2.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionv2.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionv2.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionv2keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionv2keyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_encryptionv2keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_encryptionv2keyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritycompliancedefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritycompliancedefinition.go new file mode 100644 index 000000000000..dad47ecca29d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritycompliancedefinition.go @@ -0,0 +1,10 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnhancedSecurityComplianceDefinition struct { + AutomaticClusterUpdate *AutomaticClusterUpdateDefinition `json:"automaticClusterUpdate,omitempty"` + ComplianceSecurityProfile *ComplianceSecurityProfileDefinition `json:"complianceSecurityProfile,omitempty"` + EnhancedSecurityMonitoring *EnhancedSecurityMonitoringDefinition `json:"enhancedSecurityMonitoring,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritymonitoringdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritymonitoringdefinition.go new file mode 100644 index 000000000000..e5685c4a6989 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_enhancedsecuritymonitoringdefinition.go @@ -0,0 +1,8 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnhancedSecurityMonitoringDefinition struct { + Value *EnhancedSecurityMonitoringValue `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_manageddiskencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_manageddiskencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_manageddiskencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_manageddiskencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_manageddiskencryptionkeyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_manageddiskencryptionkeyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_manageddiskencryptionkeyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_manageddiskencryptionkeyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_managedidentityconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_managedidentityconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_managedidentityconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_managedidentityconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustombooleanparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustombooleanparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustombooleanparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustombooleanparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomobjectparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomobjectparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomobjectparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomobjectparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomparameters.go similarity index 60% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomparameters.go index 3c55d9c99e75..3a48c1320d08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomparameters.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomparameters.go @@ -4,20 +4,20 @@ package workspaces // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkspaceCustomParameters struct { - AmlWorkspaceId *WorkspaceCustomStringParameter `json:"amlWorkspaceId,omitempty"` - CustomPrivateSubnetName *WorkspaceCustomStringParameter `json:"customPrivateSubnetName,omitempty"` - CustomPublicSubnetName *WorkspaceCustomStringParameter `json:"customPublicSubnetName,omitempty"` - CustomVirtualNetworkId *WorkspaceCustomStringParameter `json:"customVirtualNetworkId,omitempty"` - EnableNoPublicIP *WorkspaceCustomBooleanParameter `json:"enableNoPublicIp,omitempty"` - Encryption *WorkspaceEncryptionParameter `json:"encryption,omitempty"` - LoadBalancerBackendPoolName *WorkspaceCustomStringParameter `json:"loadBalancerBackendPoolName,omitempty"` - LoadBalancerId *WorkspaceCustomStringParameter `json:"loadBalancerId,omitempty"` - NatGatewayName *WorkspaceCustomStringParameter `json:"natGatewayName,omitempty"` - PrepareEncryption *WorkspaceCustomBooleanParameter `json:"prepareEncryption,omitempty"` - PublicIPName *WorkspaceCustomStringParameter `json:"publicIpName,omitempty"` - RequireInfrastructureEncryption *WorkspaceCustomBooleanParameter `json:"requireInfrastructureEncryption,omitempty"` - ResourceTags *WorkspaceCustomObjectParameter `json:"resourceTags,omitempty"` - StorageAccountName *WorkspaceCustomStringParameter `json:"storageAccountName,omitempty"` - StorageAccountSkuName *WorkspaceCustomStringParameter `json:"storageAccountSkuName,omitempty"` - VnetAddressPrefix *WorkspaceCustomStringParameter `json:"vnetAddressPrefix,omitempty"` + AmlWorkspaceId *WorkspaceCustomStringParameter `json:"amlWorkspaceId,omitempty"` + CustomPrivateSubnetName *WorkspaceCustomStringParameter `json:"customPrivateSubnetName,omitempty"` + CustomPublicSubnetName *WorkspaceCustomStringParameter `json:"customPublicSubnetName,omitempty"` + CustomVirtualNetworkId *WorkspaceCustomStringParameter `json:"customVirtualNetworkId,omitempty"` + EnableNoPublicIP *WorkspaceNoPublicIPBooleanParameter `json:"enableNoPublicIp,omitempty"` + Encryption *WorkspaceEncryptionParameter `json:"encryption,omitempty"` + LoadBalancerBackendPoolName *WorkspaceCustomStringParameter `json:"loadBalancerBackendPoolName,omitempty"` + LoadBalancerId *WorkspaceCustomStringParameter `json:"loadBalancerId,omitempty"` + NatGatewayName *WorkspaceCustomStringParameter `json:"natGatewayName,omitempty"` + PrepareEncryption *WorkspaceCustomBooleanParameter `json:"prepareEncryption,omitempty"` + PublicIPName *WorkspaceCustomStringParameter `json:"publicIpName,omitempty"` + RequireInfrastructureEncryption *WorkspaceCustomBooleanParameter `json:"requireInfrastructureEncryption,omitempty"` + ResourceTags *WorkspaceCustomObjectParameter `json:"resourceTags,omitempty"` + StorageAccountName *WorkspaceCustomStringParameter `json:"storageAccountName,omitempty"` + StorageAccountSkuName *WorkspaceCustomStringParameter `json:"storageAccountSkuName,omitempty"` + VnetAddressPrefix *WorkspaceCustomStringParameter `json:"vnetAddressPrefix,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomstringparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomstringparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacecustomstringparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacecustomstringparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceencryptionparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceencryptionparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceencryptionparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceencryptionparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacenopublicipbooleanparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacenopublicipbooleanparameter.go new file mode 100644 index 000000000000..67ec96998d64 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacenopublicipbooleanparameter.go @@ -0,0 +1,9 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkspaceNoPublicIPBooleanParameter struct { + Type *CustomParameterType `json:"type,omitempty"` + Value bool `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproperties.go new file mode 100644 index 000000000000..4d9c704b2d60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproperties.go @@ -0,0 +1,47 @@ +package workspaces + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkspaceProperties struct { + AccessConnector *WorkspacePropertiesAccessConnector `json:"accessConnector,omitempty"` + Authorizations *[]WorkspaceProviderAuthorization `json:"authorizations,omitempty"` + CreatedBy *CreatedBy `json:"createdBy,omitempty"` + CreatedDateTime *string `json:"createdDateTime,omitempty"` + DefaultCatalog *DefaultCatalogProperties `json:"defaultCatalog,omitempty"` + DefaultStorageFirewall *DefaultStorageFirewall `json:"defaultStorageFirewall,omitempty"` + DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` + Encryption *WorkspacePropertiesEncryption `json:"encryption,omitempty"` + EnhancedSecurityCompliance *EnhancedSecurityComplianceDefinition `json:"enhancedSecurityCompliance,omitempty"` + IsUcEnabled *bool `json:"isUcEnabled,omitempty"` + ManagedDiskIdentity *ManagedIdentityConfiguration `json:"managedDiskIdentity,omitempty"` + ManagedResourceGroupId string `json:"managedResourceGroupId"` + Parameters *WorkspaceCustomParameters `json:"parameters,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + RequiredNsgRules *RequiredNsgRules `json:"requiredNsgRules,omitempty"` + StorageAccountIdentity *ManagedIdentityConfiguration `json:"storageAccountIdentity,omitempty"` + UiDefinitionUri *string `json:"uiDefinitionUri,omitempty"` + UpdatedBy *CreatedBy `json:"updatedBy,omitempty"` + WorkspaceId *string `json:"workspaceId,omitempty"` + WorkspaceUrl *string `json:"workspaceUrl,omitempty"` +} + +func (o *WorkspaceProperties) GetCreatedDateTimeAsTime() (*time.Time, error) { + if o.CreatedDateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedDateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkspaceProperties) SetCreatedDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedDateTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesaccessconnector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesaccessconnector.go new file mode 100644 index 000000000000..e7f2faeb9a8b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesaccessconnector.go @@ -0,0 +1,10 @@ +package workspaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkspacePropertiesAccessConnector struct { + Id string `json:"id"` + IdentityType IdentityType `json:"identityType"` + UserAssignedIdentityId *string `json:"userAssignedIdentityId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacepropertiesencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspacepropertiesencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspacepropertiesencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproviderauthorization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproviderauthorization.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceproviderauthorization.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceproviderauthorization.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/model_workspaceupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/model_workspaceupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/version.go index bff8e584cadf..743af8d4e07a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2023-02-01" +const defaultApiVersion = "2024-05-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index f0f6ca3a2fa0..1b634e996b08 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -152,7 +152,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240506.1094936 +# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240507.1095453 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview @@ -411,8 +411,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/device github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector -github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering -github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces +github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering +github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01 github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/agreements github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey @@ -1089,7 +1089,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplands github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances -# github.com/hashicorp/go-azure-sdk/sdk v0.20240506.1094936 +# github.com/hashicorp/go-azure-sdk/sdk v0.20240507.1095453 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/sdk/auth github.com/hashicorp/go-azure-sdk/sdk/auth/autorest From 22e1def434cbe198f05797a864a94186a302ceb6 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Wed, 8 May 2024 23:46:46 +0200 Subject: [PATCH 2/9] Add docs --- .../services/databricks/databricks_workspace_resource_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/databricks/databricks_workspace_resource_test.go b/internal/services/databricks/databricks_workspace_resource_test.go index 14a3f9ee0ffb..60c01362b9c2 100644 --- a/internal/services/databricks/databricks_workspace_resource_test.go +++ b/internal/services/databricks/databricks_workspace_resource_test.go @@ -562,7 +562,7 @@ resource "azurerm_databricks_workspace" "test" { access_connector_id = azurerm_databricks_access_connector.test.id default_storage_firewall_enabled = true - + } `, data.RandomInteger, data.Locations.Primary, sku) } From 7073ad741efb760df171937de8cb6d9c2c6451cc Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Thu, 9 May 2024 00:00:12 +0200 Subject: [PATCH 3/9] Add docs for real --- website/docs/r/databricks_workspace.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/r/databricks_workspace.html.markdown b/website/docs/r/databricks_workspace.html.markdown index 70c9197876b9..badac0769f67 100644 --- a/website/docs/r/databricks_workspace.html.markdown +++ b/website/docs/r/databricks_workspace.html.markdown @@ -76,6 +76,12 @@ The following arguments are supported: * `public_network_access_enabled` - (Optional) Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. +* `default_storage_firewall_enabled` - (Optional) Disallow public access to default storage account. Defaults to `false`. + +* `access_connector_id` - (Optional) Access Connector ID to use when default storage account firewall is enabled. + +-> **Note:** The `access_connector_id` field is only required if `default_storage_firewall_enabled` is set to `true`. + * `network_security_group_rules_required` - (Optional) Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `public_network_access_enabled` is set to `false`. * `custom_parameters` - (Optional) A `custom_parameters` block as documented below. From 1da6bd894554e19d8c0d58e09aa48a0f429fb1d7 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Thu, 9 May 2024 00:02:55 +0200 Subject: [PATCH 4/9] Only parse access_connector_id if firewall is enabled --- .../databricks_workspace_resource.go | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index ca030cc862f1..767a5ff84e06 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -584,33 +584,36 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int encrypt.Entities.ManagedDisk.RotationToLatestKeyVersionEnabled = utils.Bool(rotationEnabled) } - accessConnectorIdRaw := d.Get("access_connector_id").(string) - accessConnectorId, err := accessconnector.ParseAccessConnectorID(accessConnectorIdRaw) + accessConnectorProperties := workspaces.WorkspacePropertiesAccessConnector{} - if err != nil { - return fmt.Errorf("parsing Access Connector ID %s: %+v", accessConnectorIdRaw, err) - } + if defaultStorageFirewallEnabledRaw { + accessConnectorIdRaw := d.Get("access_connector_id").(string) + accessConnectorId, err := accessconnector.ParseAccessConnectorID(accessConnectorIdRaw) - accessConnector, err := acClient.Get(ctx, *accessConnectorId) - if err != nil { - return fmt.Errorf("retrieving Access Connector %s: %+v", accessConnectorId.AccessConnectorName, err) - } + if err != nil { + return fmt.Errorf("parsing Access Connector ID %s: %+v", accessConnectorIdRaw, err) + } - accessConnectorProperties := workspaces.WorkspacePropertiesAccessConnector{} - if accessConnector.Model.Identity != nil { + accessConnector, err := acClient.Get(ctx, *accessConnectorId) + if err != nil { + return fmt.Errorf("retrieving Access Connector %s: %+v", accessConnectorId.AccessConnectorName, err) + } + + if accessConnector.Model.Identity != nil { - accIdentityId := "" - for raw := range accessConnector.Model.Identity.IdentityIds { - id, err := commonids.ParseUserAssignedIdentityIDInsensitively(raw) - if err != nil { - return fmt.Errorf("parsing %q as a User Assigned Identity ID: %+v", raw, err) + accIdentityId := "" + for raw := range accessConnector.Model.Identity.IdentityIds { + id, err := commonids.ParseUserAssignedIdentityIDInsensitively(raw) + if err != nil { + return fmt.Errorf("parsing %q as a User Assigned Identity ID: %+v", raw, err) + } + accIdentityId = id.ID() } - accIdentityId = id.ID() - } - accessConnectorProperties.Id = *accessConnector.Model.Id - accessConnectorProperties.IdentityType = workspaces.IdentityType(accessConnector.Model.Identity.Type) - accessConnectorProperties.UserAssignedIdentityId = &accIdentityId + accessConnectorProperties.Id = *accessConnector.Model.Id + accessConnectorProperties.IdentityType = workspaces.IdentityType(accessConnector.Model.Identity.Type) + accessConnectorProperties.UserAssignedIdentityId = &accIdentityId + } } // Including the Tags in the workspace parameters will update the tags on From 6f0904033f55a91cd5b9d5f7744ff98888a5f843 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Thu, 9 May 2024 00:09:58 +0200 Subject: [PATCH 5/9] Sleeeeeep is overrated --- .../databricks_workspace_resource.go | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 767a5ff84e06..8bc1a02df651 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -584,9 +584,25 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int encrypt.Entities.ManagedDisk.RotationToLatestKeyVersionEnabled = utils.Bool(rotationEnabled) } - accessConnectorProperties := workspaces.WorkspacePropertiesAccessConnector{} + // Including the Tags in the workspace parameters will update the tags on + // the workspace only + workspace := workspaces.Workspace{ + Sku: &workspaces.Sku{ + Name: skuName, + }, + Location: location, + Properties: workspaces.WorkspaceProperties{ + + PublicNetworkAccess: &publicNetworkAccess, + DefaultStorageFirewall: &defaultStorageFirewallEnabled, + ManagedResourceGroupId: managedResourceGroupID, + Parameters: customParams, + }, + Tags: tags.Expand(d.Get("tags").(map[string]interface{})), + } if defaultStorageFirewallEnabledRaw { + accessConnectorProperties := workspaces.WorkspacePropertiesAccessConnector{} accessConnectorIdRaw := d.Get("access_connector_id").(string) accessConnectorId, err := accessconnector.ParseAccessConnectorID(accessConnectorIdRaw) @@ -614,23 +630,8 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int accessConnectorProperties.IdentityType = workspaces.IdentityType(accessConnector.Model.Identity.Type) accessConnectorProperties.UserAssignedIdentityId = &accIdentityId } - } - // Including the Tags in the workspace parameters will update the tags on - // the workspace only - workspace := workspaces.Workspace{ - Sku: &workspaces.Sku{ - Name: skuName, - }, - Location: location, - Properties: workspaces.WorkspaceProperties{ - AccessConnector: &accessConnectorProperties, - PublicNetworkAccess: &publicNetworkAccess, - DefaultStorageFirewall: &defaultStorageFirewallEnabled, - ManagedResourceGroupId: managedResourceGroupID, - Parameters: customParams, - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), + workspace.Properties.AccessConnector = &accessConnectorProperties } if requireNsgRules != "" { From f609f8445eedc26afac213e4ea36931bc8a8a885 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Thu, 9 May 2024 00:19:46 +0200 Subject: [PATCH 6/9] Why are you making me suffer? --- internal/services/databricks/databricks_workspace_resource.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 8bc1a02df651..81e9c5f759c5 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -592,9 +592,7 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int }, Location: location, Properties: workspaces.WorkspaceProperties{ - PublicNetworkAccess: &publicNetworkAccess, - DefaultStorageFirewall: &defaultStorageFirewallEnabled, ManagedResourceGroupId: managedResourceGroupID, Parameters: customParams, }, @@ -632,6 +630,7 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int } workspace.Properties.AccessConnector = &accessConnectorProperties + workspace.Properties.DefaultStorageFirewall = &defaultStorageFirewallEnabled } if requireNsgRules != "" { From 445e3c101cbf87261ae622d26df31eaa360853ad Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Thu, 9 May 2024 00:54:36 +0200 Subject: [PATCH 7/9] Do not default it, causes a diff change --- internal/services/databricks/databricks_workspace_resource.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 81e9c5f759c5..b1874b2d2ec6 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -130,7 +130,6 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { "default_storage_firewall_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, RequiredWith: []string{"access_connector_id"}, }, From bdd3cb0c000e4542d3d2c464b995f2e85b182d53 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Fri, 10 May 2024 23:38:49 +0200 Subject: [PATCH 8/9] Update databricks_workspace_resource.go Co-authored-by: Tom Bamford --- internal/services/databricks/databricks_workspace_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index b1874b2d2ec6..5fda657248f2 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -621,6 +621,7 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int return fmt.Errorf("parsing %q as a User Assigned Identity ID: %+v", raw, err) } accIdentityId = id.ID() + break } accessConnectorProperties.Id = *accessConnector.Model.Id From 6b6ce758faf9a00ec7f6619466cef7b85b720dd2 Mon Sep 17 00:00:00 2001 From: Vladimir Lazarenko Date: Fri, 10 May 2024 23:39:12 +0200 Subject: [PATCH 9/9] Update databricks_workspace_resource.go Co-authored-by: Tom Bamford --- internal/services/databricks/databricks_workspace_resource.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 5fda657248f2..66a752a973f4 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -732,8 +732,7 @@ func resourceDatabricksWorkspaceRead(d *pluginsdk.ResourceData, meta interface{} d.Set("managed_resource_group_id", model.Properties.ManagedResourceGroupId) d.Set("managed_resource_group_name", managedResourceGroupID.ResourceGroup) - defaultStorageFirewall := model.Properties.DefaultStorageFirewall - if defaultStorageFirewall != nil { + if defaultStorageFirewall := model.Properties.DefaultStorageFirewall; defaultStorageFirewall != nil { d.Set("default_storage_firewall_enabled", *defaultStorageFirewall != workspaces.DefaultStorageFirewallDisabled) d.Set("access_connector_id", model.Properties.AccessConnector.Id) }