diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go index b0bea10be1bf1..08e0fa9610a0a 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_assignment_resource_test.go @@ -107,44 +107,3 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "t } `, KeyVaultMHSMRoleDefinitionResource{}.basic(data)) } - -func (r KeyVaultManagedHSMRoleAssignmentResource) legacyBuiltInRole(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -locals { - assignmentOfficerName = "706c03c7-69ad-33e5-2796-b3380d3a6e1a" -} - -data "azurerm_key_vault_managed_hardware_security_module_role_definition" "officer" { - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri - name = "515eb02d-2335-4d2d-92f2-b1cbdf9c3778" -} - -resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id - name = local.assignmentOfficerName - scope = "/keys" - role_definition_id = data.azurerm_key_vault_managed_hardware_security_module_role_definition.officer.resource_manager_id - principal_id = data.azurerm_client_config.current.object_id -} -`, KeyVaultManagedHardwareSecurityModuleResource{}.download(data, 3)) -} - -func (r KeyVaultManagedHSMRoleAssignmentResource) legacyCustomRole(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -locals { - assignmentTestName = "1e243909-064c-6ac3-84e9-1c8bf8d6ad52" -} - -resource "azurerm_key_vault_managed_hardware_security_module_role_assignment" "test" { - managed_hsm_id = azurerm_key_vault_managed_hardware_security_module.test.id - name = local.assignmentTestName - scope = "/keys" - role_definition_id = azurerm_key_vault_managed_hardware_security_module_role_definition.test.resource_manager_id - principal_id = data.azurerm_client_config.current.object_id -} -`, KeyVaultMHSMRoleDefinitionResource{}.basic(data)) -} diff --git a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource_test.go b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource_test.go index d7f85a3c48602..acd092ebef0fa 100644 --- a/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource_test.go +++ b/internal/services/managedhsm/key_vault_managed_hardware_security_module_role_definition_resource_test.go @@ -116,66 +116,6 @@ resource "azurerm_key_vault_managed_hardware_security_module_role_definition" "t `, r.template(data), data.RandomString) } -func (r KeyVaultMHSMRoleDefinitionResource) legacy(data acceptance.TestData) string { - return fmt.Sprintf(` - - -%s - -locals { - roleTestName = "c9562a52-2bd9-2671-3d89-cea5b4798a6b" -} - -resource "azurerm_key_vault_managed_hardware_security_module_role_definition" "test" { - name = local.roleTestName - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri - description = "desc foo" - permission { - data_actions = [ - "Microsoft.KeyVault/managedHsm/keys/read/action", - "Microsoft.KeyVault/managedHsm/keys/write/action", - "Microsoft.KeyVault/managedHsm/keys/encrypt/action", - "Microsoft.KeyVault/managedHsm/keys/create", - "Microsoft.KeyVault/managedHsm/keys/delete", - ] - not_data_actions = [ - "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", - ] - } -} -`, r.template(data)) -} - -func (r KeyVaultMHSMRoleDefinitionResource) legacyUpdate(data acceptance.TestData) string { - return fmt.Sprintf(` - - -%s - -locals { - roleTestName = "c9562a52-2bd9-2671-3d89-cea5b4798a6b" -} - -resource "azurerm_key_vault_managed_hardware_security_module_role_definition" "test" { - name = local.roleTestName - vault_base_url = azurerm_key_vault_managed_hardware_security_module.test.hsm_uri - description = "desc foo2" - permission { - data_actions = [ - "Microsoft.KeyVault/managedHsm/keys/read/action", - "Microsoft.KeyVault/managedHsm/keys/write/action", - "Microsoft.KeyVault/managedHsm/keys/encrypt/action", - "Microsoft.KeyVault/managedHsm/keys/create", - ] - not_data_actions = [ - "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", - "Microsoft.KeyVault/managedHsm/keys/delete", - ] - } -} -`, r.template(data)) -} - func (r KeyVaultMHSMRoleDefinitionResource) template(data acceptance.TestData) string { return KeyVaultManagedHardwareSecurityModuleResource{}.download(data, 3) }