From f2366b975baee3d9140bc1955227d445c3efc25d Mon Sep 17 00:00:00 2001 From: Jeffrey Cline <20408400+WodansSon@users.noreply.github.com> Date: Thu, 21 Mar 2024 01:48:29 -0600 Subject: [PATCH] Update v4.0 RequiredWith schema attribute for managed_disk_cmk_rotation_to_latest_version_enabled field... --- .../databricks_workspace_resource.go | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/internal/services/databricks/databricks_workspace_resource.go b/internal/services/databricks/databricks_workspace_resource.go index 9e4da222ef88..6f8009827b88 100644 --- a/internal/services/databricks/databricks_workspace_resource.go +++ b/internal/services/databricks/databricks_workspace_resource.go @@ -114,12 +114,6 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { }, }, - "managed_disk_cmk_rotation_to_latest_version_enabled": { - Type: pluginsdk.TypeBool, - Optional: true, - RequiredWith: []string{"managed_disk_cmk_key_vault_key_id"}, - }, - "infrastructure_encryption_enabled": { Type: pluginsdk.TypeBool, ForceNew: true, @@ -374,6 +368,13 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { ValidateFunc: keyVaultValidate.KeyVaultChildID, Deprecated: "`managed_disk_cmk_key_vault_key_id` will be removed in favour of the property `managed_disk_cmk_key_vault_key_resource_id` in version 4.0 of the AzureRM Provider.", } + + // Old Reference... + resource.Schema["managed_disk_cmk_rotation_to_latest_version_enabled"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Optional: true, + RequiredWith: []string{"managed_disk_cmk_key_vault_key_id"}, + } } else { // NOTE: These fields maybe versioned or versionless... resource.Schema["managed_services_cmk_key_vault_key_resource_id"] = &pluginsdk.Schema{ @@ -387,6 +388,13 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource { Optional: true, ValidateFunc: validation.Any(commonids.ValidateKeyVaultKeyID, commonids.ValidateKeyVaultKeyVersionID), } + + // TODO: Make sure I updated this reference in the code below, see // Old Reference above... + resource.Schema["managed_disk_cmk_rotation_to_latest_version_enabled"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Optional: true, + RequiredWith: []string{"managed_disk_cmk_key_vault_key_resource_id"}, + } } return resource