From 35aafc364fd2c5e772966f165f1a1b1ac5ca051e Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:22:33 +0800 Subject: [PATCH 1/8] update sdk version --- .../recoveryservices/client/client.go | 2 +- .../recovery_services_vault_data_source.go | 2 +- ...ces_vault_hyperv_host_registration_test.go | 2 +- .../recovery_services_vault_resource.go | 2 +- ...ult_resource_guard_association_resource.go | 2 +- .../recovery_services_vault_resource_test.go | 2 +- ...ecovery_hyperv_network_mapping_resource.go | 2 +- ...very_hyperv_replication_policy_resource.go | 2 +- ..._recovery_vmware_replicated_vm_resource.go | 2 +- ...replication_policy_association_resource.go | 2 +- ...very_vmware_replication_policy_resource.go | 2 +- .../vaults/README.md | 6 +- .../vaults/client.go | 0 .../vaults/constants.go | 232 ++++++++++++++++++ .../vaults/id_vault.go | 0 .../vaults/method_createorupdate.go | 0 .../vaults/method_delete.go | 0 .../vaults/method_get.go | 0 .../vaults/method_listbyresourcegroup.go | 0 .../vaults/method_listbysubscriptionid.go | 0 .../vaults/method_update.go | 0 .../vaults/model_azuremonitoralertsettings.go | 0 .../vaults/model_classicalertsettings.go | 0 .../vaults/model_cmkkekidentity.go | 0 .../vaults/model_cmkkeyvaultproperties.go | 0 .../model_crosssubscriptionrestoresettings.go | 8 + .../vaults/model_immutabilitysettings.go | 0 .../vaults/model_monitoringsettings.go | 0 .../vaults/model_patchvault.go | 0 .../vaults/model_privateendpoint.go | 0 .../vaults/model_privateendpointconnection.go | 0 ...rivateendpointconnectionvaultproperties.go | 0 ...model_privatelinkserviceconnectionstate.go | 0 .../vaults/model_restoresettings.go} | 4 +- .../vaults/model_securitysettings.go | 10 + .../vaults/model_sku.go | 0 .../vaults/model_softdeletesettings.go | 10 + .../vaults/model_upgradedetails.go | 0 .../vaults/model_vault.go | 0 .../vaults/model_vaultproperties.go | 2 + .../vaults/model_vaultpropertiesencryption.go | 0 .../model_vaultpropertiesmovedetails.go | 0 ...model_vaultpropertiesredundancysettings.go | 0 .../vaults/predicates.go | 0 .../vaults/version.go | 2 +- vendor/modules.txt | 2 +- 46 files changed, 280 insertions(+), 18 deletions(-) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/constants.go (73%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/id_vault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_listbyresourcegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_listbysubscriptionid.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_azuremonitoralertsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_classicalertsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_cmkkekidentity.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_cmkkeyvaultproperties.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_crosssubscriptionrestoresettings.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_immutabilitysettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_monitoringsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_patchvault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_privateendpoint.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_privateendpointconnection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_privateendpointconnectionvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_privatelinkserviceconnectionstate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01/vaults/model_securitysettings.go => 2024-01-01/vaults/model_restoresettings.go} (53%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_securitysettings.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_sku.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_softdeletesettings.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_upgradedetails.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_vault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_vaultproperties.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_vaultpropertiesencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_vaultpropertiesmovedetails.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/model_vaultpropertiesredundancysettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/{2022-10-01 => 2024-01-01}/vaults/version.go (88%) diff --git a/internal/services/recoveryservices/client/client.go b/internal/services/recoveryservices/client/client.go index 3433eaf5e92d..cf9f28b8ebdf 100644 --- a/internal/services/recoveryservices/client/client.go +++ b/internal/services/recoveryservices/client/client.go @@ -9,7 +9,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2021-12-01/backup" // nolint: staticcheck vmwaremachines "github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/machines" vmwarerunasaccounts "github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/runasaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr" diff --git a/internal/services/recoveryservices/recovery_services_vault_data_source.go b/internal/services/recoveryservices/recovery_services_vault_data_source.go index 26f502350bb8..87662390eca3 100644 --- a/internal/services/recoveryservices/recovery_services_vault_data_source.go +++ b/internal/services/recoveryservices/recovery_services_vault_data_source.go @@ -11,7 +11,7 @@ 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/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "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/recoveryservices/recovery_services_vault_hyperv_host_registration_test.go b/internal/services/recoveryservices/recovery_services_vault_hyperv_host_registration_test.go index d4c8f6b0dcfc..45191e577d0d 100644 --- a/internal/services/recoveryservices/recovery_services_vault_hyperv_host_registration_test.go +++ b/internal/services/recoveryservices/recovery_services_vault_hyperv_host_registration_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/azuresdkhacks" diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index 2e968cb7273b..de8a315e6676 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting" diff --git a/internal/services/recoveryservices/recovery_services_vault_resource_guard_association_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource_guard_association_resource.go index d673ea7bfd95..d7e6dfb698fb 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource_guard_association_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource_guard_association_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/resourceguards" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" diff --git a/internal/services/recoveryservices/recovery_services_vault_resource_test.go b/internal/services/recoveryservices/recovery_services_vault_resource_test.go index f1c98df34598..1e92e477d96b 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource_test.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource_test.go @@ -9,7 +9,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "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/recoveryservices/site_recovery_hyperv_network_mapping_resource.go b/internal/services/recoveryservices/site_recovery_hyperv_network_mapping_resource.go index 7483685f6f45..576bd37ce047 100644 --- a/internal/services/recoveryservices/site_recovery_hyperv_network_mapping_resource.go +++ b/internal/services/recoveryservices/site_recovery_hyperv_network_mapping_resource.go @@ -10,7 +10,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/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks" diff --git a/internal/services/recoveryservices/site_recovery_hyperv_replication_policy_resource.go b/internal/services/recoveryservices/site_recovery_hyperv_replication_policy_resource.go index 57cd550a1b1d..92640e49ab9c 100644 --- a/internal/services/recoveryservices/site_recovery_hyperv_replication_policy_resource.go +++ b/internal/services/recoveryservices/site_recovery_hyperv_replication_policy_resource.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/recoveryservices/site_recovery_vmware_replicated_vm_resource.go b/internal/services/recoveryservices/site_recovery_vmware_replicated_vm_resource.go index cfcd74a72627..e804834387bd 100644 --- a/internal/services/recoveryservices/site_recovery_vmware_replicated_vm_resource.go +++ b/internal/services/recoveryservices/site_recovery_vmware_replicated_vm_resource.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups" vmwaremachines "github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/machines" vmwarerunasaccounts "github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/runasaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems" diff --git a/internal/services/recoveryservices/site_recovery_vmware_replication_policy_association_resource.go b/internal/services/recoveryservices/site_recovery_vmware_replication_policy_association_resource.go index 573d96ccc604..a7e0f09e464a 100644 --- a/internal/services/recoveryservices/site_recovery_vmware_replication_policy_association_resource.go +++ b/internal/services/recoveryservices/site_recovery_vmware_replication_policy_association_resource.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers" diff --git a/internal/services/recoveryservices/site_recovery_vmware_replication_policy_resource.go b/internal/services/recoveryservices/site_recovery_vmware_replication_policy_resource.go index 1f62726f9973..670aa4c9f1e8 100644 --- a/internal/services/recoveryservices/site_recovery_vmware_replication_policy_resource.go +++ b/internal/services/recoveryservices/site_recovery_vmware_replication_policy_resource.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/README.md index ae90e2661a76..d9f3c5cb810c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-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/recoveryservices/2022-10-01/vaults" +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/constants.go similarity index 73% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/constants.go index b414f88ed127..6da7a52fa02c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/constants.go @@ -135,6 +135,97 @@ func parseCrossRegionRestore(input string) (*CrossRegionRestore, error) { return &out, nil } +type CrossSubscriptionRestoreState string + +const ( + CrossSubscriptionRestoreStateDisabled CrossSubscriptionRestoreState = "Disabled" + CrossSubscriptionRestoreStateEnabled CrossSubscriptionRestoreState = "Enabled" + CrossSubscriptionRestoreStatePermanentlyDisabled CrossSubscriptionRestoreState = "PermanentlyDisabled" +) + +func PossibleValuesForCrossSubscriptionRestoreState() []string { + return []string{ + string(CrossSubscriptionRestoreStateDisabled), + string(CrossSubscriptionRestoreStateEnabled), + string(CrossSubscriptionRestoreStatePermanentlyDisabled), + } +} + +func (s *CrossSubscriptionRestoreState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCrossSubscriptionRestoreState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCrossSubscriptionRestoreState(input string) (*CrossSubscriptionRestoreState, error) { + vals := map[string]CrossSubscriptionRestoreState{ + "disabled": CrossSubscriptionRestoreStateDisabled, + "enabled": CrossSubscriptionRestoreStateEnabled, + "permanentlydisabled": CrossSubscriptionRestoreStatePermanentlyDisabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CrossSubscriptionRestoreState(input) + return &out, nil +} + +type EnhancedSecurityState string + +const ( + EnhancedSecurityStateAlwaysON EnhancedSecurityState = "AlwaysON" + EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" + EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" + EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" +) + +func PossibleValuesForEnhancedSecurityState() []string { + return []string{ + string(EnhancedSecurityStateAlwaysON), + string(EnhancedSecurityStateDisabled), + string(EnhancedSecurityStateEnabled), + string(EnhancedSecurityStateInvalid), + } +} + +func (s *EnhancedSecurityState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnhancedSecurityState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnhancedSecurityState(input string) (*EnhancedSecurityState, error) { + vals := map[string]EnhancedSecurityState{ + "alwayson": EnhancedSecurityStateAlwaysON, + "disabled": EnhancedSecurityStateDisabled, + "enabled": EnhancedSecurityStateEnabled, + "invalid": EnhancedSecurityStateInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnhancedSecurityState(input) + return &out, nil +} + type ImmutabilityState string const ( @@ -220,6 +311,50 @@ func parseInfrastructureEncryptionState(input string) (*InfrastructureEncryption return &out, nil } +type MultiUserAuthorization string + +const ( + MultiUserAuthorizationDisabled MultiUserAuthorization = "Disabled" + MultiUserAuthorizationEnabled MultiUserAuthorization = "Enabled" + MultiUserAuthorizationInvalid MultiUserAuthorization = "Invalid" +) + +func PossibleValuesForMultiUserAuthorization() []string { + return []string{ + string(MultiUserAuthorizationDisabled), + string(MultiUserAuthorizationEnabled), + string(MultiUserAuthorizationInvalid), + } +} + +func (s *MultiUserAuthorization) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMultiUserAuthorization(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMultiUserAuthorization(input string) (*MultiUserAuthorization, error) { + vals := map[string]MultiUserAuthorization{ + "disabled": MultiUserAuthorizationDisabled, + "enabled": MultiUserAuthorizationEnabled, + "invalid": MultiUserAuthorizationInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MultiUserAuthorization(input) + return &out, nil +} + type PrivateEndpointConnectionStatus string const ( @@ -420,6 +555,53 @@ func parseResourceMoveState(input string) (*ResourceMoveState, error) { return &out, nil } +type SecureScoreLevel string + +const ( + SecureScoreLevelAdequate SecureScoreLevel = "Adequate" + SecureScoreLevelMaximum SecureScoreLevel = "Maximum" + SecureScoreLevelMinimum SecureScoreLevel = "Minimum" + SecureScoreLevelNone SecureScoreLevel = "None" +) + +func PossibleValuesForSecureScoreLevel() []string { + return []string{ + string(SecureScoreLevelAdequate), + string(SecureScoreLevelMaximum), + string(SecureScoreLevelMinimum), + string(SecureScoreLevelNone), + } +} + +func (s *SecureScoreLevel) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecureScoreLevel(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecureScoreLevel(input string) (*SecureScoreLevel, error) { + vals := map[string]SecureScoreLevel{ + "adequate": SecureScoreLevelAdequate, + "maximum": SecureScoreLevelMaximum, + "minimum": SecureScoreLevelMinimum, + "none": SecureScoreLevelNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecureScoreLevel(input) + return &out, nil +} + type SkuName string const ( @@ -461,10 +643,58 @@ func parseSkuName(input string) (*SkuName, error) { return &out, nil } +type SoftDeleteState string + +const ( + SoftDeleteStateAlwaysON SoftDeleteState = "AlwaysON" + SoftDeleteStateDisabled SoftDeleteState = "Disabled" + SoftDeleteStateEnabled SoftDeleteState = "Enabled" + SoftDeleteStateInvalid SoftDeleteState = "Invalid" +) + +func PossibleValuesForSoftDeleteState() []string { + return []string{ + string(SoftDeleteStateAlwaysON), + string(SoftDeleteStateDisabled), + string(SoftDeleteStateEnabled), + string(SoftDeleteStateInvalid), + } +} + +func (s *SoftDeleteState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSoftDeleteState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSoftDeleteState(input string) (*SoftDeleteState, error) { + vals := map[string]SoftDeleteState{ + "alwayson": SoftDeleteStateAlwaysON, + "disabled": SoftDeleteStateDisabled, + "enabled": SoftDeleteStateEnabled, + "invalid": SoftDeleteStateInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SoftDeleteState(input) + return &out, nil +} + type StandardTierStorageRedundancy string const ( StandardTierStorageRedundancyGeoRedundant StandardTierStorageRedundancy = "GeoRedundant" + StandardTierStorageRedundancyInvalid StandardTierStorageRedundancy = "Invalid" StandardTierStorageRedundancyLocallyRedundant StandardTierStorageRedundancy = "LocallyRedundant" StandardTierStorageRedundancyZoneRedundant StandardTierStorageRedundancy = "ZoneRedundant" ) @@ -472,6 +702,7 @@ const ( func PossibleValuesForStandardTierStorageRedundancy() []string { return []string{ string(StandardTierStorageRedundancyGeoRedundant), + string(StandardTierStorageRedundancyInvalid), string(StandardTierStorageRedundancyLocallyRedundant), string(StandardTierStorageRedundancyZoneRedundant), } @@ -493,6 +724,7 @@ func (s *StandardTierStorageRedundancy) UnmarshalJSON(bytes []byte) error { func parseStandardTierStorageRedundancy(input string) (*StandardTierStorageRedundancy, error) { vals := map[string]StandardTierStorageRedundancy{ "georedundant": StandardTierStorageRedundancyGeoRedundant, + "invalid": StandardTierStorageRedundancyInvalid, "locallyredundant": StandardTierStorageRedundancyLocallyRedundant, "zoneredundant": StandardTierStorageRedundancyZoneRedundant, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_listbysubscriptionid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_listbysubscriptionid.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_listbysubscriptionid.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_listbysubscriptionid.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_azuremonitoralertsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_azuremonitoralertsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_azuremonitoralertsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_azuremonitoralertsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_classicalertsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_classicalertsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_classicalertsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_classicalertsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_cmkkekidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_cmkkekidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_cmkkekidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_cmkkekidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_cmkkeyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_cmkkeyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_cmkkeyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_cmkkeyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_crosssubscriptionrestoresettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_crosssubscriptionrestoresettings.go new file mode 100644 index 000000000000..4a4fecb8bdd7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_crosssubscriptionrestoresettings.go @@ -0,0 +1,8 @@ +package vaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CrossSubscriptionRestoreSettings struct { + CrossSubscriptionRestoreState *CrossSubscriptionRestoreState `json:"crossSubscriptionRestoreState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_immutabilitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_immutabilitysettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_immutabilitysettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_immutabilitysettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_monitoringsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_monitoringsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_monitoringsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_monitoringsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_patchvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_patchvault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_patchvault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_patchvault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpointconnectionvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpointconnectionvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privateendpointconnectionvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privateendpointconnectionvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_securitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_restoresettings.go similarity index 53% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_securitysettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_restoresettings.go index 1174404fe34b..b5126dbe2638 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_securitysettings.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_restoresettings.go @@ -3,6 +3,6 @@ package vaults // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SecuritySettings struct { - ImmutabilitySettings *ImmutabilitySettings `json:"immutabilitySettings,omitempty"` +type RestoreSettings struct { + CrossSubscriptionRestoreSettings *CrossSubscriptionRestoreSettings `json:"crossSubscriptionRestoreSettings,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_securitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_securitysettings.go new file mode 100644 index 000000000000..b5c9821e9445 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_securitysettings.go @@ -0,0 +1,10 @@ +package vaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecuritySettings struct { + ImmutabilitySettings *ImmutabilitySettings `json:"immutabilitySettings,omitempty"` + MultiUserAuthorization *MultiUserAuthorization `json:"multiUserAuthorization,omitempty"` + SoftDeleteSettings *SoftDeleteSettings `json:"softDeleteSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_softdeletesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_softdeletesettings.go new file mode 100644 index 000000000000..fb257ac28c7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_softdeletesettings.go @@ -0,0 +1,10 @@ +package vaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SoftDeleteSettings struct { + EnhancedSecurityState *EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SoftDeleteState *SoftDeleteState `json:"softDeleteState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_upgradedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_upgradedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_upgradedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_upgradedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultproperties.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultproperties.go index 8a41fd3830d8..01dae5e76f89 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultproperties.go @@ -15,6 +15,8 @@ type VaultProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` RedundancySettings *VaultPropertiesRedundancySettings `json:"redundancySettings,omitempty"` + RestoreSettings *RestoreSettings `json:"restoreSettings,omitempty"` + SecureScore *SecureScoreLevel `json:"secureScore,omitempty"` SecuritySettings *SecuritySettings `json:"securitySettings,omitempty"` UpgradeDetails *UpgradeDetails `json:"upgradeDetails,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesmovedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesmovedetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesmovedetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesmovedetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesredundancysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesredundancysettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/model_vaultpropertiesredundancysettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/model_vaultpropertiesredundancysettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/version.go index 3c996fb498a7..7341dbff3bc1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults/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 = "2022-10-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index 5a0b1ca60086..e95b98a7fcdb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -868,7 +868,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/records github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr From 20ac280544afc948c273a34ec329e5b34c7a4a81 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:09:01 +0800 Subject: [PATCH 2/8] update sdk version --- internal/services/recoveryservices/client/client.go | 2 +- .../recoveryservices/recovery_services_vault_resource.go | 2 +- .../backupresourcestorageconfigsnoncrr/README.md | 6 +++--- .../backupresourcestorageconfigsnoncrr/client.go | 0 .../backupresourcestorageconfigsnoncrr/constants.go | 0 .../backupresourcestorageconfigsnoncrr/id_vault.go | 0 .../method_get_autorest.go | 0 .../method_patch_autorest.go | 0 .../method_update_autorest.go | 0 .../model_backupresourceconfig.go | 0 .../model_backupresourceconfigresource.go | 0 .../backupresourcestorageconfigsnoncrr/version.go | 2 +- vendor/modules.txt | 2 +- 13 files changed, 7 insertions(+), 7 deletions(-) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/README.md (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/id_vault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/method_get_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/method_patch_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/method_update_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/{2023-02-01 => 2024-01-01}/backupresourcestorageconfigsnoncrr/version.go (89%) diff --git a/internal/services/recoveryservices/client/client.go b/internal/services/recoveryservices/client/client.go index cf9f28b8ebdf..fea0ff93d250 100644 --- a/internal/services/recoveryservices/client/client.go +++ b/internal/services/recoveryservices/client/client.go @@ -12,12 +12,12 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks" diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index de8a315e6676..75590ddc856a 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs" + "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md index d04dbb012512..6c666eee43a3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-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/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr" +import "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go index 0184cb1ad5da..b230fb1e970b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/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-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index e95b98a7fcdb..a338d66c1549 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -871,12 +871,12 @@ github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/v github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy +github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks From 85c0b09918af9d8ca2b6423bfba39f035bdd9a64 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:40:38 +0800 Subject: [PATCH 3/8] use Vault API to mange storage settings --- .../recoveryservices/client/client.go | 6 - .../recovery_services_vault_resource.go | 193 +++++------------- 2 files changed, 48 insertions(+), 151 deletions(-) diff --git a/internal/services/recoveryservices/client/client.go b/internal/services/recoveryservices/client/client.go index fea0ff93d250..af7d0f7a12a6 100644 --- a/internal/services/recoveryservices/client/client.go +++ b/internal/services/recoveryservices/client/client.go @@ -17,7 +17,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks" @@ -48,7 +47,6 @@ type Client struct { VaultCertificatesClient *azuresdkhacks.VaultCertificatesClient VaultReplicationProvider *replicationrecoveryservicesproviders.ReplicationRecoveryServicesProvidersClient VaultsSettingsClient *replicationvaultsetting.ReplicationVaultSettingClient - StorageConfigsClient *backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient FabricClient *replicationfabrics.ReplicationFabricsClient ProtectionContainerClient *replicationprotectioncontainers.ReplicationProtectionContainersClient ReplicationPoliciesClient *replicationpolicies.ReplicationPoliciesClient @@ -72,9 +70,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(vaultSettingsClient.Client, o.Authorizers.ResourceManager) - storageConfigsClient := backupresourcestorageconfigsnoncrr.NewBackupResourceStorageConfigsNonCRRClientWithBaseURI(o.ResourceManagerEndpoint) - o.ConfigureClient(&storageConfigsClient.Client, o.ResourceManagerAuthorizer) - vaultsClient, err := vaults.NewVaultsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building Vaults client: %+v", err) @@ -188,7 +183,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { VaultsConfigsClient: &vaultConfigsClient, VaultCertificatesClient: &vaultCertificatesClient, VaultsSettingsClient: vaultSettingsClient, - StorageConfigsClient: &storageConfigsClient, FabricClient: fabricClient, ProtectionContainerClient: protectionContainerClient, ReplicationPoliciesClient: replicationPoliciesClient, diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index 75590ddc856a..0266b002b93c 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -19,7 +19,6 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs" - "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" "github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -126,11 +125,11 @@ func resourceRecoveryServicesVault() *pluginsdk.Resource { "storage_mode_type": { Type: pluginsdk.TypeString, Optional: true, - Default: backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant, + Default: vaults.StandardTierStorageRedundancyGeoRedundant, ValidateFunc: validation.StringInSlice([]string{ - string(backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant), - string(backupresourcestorageconfigsnoncrr.StorageTypeLocallyRedundant), - string(backupresourcestorageconfigsnoncrr.StorageTypeZoneRedundant), + string(vaults.StandardTierStorageRedundancyGeoRedundant), + string(vaults.StandardTierStorageRedundancyLocallyRedundant), + string(vaults.StandardTierStorageRedundancyZoneRedundant), }, false), }, @@ -189,18 +188,12 @@ func resourceRecoveryServicesVault() *pluginsdk.Resource { func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).RecoveryServices.VaultsClient cfgsClient := meta.(*clients.Client).RecoveryServices.VaultsConfigsClient - storageCfgsClient := meta.(*clients.Client).RecoveryServices.StorageConfigsClient settingsClient := meta.(*clients.Client).RecoveryServices.VaultsSettingsClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() id := vaults.NewVaultID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - storageId := backupresourcestorageconfigsnoncrr.VaultId{ - SubscriptionId: id.SubscriptionId, - ResourceGroupName: id.ResourceGroupName, - VaultName: id.VaultName, - } cfgId := backupresourcevaultconfigs.VaultId{ SubscriptionId: id.SubscriptionId, ResourceGroupName: id.ResourceGroupName, @@ -210,8 +203,8 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa storageMode := d.Get("storage_mode_type").(string) crossRegionRestore := d.Get("cross_region_restore_enabled").(bool) - if crossRegionRestore && storageMode != string(backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant) { - return fmt.Errorf("cannot enable cross region restore when storage mode type is not %s. %s", string(backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant), id.String()) + if crossRegionRestore && storageMode != string(vaults.StandardTierStorageRedundancyGeoRedundant) { + return fmt.Errorf("cannot enable cross region restore when storage mode type is not %s. %s", string(vaults.StandardTierStorageRedundancyGeoRedundant), id.String()) } location := d.Get("location").(string) @@ -245,6 +238,15 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa Properties: &vaults.VaultProperties{ PublicNetworkAccess: expandRecoveryServicesVaultPublicNetworkAccess(d.Get("public_network_access_enabled").(bool)), MonitoringSettings: expandRecoveryServicesVaultMonitorSettings(d.Get("monitoring").([]interface{})), + RedundancySettings: &vaults.VaultPropertiesRedundancySettings{ + CrossRegionRestore: pointer.To(func() vaults.CrossRegionRestore { + if d.Get("cross_region_restore_enabled").(bool) { + return vaults.CrossRegionRestoreEnabled + } + return vaults.CrossRegionRestoreDisabled + }()), + StandardTierStorageRedundancy: pointer.To(vaults.StandardTierStorageRedundancy(d.Get("storage_mode_type").(string))), + }, }, } @@ -305,53 +307,6 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa } - storageType := backupresourcestorageconfigsnoncrr.StorageType(d.Get("storage_mode_type").(string)) - storageCfg := backupresourcestorageconfigsnoncrr.BackupResourceConfigResource{ - Properties: &backupresourcestorageconfigsnoncrr.BackupResourceConfig{ - StorageModelType: &storageType, - CrossRegionRestoreFlag: utils.Bool(d.Get("cross_region_restore_enabled").(bool)), - }, - } - - err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutCreate), func() *pluginsdk.RetryError { - if resp, err := storageCfgsClient.Update(ctx, storageId, storageCfg); err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pluginsdk.RetryableError(fmt.Errorf("updating Recovery Service Storage Cfg %s: %+v", id.String(), err)) - } - - return pluginsdk.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - - // storage type is not updated instantaneously, so we wait until storage type is correct - err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutCreate), func() *pluginsdk.RetryError { - if resp, err := storageCfgsClient.Get(ctx, storageId); err == nil { - if resp.Model == nil { - return pluginsdk.NonRetryableError(fmt.Errorf("updating %s Storage Config: `model` was nil", id)) - } - if resp.Model.Properties == nil { - return pluginsdk.NonRetryableError(fmt.Errorf("updating %s Storage Config: `properties` was nil", id)) - } - if *resp.Model.Properties.StorageType != *storageCfg.Properties.StorageModelType { - return pluginsdk.RetryableError(fmt.Errorf("updating Storage Config: %+v", err)) - } - if *resp.Model.Properties.CrossRegionRestoreFlag != *storageCfg.Properties.CrossRegionRestoreFlag { - return pluginsdk.RetryableError(fmt.Errorf("updating Storage Config: %+v", err)) - } - } else { - return pluginsdk.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("creating %s: %+v", id, err) - } - // an update on the vault will reset the vault config to default, so we handle it at last. enhancedSecurityState := backupresourcevaultconfigs.EnhancedSecurityStateEnabled cfg := backupresourcevaultconfigs.BackupResourceVaultConfigResource{ @@ -413,17 +368,11 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).RecoveryServices.VaultsClient cfgsClient := meta.(*clients.Client).RecoveryServices.VaultsConfigsClient - storageCfgsClient := meta.(*clients.Client).RecoveryServices.StorageConfigsClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() id := vaults.NewVaultID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - storageId := backupresourcestorageconfigsnoncrr.VaultId{ - SubscriptionId: id.SubscriptionId, - ResourceGroupName: id.ResourceGroupName, - VaultName: id.VaultName, - } cfgId := backupresourcevaultconfigs.VaultId{ SubscriptionId: id.SubscriptionId, ResourceGroupName: id.ResourceGroupName, @@ -473,8 +422,8 @@ func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interfa storageMode := d.Get("storage_mode_type").(string) crossRegionRestore := d.Get("cross_region_restore_enabled").(bool) - if crossRegionRestore && storageMode != string(backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant) { - return fmt.Errorf("cannot enable cross region restore when storage mode type is not %s. %s", string(backupresourcestorageconfigsnoncrr.StorageTypeGeoRedundant), id.String()) + if crossRegionRestore && storageMode != string(vaults.StandardTierStorageRedundancyGeoRedundant) { + return fmt.Errorf("cannot enable cross region restore when storage mode type is not %s. %s", string(vaults.StandardTierStorageRedundancyGeoRedundant), id.String()) } enhanchedSecurityState := backupresourcevaultconfigs.EnhancedSecurityStateEnabled @@ -484,58 +433,6 @@ func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interfa }, } - if d.HasChanges("storage_mode_type", "cross_region_restore_enabled") { - storageType := backupresourcestorageconfigsnoncrr.StorageType(storageMode) - storageCfg := backupresourcestorageconfigsnoncrr.BackupResourceConfigResource{ - Properties: &backupresourcestorageconfigsnoncrr.BackupResourceConfig{ - StorageModelType: &storageType, - CrossRegionRestoreFlag: utils.Bool(crossRegionRestore), - }, - } - - err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutUpdate), func() *pluginsdk.RetryError { - if resp, err := storageCfgsClient.Update(ctx, storageId, storageCfg); err != nil { - if response.WasNotFound(resp.HttpResponse) { - return pluginsdk.RetryableError(fmt.Errorf("updating Recovery Service Storage Cfg %s: %+v", id.String(), err)) - } - if response.WasBadRequest(resp.HttpResponse) { - return pluginsdk.RetryableError(fmt.Errorf("updating Recovery Service Storage Cfg %s: %+v", id.String(), err)) - } - - return pluginsdk.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - // storage type is not updated instantaneously, so we wait until storage type is correct - err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutUpdate), func() *pluginsdk.RetryError { - if resp, err := storageCfgsClient.Get(ctx, storageId); err == nil { - if resp.Model == nil { - return pluginsdk.NonRetryableError(fmt.Errorf("updating %s Storage Config: `model` was nil", id)) - } - if resp.Model.Properties == nil { - return pluginsdk.NonRetryableError(fmt.Errorf("updating %s Storage Config: `properties` was nil", id)) - } - if *resp.Model.Properties.StorageType != *storageCfg.Properties.StorageModelType { - return pluginsdk.RetryableError(fmt.Errorf("updating Storage Config: %+v", err)) - } - if *resp.Model.Properties.CrossRegionRestoreFlag != *storageCfg.Properties.CrossRegionRestoreFlag { - return pluginsdk.RetryableError(fmt.Errorf("updating Storage Config: %+v", err)) - } - } else { - return pluginsdk.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - } - // `sku` can only be updated by `CreateOrUpdate` but not `Update`, so use `CreateOrUpdate` with required and unchangeable properties if d.HasChange("sku") { sku := d.Get("sku").(string) @@ -609,6 +506,18 @@ func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interfa vault.Properties.SecuritySettings = expandRecoveryServicesVaultSecuritySettings(immutability) } + if d.HasChanges("storage_mode_type", "cross_region_restore_enabled") { + vault.Properties.RedundancySettings = &vaults.VaultPropertiesRedundancySettings{ + CrossRegionRestore: pointer.To(func() vaults.CrossRegionRestore { + if crossRegionRestore { + return vaults.CrossRegionRestoreEnabled + } + return vaults.CrossRegionRestoreDisabled + }()), + StandardTierStorageRedundancy: pointer.To(vaults.StandardTierStorageRedundancy(storageMode)), + } + } + err = client.UpdateThenPoll(ctx, id, vault) if err != nil { return fmt.Errorf("updating %s: %+v", id, err) @@ -664,7 +573,6 @@ func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interfa func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).RecoveryServices.VaultsClient cfgsClient := meta.(*clients.Client).RecoveryServices.VaultsConfigsClient - storageCfgsClient := meta.(*clients.Client).RecoveryServices.StorageConfigsClient vaultSettingsClient := meta.(*clients.Client).RecoveryServices.VaultsSettingsClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -673,11 +581,6 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface if err != nil { return err } - storageId := backupresourcestorageconfigsnoncrr.VaultId{ - SubscriptionId: id.SubscriptionId, - ResourceGroupName: id.ResourceGroupName, - VaultName: id.VaultName, - } cfgId := backupresourcevaultconfigs.VaultId{ SubscriptionId: id.SubscriptionId, ResourceGroupName: id.ResourceGroupName, @@ -709,16 +612,27 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface d.Set("sku", string(sku.Name)) } - if model.Properties != nil && model.Properties.SecuritySettings != nil && model.Properties.SecuritySettings.ImmutabilitySettings != nil { - d.Set("immutability", string(pointer.From(model.Properties.SecuritySettings.ImmutabilitySettings.State))) - } + if prop := model.Properties; prop != nil { + if prop.SecuritySettings != nil && prop.SecuritySettings.ImmutabilitySettings != nil { + d.Set("immutability", string(pointer.From(prop.SecuritySettings.ImmutabilitySettings.State))) + } - if model.Properties != nil && model.Properties.PublicNetworkAccess != nil { - d.Set("public_network_access_enabled", flattenRecoveryServicesVaultPublicNetworkAccess(model.Properties.PublicNetworkAccess)) - } + if prop.PublicNetworkAccess != nil { + d.Set("public_network_access_enabled", flattenRecoveryServicesVaultPublicNetworkAccess(model.Properties.PublicNetworkAccess)) + } - if model.Properties != nil && model.Properties.MonitoringSettings != nil { - d.Set("monitoring", flattenRecoveryServicesVaultMonitorSettings(*model.Properties.MonitoringSettings)) + if prop.MonitoringSettings != nil { + d.Set("monitoring", flattenRecoveryServicesVaultMonitorSettings(*model.Properties.MonitoringSettings)) + } + + if prop.RedundancySettings != nil { + d.Set("storage_mode_type", string(pointer.From(prop.RedundancySettings.StandardTierStorageRedundancy))) + crossRegionRestoreEnabled := false + if prop.RedundancySettings.CrossRegionRestore != nil { + crossRegionRestoreEnabled = *prop.RedundancySettings.CrossRegionRestore == vaults.CrossRegionRestoreEnabled + } + d.Set("cross_region_restore_enabled", crossRegionRestoreEnabled) + } } cfg, err := cfgsClient.Get(ctx, cfgId) @@ -730,17 +644,6 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface d.Set("soft_delete_enabled", *cfg.Model.Properties.SoftDeleteFeatureState == backupresourcevaultconfigs.SoftDeleteFeatureStateEnabled) } - storageCfg, err := storageCfgsClient.Get(ctx, storageId) - if err != nil { - return fmt.Errorf("reading Recovery Service storage Cfg %s: %+v", id.String(), err) - } - - if storageCfg.Model != nil && storageCfg.Model.Properties != nil { - props := storageCfg.Model.Properties - d.Set("storage_mode_type", string(pointer.From(props.StorageModelType))) - d.Set("cross_region_restore_enabled", props.CrossRegionRestoreFlag) - } - flattenIdentity, err := identity.FlattenSystemAndUserAssignedMap(model.Identity) if err != nil { return fmt.Errorf("flattening `identity`: %+v", err) From c7fc516f42d7bc6a1a6986cf7eb1ef3ebfd16519 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:40:15 +0800 Subject: [PATCH 4/8] update encryption parameter in new sdk version --- .../recovery_services_vault_resource.go | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index 0266b002b93c..c72fe0f9d97e 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -254,6 +254,14 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa vault.Sku.Tier = utils.String("Standard") } + if _, ok := d.GetOk("encryption"); ok { + encryption, err := expandEncryption(d) + if err != nil { + return err + } + vault.Properties.Encryption = encryption + } + requireAdditionalUpdate := false updatePatch := vaults.PatchVault{ Properties: &vaults.VaultProperties{}, @@ -288,17 +296,6 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa return fmt.Errorf("creating %s: %+v", id.String(), err) } - // `encryption` needs to be set before `cross_region_restore_enabled` is set. Or the service will return an error. "If CRR is enabled for the Vault, the storage state will be locked and it will interfere with further operations" - // recovery vault's encryption config cannot be set while creation, so a standalone update is required. - if _, ok := d.GetOk("encryption"); ok { - encryption, err := expandEncryption(d) - if err != nil { - return err - } - requireAdditionalUpdate = true - updatePatch.Properties.Encryption = encryption - } - if requireAdditionalUpdate { err := client.UpdateThenPoll(ctx, id, updatePatch) if err != nil { @@ -306,7 +303,6 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa } } - // an update on the vault will reset the vault config to default, so we handle it at last. enhancedSecurityState := backupresourcevaultconfigs.EnhancedSecurityStateEnabled cfg := backupresourcevaultconfigs.BackupResourceVaultConfigResource{ From 69814692397e0133f21dff503b23a2cf7c7a8cbc Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:14:45 +0800 Subject: [PATCH 5/8] vendor refresh --- .../README.md | 78 ---------- .../client.go | 18 --- .../constants.go | 136 ------------------ .../id_vault.go | 125 ---------------- .../method_get_autorest.go | 69 --------- .../method_patch_autorest.go | 68 --------- .../method_update_autorest.go | 70 --------- .../model_backupresourceconfig.go | 13 -- .../model_backupresourceconfigresource.go | 14 -- .../version.go | 12 -- vendor/modules.txt | 1 - 11 files changed, 604 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md deleted file mode 100644 index 6c666eee43a3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md +++ /dev/null @@ -1,78 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr` Documentation - -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-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/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr" -``` - - -### Client Initialization - -```go -client := backupresourcestorageconfigsnoncrr.NewBackupResourceStorageConfigsNonCRRClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BackupResourceStorageConfigsNonCRRClient.Get` - -```go -ctx := context.TODO() -id := backupresourcestorageconfigsnoncrr.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BackupResourceStorageConfigsNonCRRClient.Patch` - -```go -ctx := context.TODO() -id := backupresourcestorageconfigsnoncrr.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -payload := backupresourcestorageconfigsnoncrr.BackupResourceConfigResource{ - // ... -} - - -read, err := client.Patch(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BackupResourceStorageConfigsNonCRRClient.Update` - -```go -ctx := context.TODO() -id := backupresourcestorageconfigsnoncrr.NewVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vaultValue") - -payload := backupresourcestorageconfigsnoncrr.BackupResourceConfigResource{ - // ... -} - - -read, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go deleted file mode 100644 index 88d28c49c499..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupResourceStorageConfigsNonCRRClient struct { - Client autorest.Client - baseUri string -} - -func NewBackupResourceStorageConfigsNonCRRClientWithBaseURI(endpoint string) BackupResourceStorageConfigsNonCRRClient { - return BackupResourceStorageConfigsNonCRRClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go deleted file mode 100644 index 6ae51ba9c4a2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go +++ /dev/null @@ -1,136 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DedupState string - -const ( - DedupStateDisabled DedupState = "Disabled" - DedupStateEnabled DedupState = "Enabled" - DedupStateInvalid DedupState = "Invalid" -) - -func PossibleValuesForDedupState() []string { - return []string{ - string(DedupStateDisabled), - string(DedupStateEnabled), - string(DedupStateInvalid), - } -} - -func parseDedupState(input string) (*DedupState, error) { - vals := map[string]DedupState{ - "disabled": DedupStateDisabled, - "enabled": DedupStateEnabled, - "invalid": DedupStateInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DedupState(input) - return &out, nil -} - -type StorageType string - -const ( - StorageTypeGeoRedundant StorageType = "GeoRedundant" - StorageTypeInvalid StorageType = "Invalid" - StorageTypeLocallyRedundant StorageType = "LocallyRedundant" - StorageTypeReadAccessGeoZoneRedundant StorageType = "ReadAccessGeoZoneRedundant" - StorageTypeZoneRedundant StorageType = "ZoneRedundant" -) - -func PossibleValuesForStorageType() []string { - return []string{ - string(StorageTypeGeoRedundant), - string(StorageTypeInvalid), - string(StorageTypeLocallyRedundant), - string(StorageTypeReadAccessGeoZoneRedundant), - string(StorageTypeZoneRedundant), - } -} - -func parseStorageType(input string) (*StorageType, error) { - vals := map[string]StorageType{ - "georedundant": StorageTypeGeoRedundant, - "invalid": StorageTypeInvalid, - "locallyredundant": StorageTypeLocallyRedundant, - "readaccessgeozoneredundant": StorageTypeReadAccessGeoZoneRedundant, - "zoneredundant": StorageTypeZoneRedundant, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageType(input) - return &out, nil -} - -type StorageTypeState string - -const ( - StorageTypeStateInvalid StorageTypeState = "Invalid" - StorageTypeStateLocked StorageTypeState = "Locked" - StorageTypeStateUnlocked StorageTypeState = "Unlocked" -) - -func PossibleValuesForStorageTypeState() []string { - return []string{ - string(StorageTypeStateInvalid), - string(StorageTypeStateLocked), - string(StorageTypeStateUnlocked), - } -} - -func parseStorageTypeState(input string) (*StorageTypeState, error) { - vals := map[string]StorageTypeState{ - "invalid": StorageTypeStateInvalid, - "locked": StorageTypeStateLocked, - "unlocked": StorageTypeStateUnlocked, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageTypeState(input) - return &out, nil -} - -type XcoolState string - -const ( - XcoolStateDisabled XcoolState = "Disabled" - XcoolStateEnabled XcoolState = "Enabled" - XcoolStateInvalid XcoolState = "Invalid" -) - -func PossibleValuesForXcoolState() []string { - return []string{ - string(XcoolStateDisabled), - string(XcoolStateEnabled), - string(XcoolStateInvalid), - } -} - -func parseXcoolState(input string) (*XcoolState, error) { - vals := map[string]XcoolState{ - "disabled": XcoolStateDisabled, - "enabled": XcoolStateEnabled, - "invalid": XcoolStateInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := XcoolState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go deleted file mode 100644 index 73028f742d02..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ /dev/null @@ -1,125 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &VaultId{} - -// VaultId is a struct representing the Resource ID for a Vault -type VaultId struct { - SubscriptionId string - ResourceGroupName string - VaultName string -} - -// NewVaultID returns a new VaultId struct -func NewVaultID(subscriptionId string, resourceGroupName string, vaultName string) VaultId { - return VaultId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VaultName: vaultName, - } -} - -// ParseVaultID parses 'input' into a VaultId -func ParseVaultID(input string) (*VaultId, error) { - parser := resourceids.NewParserFromResourceIdType(&VaultId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseVaultIDInsensitively parses 'input' case-insensitively into a VaultId -// note: this method should only be used for API response data and not user input -func ParseVaultIDInsensitively(input string) (*VaultId, error) { - parser := resourceids.NewParserFromResourceIdType(&VaultId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *VaultId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.VaultName, ok = input.Parsed["vaultName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) - } - - return nil -} - -// ValidateVaultID checks that 'input' can be parsed as a Vault ID -func ValidateVaultID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVaultID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vault ID -func (id VaultId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.RecoveryServices/vaults/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VaultName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vault ID -func (id VaultId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftRecoveryServices", "Microsoft.RecoveryServices", "Microsoft.RecoveryServices"), - resourceids.StaticSegment("staticVaults", "vaults", "vaults"), - resourceids.UserSpecifiedSegment("vaultName", "vaultValue"), - } -} - -// String returns a human-readable description of this Vault ID -func (id VaultId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vault Name: %q", id.VaultName), - } - return fmt.Sprintf("Vault (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go deleted file mode 100644 index dfa7631d81e4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_get_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - Model *BackupResourceConfigResource -} - -// Get ... -func (c BackupResourceStorageConfigsNonCRRClient) Get(ctx context.Context, id VaultId) (result GetOperationResponse, err error) { - req, err := c.preparerForGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Get", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Get", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Get", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForGet prepares the Get request. -func (c BackupResourceStorageConfigsNonCRRClient) preparerForGet(ctx context.Context, id VaultId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/backupStorageConfig/vaultStorageConfig", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForGet handles the response to the Get request. The method always -// closes the http.Response Body. -func (c BackupResourceStorageConfigsNonCRRClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go deleted file mode 100644 index 06e35a3cb44d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_patch_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchOperationResponse struct { - HttpResponse *http.Response -} - -// Patch ... -func (c BackupResourceStorageConfigsNonCRRClient) Patch(ctx context.Context, id VaultId, input BackupResourceConfigResource) (result PatchOperationResponse, err error) { - req, err := c.preparerForPatch(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Patch", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Patch", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPatch(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Patch", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPatch prepares the Patch request. -func (c BackupResourceStorageConfigsNonCRRClient) preparerForPatch(ctx context.Context, id VaultId, input BackupResourceConfigResource) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/backupStorageConfig/vaultStorageConfig", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPatch handles the response to the Patch request. The method always -// closes the http.Response Body. -func (c BackupResourceStorageConfigsNonCRRClient) responderForPatch(resp *http.Response) (result PatchOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go deleted file mode 100644 index 13a010ee69d8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/method_update_autorest.go +++ /dev/null @@ -1,70 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - HttpResponse *http.Response - Model *BackupResourceConfigResource -} - -// Update ... -func (c BackupResourceStorageConfigsNonCRRClient) Update(ctx context.Context, id VaultId, input BackupResourceConfigResource) (result UpdateOperationResponse, err error) { - req, err := c.preparerForUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Update", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Update", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "backupresourcestorageconfigsnoncrr.BackupResourceStorageConfigsNonCRRClient", "Update", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForUpdate prepares the Update request. -func (c BackupResourceStorageConfigsNonCRRClient) preparerForUpdate(ctx context.Context, id VaultId, input BackupResourceConfigResource) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/backupStorageConfig/vaultStorageConfig", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForUpdate handles the response to the Update request. The method always -// closes the http.Response Body. -func (c BackupResourceStorageConfigsNonCRRClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go deleted file mode 100644 index 69f226c0dcf6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupResourceConfig struct { - CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"` - DedupState *DedupState `json:"dedupState,omitempty"` - StorageModelType *StorageType `json:"storageModelType,omitempty"` - StorageType *StorageType `json:"storageType,omitempty"` - StorageTypeState *StorageTypeState `json:"storageTypeState,omitempty"` - XcoolState *XcoolState `json:"xcoolState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go deleted file mode 100644 index 8fc2680cafb2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/model_backupresourceconfigresource.go +++ /dev/null @@ -1,14 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupResourceConfigResource struct { - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackupResourceConfig `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go deleted file mode 100644 index b230fb1e970b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package backupresourcestorageconfigsnoncrr - -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 = "2024-01-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index a338d66c1549..d3a2a61d27fe 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -876,7 +876,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-0 github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy -github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks From f121ca109ea8169e999418ba8a0f7555bb22e191 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:48:49 +0800 Subject: [PATCH 6/8] update per comments --- .../recovery_services_vault_resource.go | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index c72fe0f9d97e..860196674949 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -194,11 +194,7 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa defer cancel() id := vaults.NewVaultID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - cfgId := backupresourcevaultconfigs.VaultId{ - SubscriptionId: id.SubscriptionId, - ResourceGroupName: id.ResourceGroupName, - VaultName: id.VaultName, - } + cfgId := backupresourcevaultconfigs.NewVaultID(id.SubscriptionId, id.ResourceGroupName, id.VaultName) storageMode := d.Get("storage_mode_type").(string) crossRegionRestore := d.Get("cross_region_restore_enabled").(bool) @@ -228,6 +224,11 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa } sku := d.Get("sku").(string) + crossRegionRestoreEnabled := vaults.CrossRegionRestoreDisabled + if d.Get("cross_region_restore_enabled").(bool) { + crossRegionRestoreEnabled = vaults.CrossRegionRestoreEnabled + } + vault := vaults.Vault{ Location: location, Tags: tags.Expand(t), @@ -239,12 +240,7 @@ func resourceRecoveryServicesVaultCreate(d *pluginsdk.ResourceData, meta interfa PublicNetworkAccess: expandRecoveryServicesVaultPublicNetworkAccess(d.Get("public_network_access_enabled").(bool)), MonitoringSettings: expandRecoveryServicesVaultMonitorSettings(d.Get("monitoring").([]interface{})), RedundancySettings: &vaults.VaultPropertiesRedundancySettings{ - CrossRegionRestore: pointer.To(func() vaults.CrossRegionRestore { - if d.Get("cross_region_restore_enabled").(bool) { - return vaults.CrossRegionRestoreEnabled - } - return vaults.CrossRegionRestoreDisabled - }()), + CrossRegionRestore: &crossRegionRestoreEnabled, StandardTierStorageRedundancy: pointer.To(vaults.StandardTierStorageRedundancy(d.Get("storage_mode_type").(string))), }, }, @@ -502,14 +498,14 @@ func resourceRecoveryServicesVaultUpdate(d *pluginsdk.ResourceData, meta interfa vault.Properties.SecuritySettings = expandRecoveryServicesVaultSecuritySettings(immutability) } + crossRegionRestoreEnabled := vaults.CrossRegionRestoreDisabled + if crossRegionRestore { + crossRegionRestoreEnabled = vaults.CrossRegionRestoreEnabled + } + if d.HasChanges("storage_mode_type", "cross_region_restore_enabled") { vault.Properties.RedundancySettings = &vaults.VaultPropertiesRedundancySettings{ - CrossRegionRestore: pointer.To(func() vaults.CrossRegionRestore { - if crossRegionRestore { - return vaults.CrossRegionRestoreEnabled - } - return vaults.CrossRegionRestoreDisabled - }()), + CrossRegionRestore: &crossRegionRestoreEnabled, StandardTierStorageRedundancy: pointer.To(vaults.StandardTierStorageRedundancy(storageMode)), } } @@ -577,11 +573,7 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface if err != nil { return err } - cfgId := backupresourcevaultconfigs.VaultId{ - SubscriptionId: id.SubscriptionId, - ResourceGroupName: id.ResourceGroupName, - VaultName: id.VaultName, - } + cfgId := backupresourcevaultconfigs.NewVaultID(id.SubscriptionId, id.ResourceGroupName, id.VaultName) log.Printf("[DEBUG] Reading Recovery Service %s", id.String()) @@ -609,26 +601,27 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface } if prop := model.Properties; prop != nil { + + immutability := vaults.ImmutabilityStateDisabled if prop.SecuritySettings != nil && prop.SecuritySettings.ImmutabilitySettings != nil { - d.Set("immutability", string(pointer.From(prop.SecuritySettings.ImmutabilitySettings.State))) + immutability = pointer.From(prop.SecuritySettings.ImmutabilitySettings.State) } + d.Set("immutability", string(immutability)) - if prop.PublicNetworkAccess != nil { - d.Set("public_network_access_enabled", flattenRecoveryServicesVaultPublicNetworkAccess(model.Properties.PublicNetworkAccess)) - } + d.Set("public_network_access_enabled", flattenRecoveryServicesVaultPublicNetworkAccess(model.Properties.PublicNetworkAccess)) - if prop.MonitoringSettings != nil { - d.Set("monitoring", flattenRecoveryServicesVaultMonitorSettings(*model.Properties.MonitoringSettings)) - } + d.Set("monitoring", flattenRecoveryServicesVaultMonitorSettings(prop.MonitoringSettings)) + storageModeType := vaults.StandardTierStorageRedundancyInvalid + crossRegionRestoreEnabled := false if prop.RedundancySettings != nil { - d.Set("storage_mode_type", string(pointer.From(prop.RedundancySettings.StandardTierStorageRedundancy))) - crossRegionRestoreEnabled := false + storageModeType = pointer.From(prop.RedundancySettings.StandardTierStorageRedundancy) if prop.RedundancySettings.CrossRegionRestore != nil { crossRegionRestoreEnabled = *prop.RedundancySettings.CrossRegionRestore == vaults.CrossRegionRestoreEnabled } - d.Set("cross_region_restore_enabled", crossRegionRestoreEnabled) } + d.Set("cross_region_restore_enabled", crossRegionRestoreEnabled) + d.Set("storage_mode_type", string(storageModeType)) } cfg, err := cfgsClient.Get(ctx, cfgId) @@ -636,9 +629,11 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface return fmt.Errorf("retrieving %s: %+v", cfgId, err) } + softDeleteEnabled := false if cfg.Model != nil && cfg.Model.Properties != nil && cfg.Model.Properties.SoftDeleteFeatureState != nil { - d.Set("soft_delete_enabled", *cfg.Model.Properties.SoftDeleteFeatureState == backupresourcevaultconfigs.SoftDeleteFeatureStateEnabled) + softDeleteEnabled = *cfg.Model.Properties.SoftDeleteFeatureState == backupresourcevaultconfigs.SoftDeleteFeatureStateEnabled } + d.Set("soft_delete_enabled", softDeleteEnabled) flattenIdentity, err := identity.FlattenSystemAndUserAssignedMap(model.Identity) if err != nil { @@ -648,10 +643,7 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface return fmt.Errorf("setting `identity`: %+v", err) } - encryption := flattenVaultEncryption(*model) - if encryption != nil { - d.Set("encryption", []interface{}{encryption}) - } + d.Set("encryption", []interface{}{flattenVaultEncryption(model)}) vaultSettingsId := replicationvaultsetting.NewReplicationVaultSettingID(id.SubscriptionId, id.ResourceGroupName, id.VaultName, "default") vaultSetting, err := vaultSettingsClient.Get(ctx, vaultSettingsId) @@ -659,11 +651,13 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface return fmt.Errorf("reading Recovery Service Vault Setting %s: %+v", id.String(), err) } + classicVmwareReplicationEnabled := false if vaultSetting.Model != nil && vaultSetting.Model.Properties != nil { if v := vaultSetting.Model.Properties.VMwareToAzureProviderType; v != nil { - d.Set("classic_vmware_replication_enabled", strings.EqualFold(*v, "vmware")) + classicVmwareReplicationEnabled = strings.EqualFold(*v, "vmware") } } + d.Set("classic_vmware_replication_enabled", classicVmwareReplicationEnabled) return tags.FlattenAndSet(d, model.Tags) } @@ -757,25 +751,29 @@ func expandEncryption(d *pluginsdk.ResourceData) (*vaults.VaultPropertiesEncrypt return encryption, nil } -func flattenVaultEncryption(model vaults.Vault) interface{} { - if model.Properties == nil || model.Properties.Encryption == nil { - return nil - } - encryption := model.Properties.Encryption - if encryption.KeyVaultProperties == nil || encryption.KeyVaultProperties.KeyUri == nil { - return nil - } - if encryption.KekIdentity == nil || encryption.KekIdentity.UseSystemAssignedIdentity == nil { - return nil - } +func flattenVaultEncryption(model *vaults.Vault) interface{} { encryptionMap := make(map[string]interface{}) - - encryptionMap["key_id"] = encryption.KeyVaultProperties.KeyUri - encryptionMap["use_system_assigned_identity"] = *encryption.KekIdentity.UseSystemAssignedIdentity - encryptionMap["infrastructure_encryption_enabled"] = *encryption.InfrastructureEncryption == vaults.InfrastructureEncryptionStateEnabled - if encryption.KekIdentity.UserAssignedIdentity != nil { - encryptionMap["user_assigned_identity_id"] = *encryption.KekIdentity.UserAssignedIdentity + keyId := "" + useSystemAssignedIdentity := false + infraEncryptionEnabled := false + userAssignedIdentityId := "" + + if model != nil && model.Properties.Encryption != nil { + encryption := *model.Properties.Encryption + infraEncryptionEnabled = *encryption.InfrastructureEncryption == vaults.InfrastructureEncryptionStateEnabled + if kekIdentity := encryption.KekIdentity; kekIdentity != nil { + useSystemAssignedIdentity = pointer.From(kekIdentity.UseSystemAssignedIdentity) + userAssignedIdentityId = pointer.From(kekIdentity.UserAssignedIdentity) + } + if keyvaultProp := encryption.KeyVaultProperties; keyvaultProp != nil { + keyId = pointer.From(keyvaultProp.KeyUri) + } } + + encryptionMap["key_id"] = keyId + encryptionMap["use_system_assigned_identity"] = useSystemAssignedIdentity + encryptionMap["infrastructure_encryption_enabled"] = infraEncryptionEnabled + encryptionMap["user_assigned_identity_id"] = userAssignedIdentityId return encryptionMap } @@ -833,15 +831,17 @@ func expandRecoveryServicesVaultMonitorSettings(input []interface{}) *vaults.Mon }) } -func flattenRecoveryServicesVaultMonitorSettings(input vaults.MonitoringSettings) []interface{} { +func flattenRecoveryServicesVaultMonitorSettings(input *vaults.MonitoringSettings) []interface{} { allJobAlert := false - if input.AzureMonitorAlertSettings != nil && input.AzureMonitorAlertSettings.AlertsForAllJobFailures != nil { - allJobAlert = *input.AzureMonitorAlertSettings.AlertsForAllJobFailures == vaults.AlertsStateEnabled - } - criticalAlert := false - if input.ClassicAlertSettings != nil && input.ClassicAlertSettings.AlertsForCriticalOperations != nil { - criticalAlert = *input.ClassicAlertSettings.AlertsForCriticalOperations == vaults.AlertsStateEnabled + + if input != nil { + if input.AzureMonitorAlertSettings != nil && input.AzureMonitorAlertSettings.AlertsForAllJobFailures != nil { + allJobAlert = *input.AzureMonitorAlertSettings.AlertsForAllJobFailures == vaults.AlertsStateEnabled + } + if input.ClassicAlertSettings != nil && input.ClassicAlertSettings.AlertsForCriticalOperations != nil { + criticalAlert = *input.ClassicAlertSettings.AlertsForCriticalOperations == vaults.AlertsStateEnabled + } } return []interface{}{ From 99473518c980a13e9f5cf7f1c4722f01e4ac3c50 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:35:29 +0800 Subject: [PATCH 7/8] update flatten function `monitor` and `encryption` --- .../recoveryservices/recovery_services_vault_resource.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index 860196674949..d245a92e4578 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -752,6 +752,10 @@ func expandEncryption(d *pluginsdk.ResourceData) (*vaults.VaultPropertiesEncrypt } func flattenVaultEncryption(model *vaults.Vault) interface{} { + // `enecryption` is an optional parameter and won't be returned if it has not been specified. + if model == nil { + return nil + } encryptionMap := make(map[string]interface{}) keyId := "" useSystemAssignedIdentity := false @@ -832,6 +836,10 @@ func expandRecoveryServicesVaultMonitorSettings(input []interface{}) *vaults.Mon } func flattenRecoveryServicesVaultMonitorSettings(input *vaults.MonitoringSettings) []interface{} { + // `Monitor` is an optional parameters, and won't be returned from API if it has not been specified. + if input == nil { + return []interface{}{} + } allJobAlert := false criticalAlert := false From 4c5e4f41e3461e9c7262774cec6ecb29c8dffcf9 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:18:09 +0800 Subject: [PATCH 8/8] update encryption flatten func --- .../recovery_services_vault_resource.go | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/internal/services/recoveryservices/recovery_services_vault_resource.go b/internal/services/recoveryservices/recovery_services_vault_resource.go index d245a92e4578..34d1bc62dd4a 100644 --- a/internal/services/recoveryservices/recovery_services_vault_resource.go +++ b/internal/services/recoveryservices/recovery_services_vault_resource.go @@ -643,7 +643,10 @@ func resourceRecoveryServicesVaultRead(d *pluginsdk.ResourceData, meta interface return fmt.Errorf("setting `identity`: %+v", err) } - d.Set("encryption", []interface{}{flattenVaultEncryption(model)}) + encryption := flattenVaultEncryption(*model) + if encryption != nil { + d.Set("encryption", []interface{}{encryption}) + } vaultSettingsId := replicationvaultsetting.NewReplicationVaultSettingID(id.SubscriptionId, id.ResourceGroupName, id.VaultName, "default") vaultSetting, err := vaultSettingsClient.Get(ctx, vaultSettingsId) @@ -751,33 +754,24 @@ func expandEncryption(d *pluginsdk.ResourceData) (*vaults.VaultPropertiesEncrypt return encryption, nil } -func flattenVaultEncryption(model *vaults.Vault) interface{} { - // `enecryption` is an optional parameter and won't be returned if it has not been specified. - if model == nil { +func flattenVaultEncryption(model vaults.Vault) interface{} { + if model.Properties == nil || model.Properties.Encryption == nil { + return nil + } + encryption := model.Properties.Encryption + if encryption.KeyVaultProperties == nil || encryption.KeyVaultProperties.KeyUri == nil { + return nil + } + if encryption.KekIdentity == nil || encryption.KekIdentity.UseSystemAssignedIdentity == nil { return nil } encryptionMap := make(map[string]interface{}) - keyId := "" - useSystemAssignedIdentity := false - infraEncryptionEnabled := false - userAssignedIdentityId := "" - - if model != nil && model.Properties.Encryption != nil { - encryption := *model.Properties.Encryption - infraEncryptionEnabled = *encryption.InfrastructureEncryption == vaults.InfrastructureEncryptionStateEnabled - if kekIdentity := encryption.KekIdentity; kekIdentity != nil { - useSystemAssignedIdentity = pointer.From(kekIdentity.UseSystemAssignedIdentity) - userAssignedIdentityId = pointer.From(kekIdentity.UserAssignedIdentity) - } - if keyvaultProp := encryption.KeyVaultProperties; keyvaultProp != nil { - keyId = pointer.From(keyvaultProp.KeyUri) - } + encryptionMap["key_id"] = encryption.KeyVaultProperties.KeyUri + encryptionMap["use_system_assigned_identity"] = *encryption.KekIdentity.UseSystemAssignedIdentity + encryptionMap["infrastructure_encryption_enabled"] = *encryption.InfrastructureEncryption == vaults.InfrastructureEncryptionStateEnabled + if encryption.KekIdentity.UserAssignedIdentity != nil { + encryptionMap["user_assigned_identity_id"] = *encryption.KekIdentity.UserAssignedIdentity } - - encryptionMap["key_id"] = keyId - encryptionMap["use_system_assigned_identity"] = useSystemAssignedIdentity - encryptionMap["infrastructure_encryption_enabled"] = infraEncryptionEnabled - encryptionMap["user_assigned_identity_id"] = userAssignedIdentityId return encryptionMap }