From e2f4d8b1ab443bf62393b40f9d7b717400a98417 Mon Sep 17 00:00:00 2001 From: Paulo Date: Mon, 1 Jul 2024 21:28:41 +0000 Subject: [PATCH 01/32] WIP: staring backup work --- internal/services/netapp/models/models.go | 7 + .../netapp/netapp_backup_vault_resource.go | 229 ++++++++++++++++++ internal/services/netapp/registration.go | 2 + 3 files changed, 238 insertions(+) create mode 100644 internal/services/netapp/netapp_backup_vault_resource.go diff --git a/internal/services/netapp/models/models.go b/internal/services/netapp/models/models.go index 5e0924de1cbb..3f3e8af4e6ff 100644 --- a/internal/services/netapp/models/models.go +++ b/internal/services/netapp/models/models.go @@ -116,3 +116,10 @@ type NetAppVolumeQuotaRuleDataSourceModel struct { QuotaSizeInKiB int64 `tfschema:"quota_size_in_kib"` QuotaType string `tfschema:"quota_type"` } + +type NetAppBackupVaultModel struct { + Id string `tfschema:"id"` + Name string `tfschema:"name"` + AccountName string `tfschema:"account_name"` + Tags map[string]string `tfschema:"tags"` +} diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go new file mode 100644 index 000000000000..3a4f1d8b470e --- /dev/null +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -0,0 +1,229 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" + netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type NetAppBackupVaultResource struct{} + +var _ sdk.Resource = NetAppBackupVaultResource{} + +func (r NetAppBackupVaultResource) ModelObject() interface{} { + return &netAppModels.NetAppBackupVaultModel{} +} + +func (r NetAppBackupVaultResource) ResourceType() string { + return "azurerm_netapp_backup_vault" +} + +func (r NetAppBackupVaultResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return backupvaults.ValidateBackupVaultID +} + +func (r NetAppBackupVaultResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: netAppValidate.VolumeQuotaRuleName, + }, + + "location": commonschema.Location(), + + "account_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: netAppValidate.AccountName, + }, + + "tags": commonschema.Tags(), + } +} + +func (r NetAppBackupVaultResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r NetAppBackupVaultResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 90 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + // client := metadata.Client.NetApp.AccountClient + // subscriptionId := metadata.Client.Account.SubscriptionId + + // var model netAppModels.NetAppBackupVaultModel + // if err := metadata.Decode(&model); err != nil { + // return fmt.Errorf("decoding: %+v", err) + // } + + // backupVaultID, err := backupvaults.ParseBackupVaultID(model.Id) + // if err != nil { + // return fmt.Errorf("error parsing backup vault id %s: %+v", model.Id, err) + // } + + // id := backupvaults.NewBackupVaultID(subscriptionId, backupVaultID.ResourceGroupName, model.Name) + + // metadata.Logger.Infof("Import check for %s", id) + // existing, err := client.(ctx, id) + // if err != nil { + // if !response.WasNotFound(existing.HttpResponse) { + // return fmt.Errorf("checking for presence of existing %s: %s", id, err) + // } + // } + + // if !response.WasNotFound(existing.HttpResponse) { + // return tf.ImportAsExistsError(r.ResourceType(), id.ID()) + // } + + // // Performing some validations that are not possible in the schema + // if errorList := netAppValidate.ValidateNetAppVolumeQuotaRule(ctx, pointer.From(volumeID), metadata.Client, pointer.To(model)); len(errorList) > 0 { + // return fmt.Errorf("one or more issues found while performing deeper validations for %s:\n%+v", id, errorList) + // } + + // parameters := volumequotarules.VolumeQuotaRule{ + // Location: location.Normalize(model.Location), + // Properties: &volumequotarules.VolumeQuotaRulesProperties{ + // QuotaSizeInKiBs: pointer.To(model.QuotaSizeInKiB), + // QuotaType: pointer.To(volumequotarules.Type(model.QuotaType)), + // QuotaTarget: utils.String(model.QuotaTarget), + // }, + // } + + // err = client.CreateThenPoll(ctx, id, parameters) + // if err != nil { + // return fmt.Errorf("creating %s: %+v", id, err) + // } + + // metadata.SetID(id) + + return nil + }, + } +} + +func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 120 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.NetApp.VolumeQuotaRules + + id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("Decoding state for %s", id) + var state netAppModels.NetAppBackupVaultModel + if err := metadata.Decode(&state); err != nil { + return err + } + + metadata.Logger.Infof("Updating %s", id) + + update := volumequotarules.VolumeQuotaRulePatch{ + Properties: &volumequotarules.VolumeQuotaRulesProperties{}, + } + + update.Properties.QuotaSizeInKiBs = utils.Int64(state.QuotaSizeInKiB) + if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + metadata.SetID(id) + + return nil + }, + } +} + +func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.VolumeQuotaRules + + id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("Decoding state for %s", id) + var state netAppModels.NetAppBackupVaultModel + if err := metadata.Decode(&state); err != nil { + return err + } + + existing, err := client.Get(ctx, pointer.From(id)) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(id) + } + return fmt.Errorf("retrieving %s: %v", id, err) + } + + volumeID := volumequotarules.NewVolumeID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) + + model := netAppModels.NetAppBackupVaultModel{ + Name: id.VolumeQuotaRuleName, + VolumeID: volumeID.ID(), + Location: location.NormalizeNilable(pointer.To(existing.Model.Location)), + QuotaTarget: pointer.From(existing.Model.Properties.QuotaTarget), + QuotaSizeInKiB: pointer.From(existing.Model.Properties.QuotaSizeInKiBs), + QuotaType: string(pointer.From(existing.Model.Properties.QuotaType)), + } + + metadata.SetID(id) + + return metadata.Encode(&model) + }, + } +} + +func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 120 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.VolumeQuotaRules + + id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + existing, err := client.Get(ctx, pointer.From(id)) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(id) + } + return fmt.Errorf("retrieving %s: %v", id, err) + } + + if err = client.DeleteThenPoll(ctx, pointer.From(id)); err != nil { + return fmt.Errorf("deleting %s: %+v", pointer.From(id), err) + } + + return nil + }, + } +} diff --git a/internal/services/netapp/registration.go b/internal/services/netapp/registration.go index cf758c73f21c..86ed268214cd 100644 --- a/internal/services/netapp/registration.go +++ b/internal/services/netapp/registration.go @@ -55,6 +55,7 @@ func (r Registration) DataSources() []sdk.DataSource { NetAppVolumeGroupSapHanaDataSource{}, NetAppVolumeQuotaRuleDataSource{}, NetAppAccountEncryptionDataSource{}, + //NetAppBackupVaultDataSource{}, } } @@ -64,5 +65,6 @@ func (r Registration) Resources() []sdk.Resource { NetAppVolumeGroupSapHanaResource{}, NetAppVolumeQuotaRuleResource{}, NetAppAccountEncryptionResource{}, + NetAppBackupVaultResource{}, } } From 6d7cd486c3f0fb4d68994afbb98ddcfe106660c4 Mon Sep 17 00:00:00 2001 From: Paulo Date: Tue, 2 Jul 2024 00:35:41 +0000 Subject: [PATCH 02/32] WIP --- internal/services/netapp/client/client.go | 25 ++- internal/services/netapp/models/models.go | 1 + .../netapp/netapp_account_data_source.go | 2 +- .../netapp_account_encryption_data_source.go | 2 +- .../netapp_account_encryption_resource.go | 2 +- ...netapp_account_encryption_resource_test.go | 2 +- .../netapp/netapp_account_resource.go | 2 +- .../netapp/netapp_account_resource_test.go | 2 +- .../netapp/netapp_backup_vault_resource.go | 132 ++++++------- .../netapp/netapp_backup_vault_test.go | 182 ++++++++++++++++++ .../netapp/netapp_pool_data_source.go | 2 +- .../services/netapp/netapp_pool_resource.go | 2 +- .../netapp/netapp_pool_resource_test.go | 2 +- .../netapp/netapp_snapshot_data_source.go | 2 +- .../netapp_snapshot_policy_data_source.go | 2 +- .../netapp/netapp_snapshot_policy_resource.go | 2 +- .../netapp_snapshot_policy_resource_test.go | 2 +- .../netapp/netapp_snapshot_resource.go | 2 +- .../netapp/netapp_snapshot_resource_test.go | 2 +- .../netapp/netapp_volume_data_source.go | 2 +- ...etapp_volume_group_sap_hana_data_source.go | 2 +- .../netapp_volume_group_sap_hana_resource.go | 13 +- ...app_volume_group_sap_hana_resource_test.go | 2 +- .../services/netapp/netapp_volume_helper.go | 6 +- .../netapp_volume_quota_rule_data_source.go | 4 +- .../netapp_volume_quota_rule_resource.go | 4 +- .../netapp_volume_quota_rule_resource_test.go | 2 +- .../services/netapp/netapp_volume_resource.go | 6 +- .../netapp/netapp_volume_resource_test.go | 2 +- .../services/netapp/validate/account_id.go | 2 +- ...p_hana_volumes_export_policy_validation.go | 2 +- ...a_volumes_export_policy_validation_test.go | 2 +- ...olume_group_sap_hana_volumes_validation.go | 2 +- ..._group_sap_hana_volumes_validation_test.go | 2 +- ...le_quota_target_id_unix_validation_test.go | 2 +- ...quota_target_id_windows_validation_test.go | 2 +- ...quota_rule_quota_target_validation_test.go | 2 +- .../volume_quota_rule_quota_validations.go | 4 +- .../netapp/2023-11-01/backupvaults/README.md | 99 ++++++++++ .../netapp/2023-11-01/backupvaults/client.go | 26 +++ .../2023-11-01/backupvaults/id_backupvault.go | 139 +++++++++++++ .../backupvaults/id_netappaccount.go | 130 +++++++++++++ .../backupvaults/method_createorupdate.go | 75 ++++++++ .../2023-11-01/backupvaults/method_delete.go | 70 +++++++ .../2023-11-01/backupvaults/method_get.go | 54 ++++++ .../method_listbynetappaccount.go | 105 ++++++++++ .../2023-11-01/backupvaults/method_update.go | 75 ++++++++ .../backupvaults/model_backupvault.go | 18 ++ .../backupvaults/model_backupvaultpatch.go | 8 + .../model_backupvaultproperties.go | 8 + .../2023-11-01/backupvaults/predicates.go | 32 +++ .../netapp/2023-11-01/backupvaults/version.go | 12 ++ .../capacitypools/README.md | 6 +- .../capacitypools/client.go | 0 .../capacitypools/constants.go | 0 .../capacitypools/id_capacitypool.go | 0 .../capacitypools/id_netappaccount.go | 0 .../method_poolscreateorupdate.go | 0 .../capacitypools/method_poolsdelete.go | 0 .../capacitypools/method_poolsget.go | 0 .../capacitypools/method_poolslist.go | 0 .../capacitypools/method_poolsupdate.go | 0 .../capacitypools/model_capacitypool.go | 0 .../capacitypools/model_capacitypoolpatch.go | 0 .../model_poolpatchproperties.go | 0 .../capacitypools/model_poolproperties.go | 0 .../capacitypools/predicates.go | 0 .../capacitypools/version.go | 2 +- .../netappaccounts/README.md | 6 +- .../netappaccounts/client.go | 0 .../netappaccounts/constants.go | 0 .../netappaccounts/id_netappaccount.go | 0 .../method_accountscreateorupdate.go | 0 .../netappaccounts/method_accountsdelete.go | 0 .../netappaccounts/method_accountsget.go | 0 .../netappaccounts/method_accountslist.go | 0 .../method_accountslistbysubscription.go | 0 .../method_accountsrenewcredentials.go | 0 .../netappaccounts/method_accountsupdate.go | 0 .../netappaccounts/model_accountencryption.go | 0 .../netappaccounts/model_accountproperties.go | 0 .../netappaccounts/model_activedirectory.go | 0 .../model_encryptionidentity.go | 0 .../model_keyvaultproperties.go | 0 .../model_ldapsearchscopeopt.go | 0 .../netappaccounts/model_netappaccount.go | 0 .../model_netappaccountpatch.go | 0 .../netappaccounts/predicates.go | 0 .../netappaccounts/version.go | 2 +- .../snapshotpolicy/README.md | 6 +- .../snapshotpolicy/client.go | 0 .../snapshotpolicy/id_netappaccount.go | 0 .../snapshotpolicy/id_snapshotpolicy.go | 0 .../method_snapshotpoliciescreate.go | 0 .../method_snapshotpoliciesdelete.go | 0 .../method_snapshotpoliciesget.go | 0 .../method_snapshotpolicieslist.go | 0 .../method_snapshotpoliciesupdate.go | 0 .../snapshotpolicy/model_dailyschedule.go | 0 .../snapshotpolicy/model_hourlyschedule.go | 0 .../snapshotpolicy/model_monthlyschedule.go | 0 .../model_snapshotpolicieslist.go | 0 .../snapshotpolicy/model_snapshotpolicy.go | 0 .../model_snapshotpolicypatch.go | 0 .../model_snapshotpolicyproperties.go | 0 .../snapshotpolicy/model_weeklyschedule.go | 0 .../snapshotpolicy/version.go | 2 +- .../snapshots/README.md | 6 +- .../snapshots/client.go | 0 .../snapshots/id_snapshot.go | 0 .../snapshots/id_volume.go | 0 .../snapshots/method_create.go | 0 .../snapshots/method_delete.go | 0 .../snapshots/method_get.go | 0 .../snapshots/method_list.go | 0 .../snapshots/method_restorefiles.go | 0 .../snapshots/method_update.go | 0 .../snapshots/model_snapshot.go | 0 .../snapshots/model_snapshotproperties.go | 0 .../snapshots/model_snapshotrestorefiles.go | 0 .../snapshots/model_snapshotslist.go | 0 .../snapshots/version.go | 2 +- .../volumegroups/README.md | 6 +- .../volumegroups/client.go | 0 .../volumegroups/constants.go | 0 .../volumegroups/id_netappaccount.go | 0 .../volumegroups/id_volumegroup.go | 0 .../volumegroups/method_create.go | 0 .../volumegroups/method_delete.go | 0 .../volumegroups/method_get.go | 0 .../method_listbynetappaccount.go | 0 .../volumegroups/model_exportpolicyrule.go | 0 .../model_mounttargetproperties.go | 0 .../model_placementkeyvaluepairs.go | 0 .../volumegroups/model_replicationobject.go | 0 .../model_volumebackupproperties.go | 10 + .../volumegroups/model_volumegroup.go | 0 .../volumegroups/model_volumegroupdetails.go | 0 .../volumegroups/model_volumegrouplist.go | 0 .../model_volumegrouplistproperties.go | 0 .../volumegroups/model_volumegroupmetadata.go | 1 - .../model_volumegroupproperties.go | 0 .../model_volumegroupvolumeproperties.go | 0 .../volumegroups/model_volumeproperties.go | 0 .../model_volumepropertiesdataprotection.go | 1 + .../model_volumepropertiesexportpolicy.go | 0 .../model_volumerelocationproperties.go | 0 .../model_volumesnapshotproperties.go | 0 .../volumegroups/version.go | 2 +- .../volumequotarules/README.md | 6 +- .../volumequotarules/client.go | 0 .../volumequotarules/constants.go | 0 .../volumequotarules/id_volume.go | 0 .../volumequotarules/id_volumequotarule.go | 0 .../volumequotarules/method_create.go | 0 .../volumequotarules/method_delete.go | 0 .../volumequotarules/method_get.go | 0 .../volumequotarules/method_listbyvolume.go | 0 .../volumequotarules/method_update.go | 0 .../volumequotarules/model_volumequotarule.go | 0 .../model_volumequotarulepatch.go | 0 .../model_volumequotaruleslist.go | 0 .../model_volumequotarulesproperties.go | 0 .../volumequotarules/version.go | 2 +- .../volumes/README.md | 6 +- .../volumes/client.go | 0 .../volumes/constants.go | 0 .../volumes/id_capacitypool.go | 0 .../volumes/id_volume.go | 0 .../volumes/method_createorupdate.go | 0 .../volumes/method_delete.go | 0 .../volumes/method_get.go | 0 .../volumes/method_list.go | 0 .../method_populateavailabilityzone.go | 0 .../volumes/method_update.go | 0 .../volumes/model_exportpolicyrule.go | 0 .../volumes/model_mounttargetproperties.go | 0 .../volumes/model_placementkeyvaluepairs.go | 0 .../volumes/model_replicationobject.go | 0 .../volumes/model_volume.go | 0 .../volumes/model_volumebackupproperties.go | 10 + .../volumes/model_volumepatch.go | 0 .../volumes/model_volumepatchproperties.go | 1 + ...del_volumepatchpropertiesdataprotection.go | 1 + ...model_volumepatchpropertiesexportpolicy.go | 0 .../volumes/model_volumeproperties.go | 0 .../model_volumepropertiesdataprotection.go | 1 + .../model_volumepropertiesexportpolicy.go | 0 .../model_volumerelocationproperties.go | 0 .../volumes/model_volumesnapshotproperties.go | 0 .../volumes/predicates.go | 0 .../volumes/version.go | 2 +- .../volumesreplication/README.md | 6 +- .../volumesreplication/client.go | 0 .../volumesreplication/constants.go | 0 .../volumesreplication/id_volume.go | 0 .../method_volumesauthorizereplication.go | 0 .../method_volumesbreakreplication.go | 0 .../method_volumesdeletereplication.go | 0 .../method_volumeslistreplications.go | 0 .../method_volumesreestablishreplication.go | 0 .../method_volumesreinitializereplication.go | 0 .../method_volumesreplicationstatus.go | 0 .../method_volumesresyncreplication.go | 0 .../model_authorizerequest.go | 0 .../model_breakreplicationrequest.go | 0 .../model_listreplications.go | 0 .../model_reestablishreplicationrequest.go | 0 .../volumesreplication/model_replication.go | 0 .../model_replicationstatus.go | 0 .../volumesreplication/version.go | 2 +- 211 files changed, 1211 insertions(+), 162 deletions(-) create mode 100644 internal/services/netapp/netapp_backup_vault_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/id_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/method_poolscreateorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/method_poolsdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/method_poolsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/method_poolslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/method_poolsupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/model_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/model_capacitypoolpatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/model_poolpatchproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/model_poolproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/capacitypools/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountscreateorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountsdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountslistbysubscription.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountsrenewcredentials.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/method_accountsupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_accountencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_accountproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_activedirectory.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_encryptionidentity.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_keyvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_ldapsearchscopeopt.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/model_netappaccountpatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/netappaccounts/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/id_snapshotpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/method_snapshotpoliciescreate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/method_snapshotpoliciesdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/method_snapshotpoliciesget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/method_snapshotpolicieslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/method_snapshotpoliciesupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_dailyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_hourlyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_monthlyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_snapshotpolicieslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_snapshotpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_snapshotpolicypatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_snapshotpolicyproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/model_weeklyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshotpolicy/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/id_snapshot.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_restorefiles.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/model_snapshot.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/model_snapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/model_snapshotrestorefiles.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/model_snapshotslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/snapshots/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/id_volumegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/method_listbynetappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_exportpolicyrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_mounttargetproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_placementkeyvaluepairs.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_replicationobject.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegroupdetails.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegrouplist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegrouplistproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegroupmetadata.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegroupproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumegroupvolumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumepropertiesdataprotection.go (86%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumepropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumerelocationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/model_volumesnapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumegroups/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/id_volumequotarule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/method_listbyvolume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/model_volumequotarule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/model_volumequotarulepatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/model_volumequotaruleslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/model_volumequotarulesproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumequotarules/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/id_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_populateavailabilityzone.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_exportpolicyrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_mounttargetproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_placementkeyvaluepairs.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_replicationobject.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volume.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepatchproperties.go (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepatchpropertiesdataprotection.go (82%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepatchpropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepropertiesdataprotection.go (86%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumepropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumerelocationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/model_volumesnapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumes/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesauthorizereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesbreakreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesdeletereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumeslistreplications.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesreestablishreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesreinitializereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesreplicationstatus.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/method_volumesresyncreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_authorizerequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_breakreplicationrequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_listreplications.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_reestablishreplicationrequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_replication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/model_replicationstatus.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-05-01 => 2023-11-01}/volumesreplication/version.go (88%) diff --git a/internal/services/netapp/client/client.go b/internal/services/netapp/client/client.go index 2668c7a95a54..e39808b0d96b 100644 --- a/internal/services/netapp/client/client.go +++ b/internal/services/netapp/client/client.go @@ -6,14 +6,15 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) @@ -26,6 +27,7 @@ type Client struct { VolumeQuotaRules *volumequotarules.VolumeQuotaRulesClient SnapshotClient *snapshots.SnapshotsClient SnapshotPoliciesClient *snapshotpolicy.SnapshotPolicyClient + BackupVaultsClient *backupvaults.BackupVaultsClient } func NewClient(o *common.ClientOptions) (*Client, error) { @@ -77,6 +79,12 @@ func NewClient(o *common.ClientOptions) (*Client, error) { return nil, fmt.Errorf("building SnapshotPoliciesClient client: %+v", err) } + backupVaultsClient, err := backupvaults.NewBackupVaultsClientWithBaseURI(o.Environment.ResourceManager) + o.Configure(backupVaultsClient.Client, o.Authorizers.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building BackupVaultsClient client: %+v", err) + } + return &Client{ AccountClient: accountClient, PoolClient: poolClient, @@ -86,5 +94,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) { VolumeQuotaRules: volumeQuotaRuleClient, SnapshotClient: snapshotClient, SnapshotPoliciesClient: snapshotPoliciesClient, + BackupVaultsClient: backupVaultsClient, }, nil } diff --git a/internal/services/netapp/models/models.go b/internal/services/netapp/models/models.go index 3f3e8af4e6ff..3ba81c203d9c 100644 --- a/internal/services/netapp/models/models.go +++ b/internal/services/netapp/models/models.go @@ -120,6 +120,7 @@ type NetAppVolumeQuotaRuleDataSourceModel struct { type NetAppBackupVaultModel struct { Id string `tfschema:"id"` Name string `tfschema:"name"` + Location string `tfschema:"location"` AccountName string `tfschema:"account_name"` Tags map[string]string `tfschema:"tags"` } diff --git a/internal/services/netapp/netapp_account_data_source.go b/internal/services/netapp/netapp_account_data_source.go index 21a28d0dcc88..aab79179622b 100644 --- a/internal/services/netapp/netapp_account_data_source.go +++ b/internal/services/netapp/netapp_account_data_source.go @@ -12,7 +12,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/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_account_encryption_data_source.go b/internal/services/netapp/netapp_account_encryption_data_source.go index 0cdd91253a2b..75ffb0ab1e59 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source.go +++ b/internal/services/netapp/netapp_account_encryption_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" diff --git a/internal/services/netapp/netapp_account_encryption_resource.go b/internal/services/netapp/netapp_account_encryption_resource.go index bc2f11452617..94a5164106e0 100644 --- a/internal/services/netapp/netapp_account_encryption_resource.go +++ b/internal/services/netapp/netapp_account_encryption_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/netapp/netapp_account_encryption_resource_test.go b/internal/services/netapp/netapp_account_encryption_resource_test.go index 2e7012ea740a..bce3ec3d544a 100644 --- a/internal/services/netapp/netapp_account_encryption_resource_test.go +++ b/internal/services/netapp/netapp_account_encryption_resource_test.go @@ -10,7 +10,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_account_resource.go b/internal/services/netapp/netapp_account_resource.go index ebc4204b994d..86a007dcbbc9 100644 --- a/internal/services/netapp/netapp_account_resource.go +++ b/internal/services/netapp/netapp_account_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/netapp/netapp_account_resource_test.go b/internal/services/netapp/netapp_account_resource_test.go index 444003b5c477..ad7021c9cab3 100644 --- a/internal/services/netapp/netapp_account_resource_test.go +++ b/internal/services/netapp/netapp_account_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" "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/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 3a4f1d8b470e..4bbf0b12f274 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -10,15 +10,15 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupvaults" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type NetAppBackupVaultResource struct{} @@ -67,53 +67,44 @@ func (r NetAppBackupVaultResource) Create() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 90 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - // client := metadata.Client.NetApp.AccountClient - // subscriptionId := metadata.Client.Account.SubscriptionId - - // var model netAppModels.NetAppBackupVaultModel - // if err := metadata.Decode(&model); err != nil { - // return fmt.Errorf("decoding: %+v", err) - // } - - // backupVaultID, err := backupvaults.ParseBackupVaultID(model.Id) - // if err != nil { - // return fmt.Errorf("error parsing backup vault id %s: %+v", model.Id, err) - // } - - // id := backupvaults.NewBackupVaultID(subscriptionId, backupVaultID.ResourceGroupName, model.Name) - - // metadata.Logger.Infof("Import check for %s", id) - // existing, err := client.(ctx, id) - // if err != nil { - // if !response.WasNotFound(existing.HttpResponse) { - // return fmt.Errorf("checking for presence of existing %s: %s", id, err) - // } - // } - - // if !response.WasNotFound(existing.HttpResponse) { - // return tf.ImportAsExistsError(r.ResourceType(), id.ID()) - // } - - // // Performing some validations that are not possible in the schema - // if errorList := netAppValidate.ValidateNetAppVolumeQuotaRule(ctx, pointer.From(volumeID), metadata.Client, pointer.To(model)); len(errorList) > 0 { - // return fmt.Errorf("one or more issues found while performing deeper validations for %s:\n%+v", id, errorList) - // } - - // parameters := volumequotarules.VolumeQuotaRule{ - // Location: location.Normalize(model.Location), - // Properties: &volumequotarules.VolumeQuotaRulesProperties{ - // QuotaSizeInKiBs: pointer.To(model.QuotaSizeInKiB), - // QuotaType: pointer.To(volumequotarules.Type(model.QuotaType)), - // QuotaTarget: utils.String(model.QuotaTarget), - // }, - // } - - // err = client.CreateThenPoll(ctx, id, parameters) - // if err != nil { - // return fmt.Errorf("creating %s: %+v", id, err) - // } - - // metadata.SetID(id) + client := metadata.Client.NetApp.BackupVaultsClient + subscriptionId := metadata.Client.Account.SubscriptionId + + var model netAppModels.NetAppBackupVaultModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + backupVaultID, err := backupvaults.ParseBackupVaultID(model.Id) + if err != nil { + return fmt.Errorf("error parsing backup vault id %s: %+v", model.Id, err) + } + + id := backupvaults.NewBackupVaultID(subscriptionId, backupVaultID.ResourceGroupName, backupVaultID.NetAppAccountName, model.Name) + + metadata.Logger.Infof("Import check for %s", id) + existing, err := client.Get(ctx, id) + if err != nil { + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %s", id, err) + } + } + + if !response.WasNotFound(existing.HttpResponse) { + return tf.ImportAsExistsError(r.ResourceType(), id.ID()) + } + + parameters := backupvaults.BackupVault{ + Location: location.Normalize(model.Location), + Tags: pointer.To(model.Tags), + } + + err = client.CreateOrUpdateThenPoll(ctx, id, parameters) + if err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) return nil }, @@ -124,9 +115,9 @@ func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 120 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.VolumeQuotaRules + client := metadata.Client.NetApp.BackupVaultsClient - id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + id, err := backupvaults.ParseBackupVaultID(metadata.ResourceData.Id()) if err != nil { return err } @@ -139,16 +130,18 @@ func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Updating %s", id) - update := volumequotarules.VolumeQuotaRulePatch{ - Properties: &volumequotarules.VolumeQuotaRulesProperties{}, - } + if metadata.ResourceData.HasChange("Tags") { - update.Properties.QuotaSizeInKiBs = utils.Int64(state.QuotaSizeInKiB) - if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } + update := backupvaults.BackupVaultPatch{ + Tags: pointer.To(state.Tags), + } - metadata.SetID(id) + if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + metadata.SetID(id) + } return nil }, @@ -160,9 +153,9 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.VolumeQuotaRules + client := metadata.Client.NetApp.BackupVaultsClient - id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + id, err := backupvaults.ParseBackupVaultID(metadata.ResourceData.Id()) if err != nil { return err } @@ -181,15 +174,10 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %v", id, err) } - volumeID := volumequotarules.NewVolumeID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) - model := netAppModels.NetAppBackupVaultModel{ - Name: id.VolumeQuotaRuleName, - VolumeID: volumeID.ID(), - Location: location.NormalizeNilable(pointer.To(existing.Model.Location)), - QuotaTarget: pointer.From(existing.Model.Properties.QuotaTarget), - QuotaSizeInKiB: pointer.From(existing.Model.Properties.QuotaSizeInKiBs), - QuotaType: string(pointer.From(existing.Model.Properties.QuotaType)), + Name: id.BackupVaultName, + Location: location.NormalizeNilable(pointer.To(existing.Model.Location)), + Tags: pointer.From(existing.Model.Tags), } metadata.SetID(id) @@ -204,9 +192,9 @@ func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { Timeout: 120 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.VolumeQuotaRules + client := metadata.Client.NetApp.BackupVaultsClient - id, err := volumequotarules.ParseVolumeQuotaRuleID(metadata.ResourceData.Id()) + id, err := backupvaults.ParseBackupVaultID(metadata.ResourceData.Id()) if err != nil { return err } diff --git a/internal/services/netapp/netapp_backup_vault_test.go b/internal/services/netapp/netapp_backup_vault_test.go new file mode 100644 index 000000000000..5529487de2d9 --- /dev/null +++ b/internal/services/netapp/netapp_backup_vault_test.go @@ -0,0 +1,182 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp_test + +import ( + "context" + "fmt" + "net/http" + "testing" + + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "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" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type NetAppBackupVaultResource struct{} + +func TestAccNetAppBackupVault_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_backup_vault", "test") + r := NetAppBackupVaultResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (t NetAppBackupVaultResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { + id, err := backupvaults.ParseBackupVaultID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.NetApp.BackupVaultsClient.Get(ctx, *id) + + if err != nil { + if resp.HttpResponse.StatusCode == http.StatusNotFound { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", id, err) + } + + return utils.Bool(true), nil +} + +func (NetAppBackupVaultResource) basic(data acceptance.TestData) string { + template := NetAppBackupVaultResource{}.template(data) + return fmt.Sprintf(` +%[1]s + +resource "azurerm_netapp_backup_vault" "test" { + name = "acctest-NetAppBackupVault-%[2]d" + location = azurerm_resource_group.test.location +} +`, template, data.RandomInteger) +} + +func (NetAppBackupVaultResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +variable "tenantId" { + description = "Azure Tenant Id" + type = string +} + +provider "azurerm" { + tenand_id = variable.tenantId + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-netapp-%[1]d" + location = "%[2]s" + + // tags = { + // "CreatedOnDate" = "2023-08-17T08:01:00Z", + // "SkipASMAzSecPack" = "true", + // "SkipNRMSNSG" = "true" + // } +} + +// resource "azurerm_network_security_group" "test" { +// name = "acctest-NSG-%[1]d" +// location = azurerm_resource_group.test.location +// resource_group_name = azurerm_resource_group.test.name + +// tags = { +// "CreatedOnDate" = "2023-08-17T08:01:00Z", +// "SkipASMAzSecPack" = "true" +// } +// } + +// resource "azurerm_virtual_network" "test" { +// name = "acctest-VirtualNetwork-%[1]d" +// location = azurerm_resource_group.test.location +// resource_group_name = azurerm_resource_group.test.name +// address_space = ["10.6.0.0/16"] + +// tags = { +// "CreatedOnDate" = "2023-08-17T08:01:00Z", +// "SkipASMAzSecPack" = "true" +// } +// } + +// resource "azurerm_subnet" "test" { +// name = "acctest-DelegatedSubnet-%[1]d" +// resource_group_name = azurerm_resource_group.test.name +// virtual_network_name = azurerm_virtual_network.test.name +// address_prefixes = ["10.6.2.0/24"] + +// delegation { +// name = "testdelegation" + +// service_delegation { +// name = "Microsoft.Netapp/volumes" +// actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"] +// } +// } +// } + +// resource "azurerm_subnet_network_security_group_association" "public" { +// subnet_id = azurerm_subnet.test.id +// network_security_group_id = azurerm_network_security_group.test.id +// } + +resource "azurerm_netapp_account" "test" { + name = "acctest-NetAppAccount-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + tags = { + "CreatedOnDate" = "2023-08-17T08:01:00Z", + "SkipASMAzSecPack" = "true" + } +} + +// resource "azurerm_netapp_pool" "test" { +// name = "acctest-NetAppPool-%[1]d" +// location = azurerm_resource_group.test.location +// resource_group_name = azurerm_resource_group.test.name +// account_name = azurerm_netapp_account.test.name +// service_level = "Standard" +// size_in_tb = 4 +// qos_type = "Auto" + +// tags = { +// "CreatedOnDate" = "2023-08-17T08:01:00Z", +// "SkipASMAzSecPack" = "true" +// } +// } + +// resource "azurerm_netapp_volume" "test" { +// name = "acctest-NetAppVolume-%[1]d" +// location = azurerm_resource_group.test.location +// resource_group_name = azurerm_resource_group.test.name +// account_name = azurerm_netapp_account.test.name +// pool_name = azurerm_netapp_pool.test.name +// volume_path = "my-unique-file-path-%[1]d" +// service_level = "Standard" +// subnet_id = azurerm_subnet.test.id +// storage_quota_in_gb = 100 +// protocols = ["NFSv3"] + +// tags = { +// "CreatedOnDate" = "2022-07-08T23:50:21Z", +// "SkipASMAzSecPack" = "true" +// } +// } +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/internal/services/netapp/netapp_pool_data_source.go b/internal/services/netapp/netapp_pool_data_source.go index 68f0557ab3c6..14ccc2ab245a 100644 --- a/internal/services/netapp/netapp_pool_data_source.go +++ b/internal/services/netapp/netapp_pool_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_pool_resource.go b/internal/services/netapp/netapp_pool_resource.go index c8e78280f8f2..f6f6ec4588ab 100644 --- a/internal/services/netapp/netapp_pool_resource.go +++ b/internal/services/netapp/netapp_pool_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_pool_resource_test.go b/internal/services/netapp/netapp_pool_resource_test.go index 1b05fa0c779b..4eed7029b2ff 100644 --- a/internal/services/netapp/netapp_pool_resource_test.go +++ b/internal/services/netapp/netapp_pool_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" "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/netapp/netapp_snapshot_data_source.go b/internal/services/netapp/netapp_snapshot_data_source.go index 4c1300a1f1da..500c1dde2ecf 100644 --- a/internal/services/netapp/netapp_snapshot_data_source.go +++ b/internal/services/netapp/netapp_snapshot_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_snapshot_policy_data_source.go b/internal/services/netapp/netapp_snapshot_policy_data_source.go index 4cb8f42e42a4..01ab829788be 100644 --- a/internal/services/netapp/netapp_snapshot_policy_data_source.go +++ b/internal/services/netapp/netapp_snapshot_policy_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" diff --git a/internal/services/netapp/netapp_snapshot_policy_resource.go b/internal/services/netapp/netapp_snapshot_policy_resource.go index 468497aa8223..45c084ca9ed4 100644 --- a/internal/services/netapp/netapp_snapshot_policy_resource.go +++ b/internal/services/netapp/netapp_snapshot_policy_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_snapshot_policy_resource_test.go b/internal/services/netapp/netapp_snapshot_policy_resource_test.go index 6728c2c036d4..569c4d047185 100644 --- a/internal/services/netapp/netapp_snapshot_policy_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_policy_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" "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/netapp/netapp_snapshot_resource.go b/internal/services/netapp/netapp_snapshot_resource.go index 1fc1180191c7..407cd898e9a2 100644 --- a/internal/services/netapp/netapp_snapshot_resource.go +++ b/internal/services/netapp/netapp_snapshot_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/netapp/2023-05-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_snapshot_resource_test.go b/internal/services/netapp/netapp_snapshot_resource_test.go index 498587b03326..a7dc18b85faf 100644 --- a/internal/services/netapp/netapp_snapshot_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" "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/netapp/netapp_volume_data_source.go b/internal/services/netapp/netapp_volume_data_source.go index 49b7d826c0c5..ab5d74148907 100644 --- a/internal/services/netapp/netapp_volume_data_source.go +++ b/internal/services/netapp/netapp_volume_data_source.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-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go index a76fde2697e1..8237e2660439 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.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-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go index a50240de688e..95d6ef98959e 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go @@ -15,10 +15,10 @@ 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/netapp/2023-05-01/capacitypools" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" @@ -343,10 +343,6 @@ func (r NetAppVolumeGroupSapHanaResource) Create() sdk.ResourceFunc { } } - // TODO: deploymentSpecId is temporary until the backend is updated and deploymentSpecId is not required anymore, - // it will be handled internally by the RP - deploymentSpecId := "20542149-bfca-5618-1879-9863dc6767f1" - parameters := volumegroups.VolumeGroupDetails{ Location: utils.String(location.Normalize(model.Location)), Properties: &volumegroups.VolumeGroupProperties{ @@ -354,7 +350,6 @@ func (r NetAppVolumeGroupSapHanaResource) Create() sdk.ResourceFunc { GroupDescription: utils.String(model.GroupDescription), ApplicationType: pointer.To(volumegroups.ApplicationTypeSAPNegativeHANA), ApplicationIdentifier: utils.String(model.ApplicationIdentifier), - DeploymentSpecId: utils.String(deploymentSpecId), }, Volumes: volumeList, }, diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go index 1f4046017dce..0cc5d0966e3b 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 00f49f8defbf..0e2cddae3a6f 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -13,9 +13,9 @@ 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/netapp/2023-05-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_quota_rule_data_source.go b/internal/services/netapp/netapp_volume_quota_rule_data_source.go index 6c55036c20ca..a4efe6ee162f 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_data_source.go +++ b/internal/services/netapp/netapp_volume_quota_rule_data_source.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource.go b/internal/services/netapp/netapp_volume_quota_rule_resource.go index 38fe1da9ed12..cf54ef5cd48c 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go index 38d1eaf4eab2..2e46415b973d 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go @@ -9,7 +9,7 @@ import ( "net/http" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 4d3dad53e7e9..12208842dee5 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -15,9 +15,9 @@ 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/netapp/2023-05-01/snapshots" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index 195da0a711cb..acea9676bb3b 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -10,7 +10,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" "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/netapp/validate/account_id.go b/internal/services/netapp/validate/account_id.go index 9d204ef701d8..e975007e634a 100644 --- a/internal/services/netapp/validate/account_id.go +++ b/internal/services/netapp/validate/account_id.go @@ -6,7 +6,7 @@ package validate import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" ) func ValidateNetAppAccountID(input interface{}, key string) (warnings []string, errors []error) { diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go index 93a930c7e701..94a8d1cb0e75 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" ) func ValidateNetAppVolumeGroupExportPolicyRuleSAPHanna(rule volumegroups.ExportPolicyRule, protocolType string) []error { diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go index dfebadc3ac4e..1e9bba8d7a83 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go index ec27e6f3add1..2d948a165e99 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go index af1a109d8b0c..964081d4f043 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go index 884db310776f..9ca366991070 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRulesUnix(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go index fc52132d24f8..d7e572759a10 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRules(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go index ed72508569b8..ba4b0e712605 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRulesQuotaType(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_validations.go b/internal/services/netapp/validate/volume_quota_rule_quota_validations.go index c53e7b421298..dc4b7d401e7c 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_validations.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_validations.go @@ -9,8 +9,8 @@ import ( "net/http" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" ) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md new file mode 100644 index 000000000000..e06b4ae1999c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults` Documentation + +The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-11-01/backupvaults" +``` + + +### Client Initialization + +```go +client := backupvaults.NewBackupVaultsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupVaultsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") + +payload := backupvaults.BackupVault{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupVaultsClient.Delete` + +```go +ctx := context.TODO() +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupVaultsClient.Get` + +```go +ctx := context.TODO() +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") + +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: `BackupVaultsClient.ListByNetAppAccount` + +```go +ctx := context.TODO() +id := backupvaults.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") + +// alternatively `client.ListByNetAppAccount(ctx, id)` can be used to do batched pagination +items, err := client.ListByNetAppAccountComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BackupVaultsClient.Update` + +```go +ctx := context.TODO() +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") + +payload := backupvaults.BackupVaultPatch{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go new file mode 100644 index 000000000000..7a4dd9321700 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go @@ -0,0 +1,26 @@ +package backupvaults + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupVaultsClient struct { + Client *resourcemanager.Client +} + +func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) + } + + return &BackupVaultsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go new file mode 100644 index 000000000000..de1952d78349 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go @@ -0,0 +1,139 @@ +package backupvaults + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&BackupVaultId{}) +} + +var _ resourceids.ResourceId = &BackupVaultId{} + +// BackupVaultId is a struct representing the Resource ID for a Backup Vault +type BackupVaultId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string + BackupVaultName string +} + +// NewBackupVaultID returns a new BackupVaultId struct +func NewBackupVaultID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupVaultName string) BackupVaultId { + return BackupVaultId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + BackupVaultName: backupVaultName, + } +} + +// ParseBackupVaultID parses 'input' into a BackupVaultId +func ParseBackupVaultID(input string) (*BackupVaultId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupVaultId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBackupVaultIDInsensitively parses 'input' case-insensitively into a BackupVaultId +// note: this method should only be used for API response data and not user input +func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupVaultId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupVaultId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) + } + + return nil +} + +// ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID +func ValidateBackupVaultID(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 := ParseBackupVaultID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Backup Vault ID +func (id BackupVaultId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s/backupVaults/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Backup Vault ID +func (id BackupVaultId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + } +} + +// String returns a human-readable description of this Backup Vault ID +func (id BackupVaultId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + fmt.Sprintf("Backup Vault Name: %q", id.BackupVaultName), + } + return fmt.Sprintf("Backup Vault (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go new file mode 100644 index 000000000000..2096ade91b39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go @@ -0,0 +1,130 @@ +package backupvaults + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&NetAppAccountId{}) +} + +var _ resourceids.ResourceId = &NetAppAccountId{} + +// NetAppAccountId is a struct representing the Resource ID for a Net App Account +type NetAppAccountId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string +} + +// NewNetAppAccountID returns a new NetAppAccountId struct +func NewNetAppAccountID(subscriptionId string, resourceGroupName string, netAppAccountName string) NetAppAccountId { + return NetAppAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + } +} + +// ParseNetAppAccountID parses 'input' into a NetAppAccountId +func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseNetAppAccountIDInsensitively parses 'input' case-insensitively into a NetAppAccountId +// note: this method should only be used for API response data and not user input +func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetAppAccountId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + return nil +} + +// ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID +func ValidateNetAppAccountID(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 := ParseNetAppAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Net App Account ID +func (id NetAppAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Net App Account ID +func (id NetAppAccountId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + } +} + +// String returns a human-readable description of this Net App Account ID +func (id NetAppAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + } + return fmt.Sprintf("Net App Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go new file mode 100644 index 000000000000..0f75206e2d7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go @@ -0,0 +1,75 @@ +package backupvaults + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BackupVault +} + +// CreateOrUpdate ... +func (c BackupVaultsClient) CreateOrUpdate(ctx context.Context, id BackupVaultId, input BackupVault) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c BackupVaultsClient) CreateOrUpdateThenPoll(ctx context.Context, id BackupVaultId, input BackupVault) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go new file mode 100644 index 000000000000..32a1387f1ba7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go @@ -0,0 +1,70 @@ +package backupvaults + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c BackupVaultsClient) Delete(ctx context.Context, id BackupVaultId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c BackupVaultsClient) DeleteThenPoll(ctx context.Context, id BackupVaultId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go new file mode 100644 index 000000000000..e3c1b3c69524 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go @@ -0,0 +1,54 @@ +package backupvaults + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 + OData *odata.OData + Model *BackupVault +} + +// Get ... +func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model BackupVault + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go new file mode 100644 index 000000000000..a0f46fc10236 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go @@ -0,0 +1,105 @@ +package backupvaults + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByNetAppAccountOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BackupVault +} + +type ListByNetAppAccountCompleteResult struct { + LatestHttpResponse *http.Response + Items []BackupVault +} + +type ListByNetAppAccountCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByNetAppAccountCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByNetAppAccount ... +func (c BackupVaultsClient) ListByNetAppAccount(ctx context.Context, id NetAppAccountId) (result ListByNetAppAccountOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByNetAppAccountCustomPager{}, + Path: fmt.Sprintf("%s/backupVaults", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BackupVault `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByNetAppAccountComplete retrieves all the results into a single object +func (c BackupVaultsClient) ListByNetAppAccountComplete(ctx context.Context, id NetAppAccountId) (ListByNetAppAccountCompleteResult, error) { + return c.ListByNetAppAccountCompleteMatchingPredicate(ctx, id, BackupVaultOperationPredicate{}) +} + +// ListByNetAppAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BackupVaultsClient) ListByNetAppAccountCompleteMatchingPredicate(ctx context.Context, id NetAppAccountId, predicate BackupVaultOperationPredicate) (result ListByNetAppAccountCompleteResult, err error) { + items := make([]BackupVault, 0) + + resp, err := c.ListByNetAppAccount(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByNetAppAccountCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go new file mode 100644 index 000000000000..8ea7dce31232 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go @@ -0,0 +1,75 @@ +package backupvaults + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BackupVault +} + +// Update ... +func (c BackupVaultsClient) Update(ctx context.Context, id BackupVaultId, input BackupVaultPatch) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c BackupVaultsClient) UpdateThenPoll(ctx context.Context, id BackupVaultId, input BackupVaultPatch) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go new file mode 100644 index 000000000000..0e8761f2293a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go @@ -0,0 +1,18 @@ +package backupvaults + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupVault struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *BackupVaultProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,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/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go new file mode 100644 index 000000000000..899e2ecf858c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go @@ -0,0 +1,8 @@ +package backupvaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupVaultPatch struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go new file mode 100644 index 000000000000..7327d4d21196 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go @@ -0,0 +1,8 @@ +package backupvaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupVaultProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go new file mode 100644 index 000000000000..53d942f568ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go @@ -0,0 +1,32 @@ +package backupvaults + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupVaultOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p BackupVaultOperationPredicate) Matches(input BackupVault) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go new file mode 100644 index 000000000000..742a32aa4616 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go @@ -0,0 +1,12 @@ +package backupvaults + +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-11-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md index a5e792539322..6db036a47854 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/capacitypools" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/method_poolsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_capacitypoolpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypoolpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_capacitypoolpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypoolpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_poolpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolpatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_poolpatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolpatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_poolproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/model_poolproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/version.go index b111b9e4e5fb..54c4a477f546 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md index e22e3bf16194..9d541bb9ec42 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/netappaccounts" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountslistbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslistbysubscription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountslistbysubscription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslistbysubscription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsrenewcredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsrenewcredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsrenewcredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsrenewcredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_accountencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_accountencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_accountproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_accountproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_activedirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_activedirectory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_activedirectory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_activedirectory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_encryptionidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_encryptionidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_encryptionidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_encryptionidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_keyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_keyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_ldapsearchscopeopt.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_ldapsearchscopeopt.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_ldapsearchscopeopt.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_ldapsearchscopeopt.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_netappaccountpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccountpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/model_netappaccountpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccountpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/version.go index 9425f9d13730..2fb0e0d3b5b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md index 22b6030bb114..e5c48c02b7ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/snapshotpolicy" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_dailyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_dailyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_dailyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_dailyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_hourlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_hourlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_hourlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_hourlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_monthlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_monthlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_monthlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_monthlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicieslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicieslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicieslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicypatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicypatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicypatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicypatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_snapshotpolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_weeklyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_weeklyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/model_weeklyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_weeklyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go index 1620c184210d..4b716695a280 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md index 9c4217850ed1..4a8604cc08c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/snapshots" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_restorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_restorefiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_restorefiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_restorefiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotrestorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotrestorefiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotrestorefiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotrestorefiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/model_snapshotslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/version.go index 636463b4c27f..dba1cc342367 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md index e1c45d7bd1ea..1424cd706bc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/volumegroups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_exportpolicyrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_exportpolicyrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_exportpolicyrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_exportpolicyrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_mounttargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_mounttargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_mounttargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_mounttargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_placementkeyvaluepairs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_placementkeyvaluepairs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_placementkeyvaluepairs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_placementkeyvaluepairs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_replicationobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_replicationobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_replicationobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_replicationobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go new file mode 100644 index 000000000000..39ce5a2b79ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go @@ -0,0 +1,10 @@ +package volumegroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeBackupProperties struct { + BackupPolicyId *string `json:"backupPolicyId,omitempty"` + BackupVaultId *string `json:"backupVaultId,omitempty"` + PolicyEnforced *bool `json:"policyEnforced,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegrouplist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegrouplist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegrouplistproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplistproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegrouplistproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplistproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupmetadata.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupmetadata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupmetadata.go index 30441c6826d5..b9fa343690c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupmetadata.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupmetadata.go @@ -6,7 +6,6 @@ package volumegroups type VolumeGroupMetaData struct { ApplicationIdentifier *string `json:"applicationIdentifier,omitempty"` ApplicationType *ApplicationType `json:"applicationType,omitempty"` - DeploymentSpecId *string `json:"deploymentSpecId,omitempty"` GlobalPlacementRules *[]PlacementKeyValuePairs `json:"globalPlacementRules,omitempty"` GroupDescription *string `json:"groupDescription,omitempty"` VolumesCount *int64 `json:"volumesCount,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupvolumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupvolumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumegroupvolumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupvolumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumepropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesdataprotection.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumepropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesdataprotection.go index b97d3a9230f9..632e45e64b06 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumepropertiesdataprotection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesdataprotection.go @@ -4,6 +4,7 @@ package volumegroups // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type VolumePropertiesDataProtection struct { + Backup *VolumeBackupProperties `json:"backup,omitempty"` Replication *ReplicationObject `json:"replication,omitempty"` Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` VolumeRelocation *VolumeRelocationProperties `json:"volumeRelocation,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumepropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumepropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumerelocationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumerelocationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumerelocationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumerelocationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumesnapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumesnapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/model_volumesnapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumesnapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/version.go index 9b0ac047bbe7..e9eb0225bac2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md index 05ed28b53177..9deddc0c0e08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/volumequotarules" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarulepatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulepatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarulepatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulepatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotaruleslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotaruleslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotaruleslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotaruleslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarulesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulesproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/model_volumequotarulesproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulesproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/version.go index 530ef976e873..ee9371b563c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md index 95b0e0742a0b..8172e40f4fe7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/volumes" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_populateavailabilityzone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_populateavailabilityzone.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_populateavailabilityzone.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_populateavailabilityzone.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_exportpolicyrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_exportpolicyrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_exportpolicyrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_exportpolicyrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_mounttargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_mounttargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_mounttargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_mounttargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_placementkeyvaluepairs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_placementkeyvaluepairs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_placementkeyvaluepairs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_placementkeyvaluepairs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_replicationobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_replicationobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_replicationobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_replicationobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go new file mode 100644 index 000000000000..a74e6fd4d162 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go @@ -0,0 +1,10 @@ +package volumes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeBackupProperties struct { + BackupPolicyId *string `json:"backupPolicyId,omitempty"` + BackupVaultId *string `json:"backupVaultId,omitempty"` + PolicyEnforced *bool `json:"policyEnforced,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchproperties.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchproperties.go index f2257b566714..716cd8f9697e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchproperties.go @@ -12,6 +12,7 @@ type VolumePatchProperties struct { DefaultUserQuotaInKiBs *int64 `json:"defaultUserQuotaInKiBs,omitempty"` ExportPolicy *VolumePatchPropertiesExportPolicy `json:"exportPolicy,omitempty"` IsDefaultQuotaEnabled *bool `json:"isDefaultQuotaEnabled,omitempty"` + ProtocolTypes *[]string `json:"protocolTypes,omitempty"` ServiceLevel *ServiceLevel `json:"serviceLevel,omitempty"` SmbAccessBasedEnumeration *SmbAccessBasedEnumeration `json:"smbAccessBasedEnumeration,omitempty"` SmbNonBrowsable *SmbNonBrowsable `json:"smbNonBrowsable,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchpropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesdataprotection.go similarity index 82% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchpropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesdataprotection.go index 6b54432bc61b..8c9edc10ff72 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchpropertiesdataprotection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesdataprotection.go @@ -4,5 +4,6 @@ package volumes // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type VolumePatchPropertiesDataProtection struct { + Backup *VolumeBackupProperties `json:"backup,omitempty"` Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchpropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepatchpropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesdataprotection.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesdataprotection.go index e23524897548..fcf952952d20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepropertiesdataprotection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesdataprotection.go @@ -4,6 +4,7 @@ package volumes // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type VolumePropertiesDataProtection struct { + Backup *VolumeBackupProperties `json:"backup,omitempty"` Replication *ReplicationObject `json:"replication,omitempty"` Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` VolumeRelocation *VolumeRelocationProperties `json:"volumeRelocation,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumepropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumerelocationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumerelocationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumerelocationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumerelocationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumesnapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumesnapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/model_volumesnapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumesnapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/version.go index 5b33cd0a49e3..3583fe71b164 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md index 7b11775bc185..a2e754a7aca1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-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/netapp/2023-05-01/volumesreplication" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesauthorizereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesauthorizereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesauthorizereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesauthorizereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesbreakreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesbreakreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesbreakreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesbreakreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesdeletereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesdeletereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesdeletereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesdeletereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreestablishreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreestablishreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreestablishreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreestablishreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreinitializereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreinitializereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreinitializereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreinitializereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesresyncreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesresyncreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesresyncreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesresyncreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_authorizerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_authorizerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_authorizerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_authorizerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_breakreplicationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_breakreplicationrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_breakreplicationrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_breakreplicationrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_listreplications.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_listreplications.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_listreplications.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_listreplications.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_reestablishreplicationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_reestablishreplicationrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_reestablishreplicationrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_reestablishreplicationrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_replication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_replication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_replicationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replicationstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/model_replicationstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replicationstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/version.go index 258bca3f8847..a9e89056628b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/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-05-01" +const defaultApiVersion = "2023-11-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) From 589c5783aeac2e72d2fd4b61e55ca3d78330193c Mon Sep 17 00:00:00 2001 From: Paulo Date: Wed, 3 Jul 2024 23:30:26 +0000 Subject: [PATCH 03/32] netapp_backup_vault resource and data source implementation --- internal/acceptance/testclient/client.go | 2 +- internal/acceptance/testing.go | 7 +- internal/services/netapp/models/models.go | 10 +- .../netapp/netapp_backup_vault_data_source.go | 96 ++++++++++ .../netapp_backup_vault_data_source_test.go | 41 +++++ .../netapp/netapp_backup_vault_resource.go | 70 +++++-- .../netapp/netapp_backup_vault_test.go | 174 +++++++----------- internal/services/netapp/registration.go | 2 +- 8 files changed, 274 insertions(+), 128 deletions(-) create mode 100644 internal/services/netapp/netapp_backup_vault_data_source.go create mode 100644 internal/services/netapp/netapp_backup_vault_data_source_test.go diff --git a/internal/acceptance/testclient/client.go b/internal/acceptance/testclient/client.go index 84367cc565f4..133c06210e00 100644 --- a/internal/acceptance/testclient/client.go +++ b/internal/acceptance/testclient/client.go @@ -58,7 +58,7 @@ func Build() (*clients.Client, error) { EnableAuthenticatingUsingClientCertificate: true, EnableAuthenticatingUsingClientSecret: true, - EnableAuthenticatingUsingAzureCLI: false, + EnableAuthenticatingUsingAzureCLI: true, EnableAuthenticatingUsingManagedIdentity: false, EnableAuthenticationUsingOIDC: false, EnableAuthenticationUsingGitHubOIDC: false, diff --git a/internal/acceptance/testing.go b/internal/acceptance/testing.go index 1dc6a3070f5e..1bf2208ac638 100644 --- a/internal/acceptance/testing.go +++ b/internal/acceptance/testing.go @@ -17,8 +17,6 @@ import ( func PreCheck(t *testing.T) { variables := []string{ - "ARM_CLIENT_ID", - "ARM_CLIENT_SECRET", "ARM_SUBSCRIPTION_ID", "ARM_TENANT_ID", "ARM_TEST_LOCATION", @@ -26,6 +24,11 @@ func PreCheck(t *testing.T) { "ARM_TEST_LOCATION_ALT2", } + cliAuthEnabled := os.Getenv("ARM_USE_CLI") + if cliAuthEnabled == "" { + variables = append(variables, "ARM_CLIENT_ID", "ARM_CLIENT_SECRET") + } + for _, variable := range variables { value := os.Getenv(variable) if value == "" { diff --git a/internal/services/netapp/models/models.go b/internal/services/netapp/models/models.go index 3ba81c203d9c..b7eb4b33d05f 100644 --- a/internal/services/netapp/models/models.go +++ b/internal/services/netapp/models/models.go @@ -118,9 +118,9 @@ type NetAppVolumeQuotaRuleDataSourceModel struct { } type NetAppBackupVaultModel struct { - Id string `tfschema:"id"` - Name string `tfschema:"name"` - Location string `tfschema:"location"` - AccountName string `tfschema:"account_name"` - Tags map[string]string `tfschema:"tags"` + Name string `tfschema:"name"` + ResourceGroupName string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + AccountName string `tfschema:"account_name"` + Tags map[string]string `tfschema:"tags"` } diff --git a/internal/services/netapp/netapp_backup_vault_data_source.go b/internal/services/netapp/netapp_backup_vault_data_source.go new file mode 100644 index 000000000000..9a42daefbe13 --- /dev/null +++ b/internal/services/netapp/netapp_backup_vault_data_source.go @@ -0,0 +1,96 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type NetAppBackupVaultDataSource struct{} + +var _ sdk.DataSource = NetAppBackupVaultDataSource{} + +func (r NetAppBackupVaultDataSource) ResourceType() string { + return "azurerm_netapp_backup_vault" +} + +func (r NetAppBackupVaultDataSource) ModelObject() interface{} { + return &netAppModels.NetAppBackupVaultModel{} +} + +func (r NetAppBackupVaultDataSource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return backupvaults.ValidateBackupVaultID +} + +func (r NetAppBackupVaultDataSource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "account_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + } +} + +func (r NetAppBackupVaultDataSource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "location": commonschema.LocationComputed(), + + "tags": commonschema.TagsDataSource(), + } +} + +func (r NetAppBackupVaultDataSource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.BackupVaultsClient + + var state netAppModels.NetAppBackupVaultModel + if err := metadata.Decode(&state); err != nil { + return err + } + + backupVaultID := backupvaults.NewBackupVaultID(metadata.Client.Account.SubscriptionId, state.ResourceGroupName, state.AccountName, state.Name) + + existing, err := client.Get(ctx, backupVaultID) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(backupVaultID) + } + return fmt.Errorf("retrieving %s: %v", backupVaultID, err) + } + + model := existing.Model + if model == nil { + return fmt.Errorf("retrieving %s: model was nil", backupVaultID) + } + + state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Tags = pointer.From(model.Tags) + + metadata.SetID(backupVaultID) + + return metadata.Encode(&state) + }, + } +} diff --git a/internal/services/netapp/netapp_backup_vault_data_source_test.go b/internal/services/netapp/netapp_backup_vault_data_source_test.go new file mode 100644 index 000000000000..72b12279713c --- /dev/null +++ b/internal/services/netapp/netapp_backup_vault_data_source_test.go @@ -0,0 +1,41 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type NetAppBackupVaultDataSource struct{} + +func TestAccNetAppBackupVaultDataSource_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_netapp_backup_vault", "test") + d := NetAppBackupVaultDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + //Config: d.basicDataSource(data), + Config: d.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + ), + }, + }) +} + +func (d NetAppBackupVaultDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_netapp_backup_vault" "test" { + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + name = azurerm_netapp_backup_vault.test.name +} +`, NetAppBackupVaultResource{}.basic(data)) +} diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 4bbf0b12f274..34f18ee58614 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "net/http" + "strconv" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" @@ -46,6 +47,8 @@ func (r NetAppBackupVaultResource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: netAppValidate.VolumeQuotaRuleName, }, + "resource_group_name": commonschema.ResourceGroupName(), + "location": commonschema.Location(), "account_name": { @@ -75,12 +78,7 @@ func (r NetAppBackupVaultResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - backupVaultID, err := backupvaults.ParseBackupVaultID(model.Id) - if err != nil { - return fmt.Errorf("error parsing backup vault id %s: %+v", model.Id, err) - } - - id := backupvaults.NewBackupVaultID(subscriptionId, backupVaultID.ResourceGroupName, backupVaultID.NetAppAccountName, model.Name) + id := backupvaults.NewBackupVaultID(subscriptionId, model.ResourceGroupName, model.AccountName, model.Name) metadata.Logger.Infof("Import check for %s", id) existing, err := client.Get(ctx, id) @@ -128,9 +126,8 @@ func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { return err } - metadata.Logger.Infof("Updating %s", id) - - if metadata.ResourceData.HasChange("Tags") { + if metadata.ResourceData.HasChange("tags") { + metadata.Logger.Infof("Updating %s", id) update := backupvaults.BackupVaultPatch{ Tags: pointer.To(state.Tags), @@ -174,15 +171,17 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %v", id, err) } - model := netAppModels.NetAppBackupVaultModel{ - Name: id.BackupVaultName, - Location: location.NormalizeNilable(pointer.To(existing.Model.Location)), - Tags: pointer.From(existing.Model.Tags), + if model := existing.Model; model != nil { + state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Tags = pointer.From(model.Tags) + state.AccountName = id.NetAppAccountName + state.Name = id.BackupVaultName + state.ResourceGroupName = id.ResourceGroupName } metadata.SetID(id) - return metadata.Encode(&model) + return metadata.Encode(&state) }, } } @@ -211,7 +210,50 @@ func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { return fmt.Errorf("deleting %s: %+v", pointer.From(id), err) } + if err = waitForBackupVaultDeletion(ctx, client, *id); err != nil { + return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) + } + return nil }, } } + +func waitForBackupVaultDeletion(ctx context.Context, client *backupvaults.BackupVaultsClient, id backupvaults.BackupVaultId) error { + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal-error: context had no deadline") + } + stateConf := &pluginsdk.StateChangeConf{ + ContinuousTargetOccurence: 5, + Delay: 5 * time.Second, + MinTimeout: 5 * time.Second, + Pending: []string{"200", "202"}, + Target: []string{"204", "404"}, + Refresh: netappbBackupVaultStateRefreshFunc(ctx, client, id), + Timeout: time.Until(deadline), + } + + if _, err := stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for %s to be deleted: %+v", id, err) + } + + return nil +} + +func netappbBackupVaultStateRefreshFunc(ctx context.Context, client *backupvaults.BackupVaultsClient, id backupvaults.BackupVaultId) pluginsdk.StateRefreshFunc { + return func() (interface{}, string, error) { + res, err := client.Get(ctx, id) + if err != nil { + if !response.WasNotFound(res.HttpResponse) { + return nil, "", fmt.Errorf("retrieving %s: %s", id, err) + } + } + + statusCode := "dropped connection" + if res.HttpResponse != nil { + statusCode = strconv.Itoa(res.HttpResponse.StatusCode) + } + return res, statusCode, nil + } +} diff --git a/internal/services/netapp/netapp_backup_vault_test.go b/internal/services/netapp/netapp_backup_vault_test.go index 5529487de2d9..02322443823a 100644 --- a/internal/services/netapp/netapp_backup_vault_test.go +++ b/internal/services/netapp/netapp_backup_vault_test.go @@ -19,6 +19,24 @@ import ( type NetAppBackupVaultResource struct{} +func (t NetAppBackupVaultResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { + id, err := backupvaults.ParseBackupVaultID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.NetApp.BackupVaultsClient.Get(ctx, *id) + + if err != nil { + if resp.HttpResponse.StatusCode == http.StatusNotFound { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", id, err) + } + + return utils.Bool(true), nil +} + func TestAccNetAppBackupVault_basic(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_backup_vault", "test") r := NetAppBackupVaultResource{} @@ -28,51 +46,75 @@ func TestAccNetAppBackupVault_basic(t *testing.T) { Config: r.basic(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), ), }, data.ImportStep(), }) } -func (t NetAppBackupVaultResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { - id, err := backupvaults.ParseBackupVaultID(state.ID) - if err != nil { - return nil, err - } +func TestAccNetAppBackupVault_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_backup_vault", "test") + r := NetAppBackupVaultResource{} - resp, err := clients.NetApp.BackupVaultsClient.Get(ctx, *id) + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + ), + }, + data.ImportStep(), + { + Config: r.update(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("2"), + ), + }, + data.ImportStep(), + }) +} - if err != nil { - if resp.HttpResponse.StatusCode == http.StatusNotFound { - return utils.Bool(false), nil - } - return nil, fmt.Errorf("retrieving %s: %+v", id, err) - } +func (r NetAppBackupVaultResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s - return utils.Bool(true), nil +resource "azurerm_netapp_backup_vault" "test" { + name = "acctest-NetAppBackupVault-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + + tags = { + "testTag" = "testTagValue" + } +} +`, r.template(data), data.RandomInteger) } -func (NetAppBackupVaultResource) basic(data acceptance.TestData) string { - template := NetAppBackupVaultResource{}.template(data) +func (r NetAppBackupVaultResource) update(data acceptance.TestData) string { return fmt.Sprintf(` %[1]s resource "azurerm_netapp_backup_vault" "test" { - name = "acctest-NetAppBackupVault-%[2]d" - location = azurerm_resource_group.test.location + name = "acctest-NetAppBackupVault-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + + tags = { + "testTag" = "testTagValue", + "FoO" = "BaR" + } } -`, template, data.RandomInteger) +`, r.template(data), data.RandomInteger) } func (NetAppBackupVaultResource) template(data acceptance.TestData) string { return fmt.Sprintf(` -variable "tenantId" { - description = "Azure Tenant Id" - type = string -} - provider "azurerm" { - tenand_id = variable.tenantId features { resource_group { prevent_deletion_if_contains_resources = false @@ -84,57 +126,11 @@ resource "azurerm_resource_group" "test" { name = "acctestRG-netapp-%[1]d" location = "%[2]s" - // tags = { - // "CreatedOnDate" = "2023-08-17T08:01:00Z", - // "SkipASMAzSecPack" = "true", - // "SkipNRMSNSG" = "true" - // } + tags = { + "SkipNRMSNSG" = "true" + } } -// resource "azurerm_network_security_group" "test" { -// name = "acctest-NSG-%[1]d" -// location = azurerm_resource_group.test.location -// resource_group_name = azurerm_resource_group.test.name - -// tags = { -// "CreatedOnDate" = "2023-08-17T08:01:00Z", -// "SkipASMAzSecPack" = "true" -// } -// } - -// resource "azurerm_virtual_network" "test" { -// name = "acctest-VirtualNetwork-%[1]d" -// location = azurerm_resource_group.test.location -// resource_group_name = azurerm_resource_group.test.name -// address_space = ["10.6.0.0/16"] - -// tags = { -// "CreatedOnDate" = "2023-08-17T08:01:00Z", -// "SkipASMAzSecPack" = "true" -// } -// } - -// resource "azurerm_subnet" "test" { -// name = "acctest-DelegatedSubnet-%[1]d" -// resource_group_name = azurerm_resource_group.test.name -// virtual_network_name = azurerm_virtual_network.test.name -// address_prefixes = ["10.6.2.0/24"] - -// delegation { -// name = "testdelegation" - -// service_delegation { -// name = "Microsoft.Netapp/volumes" -// actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"] -// } -// } -// } - -// resource "azurerm_subnet_network_security_group_association" "public" { -// subnet_id = azurerm_subnet.test.id -// network_security_group_id = azurerm_network_security_group.test.id -// } - resource "azurerm_netapp_account" "test" { name = "acctest-NetAppAccount-%[1]d" location = azurerm_resource_group.test.location @@ -146,37 +142,5 @@ resource "azurerm_netapp_account" "test" { } } -// resource "azurerm_netapp_pool" "test" { -// name = "acctest-NetAppPool-%[1]d" -// location = azurerm_resource_group.test.location -// resource_group_name = azurerm_resource_group.test.name -// account_name = azurerm_netapp_account.test.name -// service_level = "Standard" -// size_in_tb = 4 -// qos_type = "Auto" - -// tags = { -// "CreatedOnDate" = "2023-08-17T08:01:00Z", -// "SkipASMAzSecPack" = "true" -// } -// } - -// resource "azurerm_netapp_volume" "test" { -// name = "acctest-NetAppVolume-%[1]d" -// location = azurerm_resource_group.test.location -// resource_group_name = azurerm_resource_group.test.name -// account_name = azurerm_netapp_account.test.name -// pool_name = azurerm_netapp_pool.test.name -// volume_path = "my-unique-file-path-%[1]d" -// service_level = "Standard" -// subnet_id = azurerm_subnet.test.id -// storage_quota_in_gb = 100 -// protocols = ["NFSv3"] - -// tags = { -// "CreatedOnDate" = "2022-07-08T23:50:21Z", -// "SkipASMAzSecPack" = "true" -// } -// } `, data.RandomInteger, data.Locations.Primary) } diff --git a/internal/services/netapp/registration.go b/internal/services/netapp/registration.go index 86ed268214cd..b2ba2a550cc2 100644 --- a/internal/services/netapp/registration.go +++ b/internal/services/netapp/registration.go @@ -55,7 +55,7 @@ func (r Registration) DataSources() []sdk.DataSource { NetAppVolumeGroupSapHanaDataSource{}, NetAppVolumeQuotaRuleDataSource{}, NetAppAccountEncryptionDataSource{}, - //NetAppBackupVaultDataSource{}, + NetAppBackupVaultDataSource{}, } } From da5374cafc02e14119398d4f18018ad68069bd7c Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 22 Aug 2024 21:27:07 +0000 Subject: [PATCH 04/32] Final changes for backup policy feature --- .../nfsv3_volume_with_backup_policy/README.md | 5 + .../nfsv3_volume_with_backup_policy/main.tf | 100 ++++++ .../variables.tf | 7 + internal/acceptance/testclient/client.go | 2 +- internal/acceptance/testing.go | 7 +- internal/features/defaults.go | 4 + internal/features/user_flags.go | 6 + internal/provider/features.go | 35 ++ internal/provider/features_test.go | 113 ++++++ internal/services/netapp/client/client.go | 36 +- internal/services/netapp/models/models.go | 12 + .../netapp/netapp_account_data_source.go | 2 +- .../netapp_account_encryption_data_source.go | 2 +- .../netapp_account_encryption_resource.go | 4 +- ...netapp_account_encryption_resource_test.go | 2 +- .../netapp/netapp_account_resource.go | 2 +- .../netapp/netapp_account_resource_test.go | 2 +- .../netapp_backup_policy_data_source.go | 120 +++++++ .../netapp_backup_policy_data_source_test.go | 40 +++ .../netapp/netapp_backup_policy_resource.go | 331 ++++++++++++++++++ .../netapp/netapp_backup_policy_test.go | 163 +++++++++ .../netapp/netapp_backup_vault_data_source.go | 2 +- .../netapp_backup_vault_data_source_test.go | 1 - .../netapp/netapp_backup_vault_resource.go | 180 ++++++++-- .../netapp/netapp_backup_vault_test.go | 5 +- .../netapp/netapp_pool_data_source.go | 2 +- .../services/netapp/netapp_pool_resource.go | 2 +- .../netapp/netapp_pool_resource_test.go | 2 +- .../netapp/netapp_snapshot_data_source.go | 2 +- .../netapp_snapshot_policy_data_source.go | 2 +- .../netapp/netapp_snapshot_policy_resource.go | 2 +- .../netapp_snapshot_policy_resource_test.go | 2 +- .../netapp/netapp_snapshot_resource.go | 2 +- .../netapp/netapp_snapshot_resource_test.go | 2 +- .../netapp/netapp_volume_data_source.go | 28 +- .../netapp/netapp_volume_data_source_test.go | 36 ++ ...etapp_volume_group_sap_hana_data_source.go | 2 +- .../netapp_volume_group_sap_hana_resource.go | 8 +- ...app_volume_group_sap_hana_resource_test.go | 2 +- .../services/netapp/netapp_volume_helper.go | 102 +++++- .../netapp_volume_quota_rule_data_source.go | 4 +- .../netapp_volume_quota_rule_resource.go | 25 +- .../netapp_volume_quota_rule_resource_test.go | 2 +- .../services/netapp/netapp_volume_resource.go | 260 +++++++++++--- .../netapp/netapp_volume_resource_test.go | 107 ++++-- internal/services/netapp/registration.go | 2 + .../services/netapp/validate/account_id.go | 2 +- .../validate/backup_policy_validation.go | 34 ++ .../validate/backup_policy_validation_test.go | 58 +++ ...p_hana_volumes_export_policy_validation.go | 2 +- ...a_volumes_export_policy_validation_test.go | 2 +- ...olume_group_sap_hana_volumes_validation.go | 2 +- ..._group_sap_hana_volumes_validation_test.go | 2 +- ...le_quota_target_id_unix_validation_test.go | 2 +- ...quota_target_id_windows_validation_test.go | 2 +- ...quota_rule_quota_target_validation_test.go | 2 +- .../volume_quota_rule_quota_validations.go | 4 +- website/docs/d/netapp_backup_policy.markdown | 67 ++++ website/docs/d/netapp_backup_vault.markdown | 49 +++ website/docs/d/netapp_volume.html.markdown | 14 +- .../docs/guides/features-block.html.markdown | 14 + website/docs/r/netapp_backup_policy.markdown | 78 +++++ website/docs/r/netapp_backup_vault.markdown | 64 ++++ website/docs/r/netapp_volume.html.markdown | 50 ++- 64 files changed, 2062 insertions(+), 165 deletions(-) create mode 100644 examples/netapp/nfsv3_volume_with_backup_policy/README.md create mode 100755 examples/netapp/nfsv3_volume_with_backup_policy/main.tf create mode 100755 examples/netapp/nfsv3_volume_with_backup_policy/variables.tf create mode 100644 internal/services/netapp/netapp_backup_policy_data_source.go create mode 100644 internal/services/netapp/netapp_backup_policy_data_source_test.go create mode 100644 internal/services/netapp/netapp_backup_policy_resource.go create mode 100644 internal/services/netapp/netapp_backup_policy_test.go create mode 100644 internal/services/netapp/validate/backup_policy_validation.go create mode 100644 internal/services/netapp/validate/backup_policy_validation_test.go create mode 100644 website/docs/d/netapp_backup_policy.markdown create mode 100644 website/docs/d/netapp_backup_vault.markdown create mode 100644 website/docs/r/netapp_backup_policy.markdown create mode 100644 website/docs/r/netapp_backup_vault.markdown diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/README.md b/examples/netapp/nfsv3_volume_with_backup_policy/README.md new file mode 100644 index 000000000000..c49e1248d227 --- /dev/null +++ b/examples/netapp/nfsv3_volume_with_backup_policy/README.md @@ -0,0 +1,5 @@ +## Example: Azure NetApp Files Volume with Backup Policy enabled + +This example shows how to create an Azure NetApp volume with Backup policy enabled. + +For more information, please refer to [Understand Azure NetApp Files backup](https://learn.microsoft.com/en-us/azure/azure-netapp-files/backup-introduction). diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf new file mode 100755 index 000000000000..8c83de309788 --- /dev/null +++ b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf @@ -0,0 +1,100 @@ +provider "azurerm" { + features { + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } + } +} + +resource "azurerm_resource_group" "example" { + name = "${var.prefix}-resources" + location = var.location +} + +resource "azurerm_virtual_network" "example" { + name = "${var.prefix}-virtualnetwork" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + address_space = ["10.0.0.0/16"] +} + +resource "azurerm_subnet" "example" { + name = "${var.prefix}-subnet" + resource_group_name = azurerm_resource_group.example.name + virtual_network_name = azurerm_virtual_network.example.name + address_prefixes = ["10.0.2.0/24"] + + delegation { + name = "testdelegation" + + service_delegation { + name = "Microsoft.Netapp/volumes" + actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"] + } + } +} + +resource "azurerm_netapp_account" "example" { + name = "${var.prefix}-netappaccount" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_netapp_backup_vault" "example" { + name = "${var.prefix}-netappbackupvault" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name +} + +resource "azurerm_netapp_backup_policy" "example" { + name = "${var.prefix}-netappbackuppolicy" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true +} + +resource "azurerm_netapp_pool" "example" { + name = "${var.prefix}-netapppool" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + account_name = azurerm_netapp_account.example.name + service_level = "Standard" + size_in_tb = 4 +} + +resource "azurerm_netapp_volume" "example" { + lifecycle { + prevent_destroy = true + } + + name = "${var.prefix}-netappvolume" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + account_name = azurerm_netapp_account.example.name + pool_name = azurerm_netapp_pool.example.name + volume_path = "${var.prefix}-netappvolume" + service_level = "Standard" + protocols = ["NFSv3"] + network_features = "Basic" + subnet_id = azurerm_subnet.example.id + storage_quota_in_gb = 100 + + data_protection_backup_policy { + backup_vault_id = azurerm_netapp_backup_vault.example.id + backup_policy_id = azurerm_netapp_backup_policy.example.id + policy_enforced = true + } + + export_policy_rule { + rule_index = 1 + allowed_clients = ["0.0.0.0/0"] + protocols_enabled = ["NFSv3"] + unix_read_write = true + } +} diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/variables.tf b/examples/netapp/nfsv3_volume_with_backup_policy/variables.tf new file mode 100755 index 000000000000..fe8ca460af61 --- /dev/null +++ b/examples/netapp/nfsv3_volume_with_backup_policy/variables.tf @@ -0,0 +1,7 @@ +variable "location" { + description = "The Azure location where all resources in this example should be created." +} + +variable "prefix" { + description = "The prefix used for all resources used by this example" +} diff --git a/internal/acceptance/testclient/client.go b/internal/acceptance/testclient/client.go index 133c06210e00..84367cc565f4 100644 --- a/internal/acceptance/testclient/client.go +++ b/internal/acceptance/testclient/client.go @@ -58,7 +58,7 @@ func Build() (*clients.Client, error) { EnableAuthenticatingUsingClientCertificate: true, EnableAuthenticatingUsingClientSecret: true, - EnableAuthenticatingUsingAzureCLI: true, + EnableAuthenticatingUsingAzureCLI: false, EnableAuthenticatingUsingManagedIdentity: false, EnableAuthenticationUsingOIDC: false, EnableAuthenticationUsingGitHubOIDC: false, diff --git a/internal/acceptance/testing.go b/internal/acceptance/testing.go index 1bf2208ac638..dcbd46ff2afc 100644 --- a/internal/acceptance/testing.go +++ b/internal/acceptance/testing.go @@ -17,6 +17,8 @@ import ( func PreCheck(t *testing.T) { variables := []string{ + "ARM_CLIENT_ID", + "ARM_CLIETN_SECRET", "ARM_SUBSCRIPTION_ID", "ARM_TENANT_ID", "ARM_TEST_LOCATION", @@ -24,11 +26,6 @@ func PreCheck(t *testing.T) { "ARM_TEST_LOCATION_ALT2", } - cliAuthEnabled := os.Getenv("ARM_USE_CLI") - if cliAuthEnabled == "" { - variables = append(variables, "ARM_CLIENT_ID", "ARM_CLIENT_SECRET") - } - for _, variable := range variables { value := os.Getenv(variable) if value == "" { diff --git a/internal/features/defaults.go b/internal/features/defaults.go index 12c24186eb3c..aaf9c233bfd9 100644 --- a/internal/features/defaults.go +++ b/internal/features/defaults.go @@ -75,5 +75,9 @@ func Default() UserFeatures { VMBackupStopProtectionAndRetainDataOnDestroy: false, PurgeProtectedItemsFromVaultOnDestroy: false, }, + NetApp: NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: true, + }, } } diff --git a/internal/features/user_flags.go b/internal/features/user_flags.go index 4b367743ae89..fe4657bf1d0e 100644 --- a/internal/features/user_flags.go +++ b/internal/features/user_flags.go @@ -20,6 +20,7 @@ type UserFeatures struct { PostgresqlFlexibleServer PostgresqlFlexibleServerFeatures MachineLearning MachineLearningFeatures RecoveryService RecoveryServiceFeatures + NetApp NetAppFeatures } type CognitiveAccountFeatures struct { @@ -104,3 +105,8 @@ type RecoveryServiceFeatures struct { VMBackupStopProtectionAndRetainDataOnDestroy bool PurgeProtectedItemsFromVaultOnDestroy bool } + +type NetAppFeatures struct { + DeleteBackupsOnBackupVaultDestroy bool + PreventVolumeDestruction bool +} diff --git a/internal/provider/features.go b/internal/provider/features.go index 38ef20645d16..021c83e89fd4 100644 --- a/internal/provider/features.go +++ b/internal/provider/features.go @@ -372,6 +372,28 @@ func schemaFeatures(supportLegacyTestSuite bool) *pluginsdk.Schema { }, }, }, + + "netapp": { + Type: pluginsdk.TypeList, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "delete_backups_on_backup_vault_destroy": { + Description: "When enabled, backups will be deleted when the `azurerm_netapp_backup_vault` resource is destroyed", + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + }, + "prevent_volume_destruction": { + Description: "When enabled, the volume will not be destroyed, safeguarding from severe data loss", + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + }, + }, + }, } // this is a temporary hack to enable us to gradually add provider blocks to test configurations @@ -624,5 +646,18 @@ func expandFeatures(input []interface{}) features.UserFeatures { } } + if raw, ok := val["netapp"]; ok { + items := raw.([]interface{}) + if len(items) > 0 { + netappRaw := items[0].(map[string]interface{}) + if v, ok := netappRaw["delete_backups_on_backup_vault_destroy"]; ok { + featuresMap.NetApp.DeleteBackupsOnBackupVaultDestroy = v.(bool) + } + if v, ok := netappRaw["prevent_volume_destruction"]; ok { + featuresMap.NetApp.PreventVolumeDestruction = v.(bool) + } + } + } + return featuresMap } diff --git a/internal/provider/features_test.go b/internal/provider/features_test.go index 44414fd56278..ec34fe6c831b 100644 --- a/internal/provider/features_test.go +++ b/internal/provider/features_test.go @@ -88,6 +88,10 @@ func TestExpandFeatures(t *testing.T) { VMBackupStopProtectionAndRetainDataOnDestroy: false, PurgeProtectedItemsFromVaultOnDestroy: false, }, + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: true, + }, }, }, { @@ -193,6 +197,12 @@ func TestExpandFeatures(t *testing.T) { "purge_protected_items_from_vault_on_destroy": true, }, }, + "netapp": []interface{}{ + map[string]interface{}{ + "delete_backups_on_backup_vault_destroy": true, + "prevent_volume_destruction": true, + }, + }, }, }, Expected: features.UserFeatures{ @@ -263,6 +273,10 @@ func TestExpandFeatures(t *testing.T) { VMBackupStopProtectionAndRetainDataOnDestroy: true, PurgeProtectedItemsFromVaultOnDestroy: true, }, + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: true, + PreventVolumeDestruction: true, + }, }, }, { @@ -368,6 +382,12 @@ func TestExpandFeatures(t *testing.T) { "purge_protected_items_from_vault_on_destroy": false, }, }, + "netapp": []interface{}{ + map[string]interface{}{ + "delete_backups_on_backup_vault_destroy": false, + "prevent_volume_destruction": false, + }, + }, }, }, Expected: features.UserFeatures{ @@ -438,6 +458,10 @@ func TestExpandFeatures(t *testing.T) { VMBackupStopProtectionAndRetainDataOnDestroy: false, PurgeProtectedItemsFromVaultOnDestroy: false, }, + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: false, + }, }, }, } @@ -1678,3 +1702,92 @@ func TestExpandFeaturesRecoveryService(t *testing.T) { } } } + +func TestExpandFeaturesNetApp(t *testing.T) { + testData := []struct { + Name string + Input []interface{} + EnvVars map[string]interface{} + Expected features.UserFeatures + }{ + { + Name: "Empty Block", + Input: []interface{}{ + map[string]interface{}{ + "netapp": []interface{}{}, + }, + }, + Expected: features.UserFeatures{ + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: true, + }, + }, + }, + { + Name: "NetApp Features Enabled", + Input: []interface{}{ + map[string]interface{}{ + "netapp": []interface{}{ + map[string]interface{}{ + "delete_backups_on_backup_vault_destroy": true, + "prevent_volume_destruction": true, + }, + }, + }, + }, + Expected: features.UserFeatures{ + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: true, + }, + }, + }, + { + Name: "NetApp Features Disabled", + Input: []interface{}{ + map[string]interface{}{ + "netapp": []interface{}{ + map[string]interface{}{ + "delete_backups_on_backup_vault_destroy": false, + "prevent_volume_destruction": false, + }, + }, + }, + }, + Expected: features.UserFeatures{ + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: false, + PreventVolumeDestruction: false, + }, + }, + }, + { + Name: "NetApp Features Reverse Default Values", + Input: []interface{}{ + map[string]interface{}{ + "netapp": []interface{}{ + map[string]interface{}{ + "delete_backups_on_backup_vault_destroy": true, + "prevent_volume_destruction": false, + }, + }, + }, + }, + Expected: features.UserFeatures{ + NetApp: features.NetAppFeatures{ + DeleteBackupsOnBackupVaultDestroy: true, + PreventVolumeDestruction: false, + }, + }, + }, + } + + for _, testCase := range testData { + t.Logf("[DEBUG] Test Case: %q", testCase.Name) + result := expandFeatures(testCase.Input) + if !reflect.DeepEqual(result.Subscription, testCase.Expected.Subscription) { + t.Fatalf("Expected %+v but got %+v", result.Subscription, testCase.Expected.Subscription) + } + } +} diff --git a/internal/services/netapp/client/client.go b/internal/services/netapp/client/client.go index e39808b0d96b..e1e4482fac20 100644 --- a/internal/services/netapp/client/client.go +++ b/internal/services/netapp/client/client.go @@ -6,15 +6,17 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) @@ -28,6 +30,8 @@ type Client struct { SnapshotClient *snapshots.SnapshotsClient SnapshotPoliciesClient *snapshotpolicy.SnapshotPolicyClient BackupVaultsClient *backupvaults.BackupVaultsClient + BackupPolicyClient *backuppolicy.BackupPolicyClient + BackupClient *backups.BackupsClient } func NewClient(o *common.ClientOptions) (*Client, error) { @@ -85,6 +89,18 @@ func NewClient(o *common.ClientOptions) (*Client, error) { return nil, fmt.Errorf("building BackupVaultsClient client: %+v", err) } + backupPolicyClient, err := backuppolicy.NewBackupPolicyClientWithBaseURI(o.Environment.ResourceManager) + o.Configure(backupPolicyClient.Client, o.Authorizers.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building BackupPoliciesClient client: %+v", err) + } + + backupClient, err := backups.NewBackupsClientWithBaseURI(o.Environment.ResourceManager) + o.Configure(backupClient.Client, o.Authorizers.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building BackupClient client: %+v", err) + } + return &Client{ AccountClient: accountClient, PoolClient: poolClient, @@ -95,5 +111,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) { SnapshotClient: snapshotClient, SnapshotPoliciesClient: snapshotPoliciesClient, BackupVaultsClient: backupVaultsClient, + BackupPolicyClient: backupPolicyClient, + BackupClient: backupClient, }, nil } diff --git a/internal/services/netapp/models/models.go b/internal/services/netapp/models/models.go index b7eb4b33d05f..8637074b2efb 100644 --- a/internal/services/netapp/models/models.go +++ b/internal/services/netapp/models/models.go @@ -124,3 +124,15 @@ type NetAppBackupVaultModel struct { AccountName string `tfschema:"account_name"` Tags map[string]string `tfschema:"tags"` } + +type NetAppBackupPolicyModel struct { + Name string `tfschema:"name"` + ResourceGroupName string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + AccountName string `tfschema:"account_name"` + Tags map[string]string `tfschema:"tags"` + DailyBackupsToKeep int64 `tfschema:"daily_backups_to_keep"` + WeeklyBackupsToKeep int64 `tfschema:"weekly_backups_to_keep"` + MonthlyBackupsToKeep int64 `tfschema:"monthly_backups_to_keep"` + Enabled bool `tfschema:"enabled"` +} diff --git a/internal/services/netapp/netapp_account_data_source.go b/internal/services/netapp/netapp_account_data_source.go index aab79179622b..af4cd6adde89 100644 --- a/internal/services/netapp/netapp_account_data_source.go +++ b/internal/services/netapp/netapp_account_data_source.go @@ -12,7 +12,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/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_account_encryption_data_source.go b/internal/services/netapp/netapp_account_encryption_data_source.go index 75ffb0ab1e59..c3fc47c34ba5 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source.go +++ b/internal/services/netapp/netapp_account_encryption_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" diff --git a/internal/services/netapp/netapp_account_encryption_resource.go b/internal/services/netapp/netapp_account_encryption_resource.go index 94a5164106e0..17c21180ff56 100644 --- a/internal/services/netapp/netapp_account_encryption_resource.go +++ b/internal/services/netapp/netapp_account_encryption_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" @@ -328,7 +328,7 @@ func expandEncryption(ctx context.Context, input string, keyVaultsClient *keyVau KeyVaultProperties: &netappaccounts.KeyVaultProperties{ KeyName: keyId.Name, KeyVaultUri: keyId.KeyVaultBaseUrl, - KeyVaultResourceId: parsedKeyVaultID.ID(), + KeyVaultResourceId: pointer.To(parsedKeyVaultID.ID()), }, } diff --git a/internal/services/netapp/netapp_account_encryption_resource_test.go b/internal/services/netapp/netapp_account_encryption_resource_test.go index bce3ec3d544a..0fa754abc395 100644 --- a/internal/services/netapp/netapp_account_encryption_resource_test.go +++ b/internal/services/netapp/netapp_account_encryption_resource_test.go @@ -10,7 +10,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_account_resource.go b/internal/services/netapp/netapp_account_resource.go index 86a007dcbbc9..20e0b6969c2a 100644 --- a/internal/services/netapp/netapp_account_resource.go +++ b/internal/services/netapp/netapp_account_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/netapp/netapp_account_resource_test.go b/internal/services/netapp/netapp_account_resource_test.go index ad7021c9cab3..3e0a76d86c04 100644 --- a/internal/services/netapp/netapp_account_resource_test.go +++ b/internal/services/netapp/netapp_account_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" "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/netapp/netapp_backup_policy_data_source.go b/internal/services/netapp/netapp_backup_policy_data_source.go new file mode 100644 index 000000000000..e99cf07ec665 --- /dev/null +++ b/internal/services/netapp/netapp_backup_policy_data_source.go @@ -0,0 +1,120 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type NetAppBackupPolicyDataSource struct{} + +var _ sdk.DataSource = NetAppBackupPolicyDataSource{} + +func (r NetAppBackupPolicyDataSource) ResourceType() string { + return "azurerm_netapp_backup_policy" +} + +func (r NetAppBackupPolicyDataSource) ModelObject() interface{} { + return &netAppModels.NetAppBackupVaultModel{} +} + +func (r NetAppBackupPolicyDataSource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return backuppolicy.ValidateBackupPolicyID +} + +func (r NetAppBackupPolicyDataSource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "account_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + } +} + +func (r NetAppBackupPolicyDataSource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "location": commonschema.LocationComputed(), + + "tags": commonschema.TagsDataSource(), + + "daily_backups_to_keep": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "weekly_backups_to_keep": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "monthly_backups_to_keep": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + } +} + +func (r NetAppBackupPolicyDataSource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.BackupPolicyClient + + var state netAppModels.NetAppBackupPolicyModel + if err := metadata.Decode(&state); err != nil { + return err + } + + backupPolicyID := backuppolicy.NewBackupPolicyID(metadata.Client.Account.SubscriptionId, state.ResourceGroupName, state.AccountName, state.Name) + + existing, err := client.BackupPoliciesGet(ctx, backupPolicyID) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(backupPolicyID) + } + return fmt.Errorf("retrieving %s: %v", backupPolicyID, err) + } + + model := existing.Model + if model == nil { + return fmt.Errorf("retrieving %s: model was nil", backupPolicyID) + } + + state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Tags = pointer.From(model.Tags) + state.DailyBackupsToKeep = pointer.From(model.Properties.DailyBackupsToKeep) + state.WeeklyBackupsToKeep = pointer.From(model.Properties.WeeklyBackupsToKeep) + state.MonthlyBackupsToKeep = pointer.From(model.Properties.MonthlyBackupsToKeep) + state.Enabled = pointer.From(model.Properties.Enabled) + + metadata.SetID(backupPolicyID) + + return metadata.Encode(&state) + }, + } +} diff --git a/internal/services/netapp/netapp_backup_policy_data_source_test.go b/internal/services/netapp/netapp_backup_policy_data_source_test.go new file mode 100644 index 000000000000..4f2e2e71ffc3 --- /dev/null +++ b/internal/services/netapp/netapp_backup_policy_data_source_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type NetAppBackupPolicyDataSource struct{} + +func TestAccNetAppBackupPolicyDataSource_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_netapp_backup_policy", "test") + d := NetAppBackupPolicyDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: d.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + ), + }, + }) +} + +func (d NetAppBackupPolicyDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_netapp_backup_policy" "test" { + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + name = azurerm_netapp_backup_policy.test.name +} +`, NetAppBackupPolicyResource{}.basic(data)) +} diff --git a/internal/services/netapp/netapp_backup_policy_resource.go b/internal/services/netapp/netapp_backup_policy_resource.go new file mode 100644 index 000000000000..ccc386174df3 --- /dev/null +++ b/internal/services/netapp/netapp_backup_policy_resource.go @@ -0,0 +1,331 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp + +import ( + "context" + "fmt" + "net/http" + "strconv" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" + "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" + netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" +) + +type NetAppBackupPolicyResource struct{} + +var _ sdk.Resource = NetAppBackupPolicyResource{} + +func (r NetAppBackupPolicyResource) ModelObject() interface{} { + return &netAppModels.NetAppBackupPolicyModel{} +} + +func (r NetAppBackupPolicyResource) ResourceType() string { + return "azurerm_netapp_backup_policy" +} + +func (r NetAppBackupPolicyResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return backuppolicy.ValidateBackupPolicyID +} + +func (r NetAppBackupPolicyResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: netAppValidate.VolumeQuotaRuleName, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "account_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: netAppValidate.AccountName, + }, + + "tags": commonschema.Tags(), + + "daily_backups_to_keep": { + Type: pluginsdk.TypeInt, + Default: 2, + Optional: true, + ValidateFunc: validation.IntBetween(2, 1019), + }, + + "weekly_backups_to_keep": { + Type: pluginsdk.TypeInt, + Default: 1, + Optional: true, + ValidateFunc: validation.IntBetween(1, 1019), + }, + + "monthly_backups_to_keep": { + Type: pluginsdk.TypeInt, + Default: 1, + Optional: true, + ValidateFunc: validation.IntBetween(1, 1019), + }, + + "enabled": { + Type: pluginsdk.TypeBool, + Default: true, + Optional: true, + }, + } +} + +func (r NetAppBackupPolicyResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r NetAppBackupPolicyResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 90 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.NetApp.BackupPolicyClient + subscriptionId := metadata.Client.Account.SubscriptionId + + var model netAppModels.NetAppBackupPolicyModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + id := backuppolicy.NewBackupPolicyID(subscriptionId, model.ResourceGroupName, model.AccountName, model.Name) + + // Validations + if errorList := netAppValidate.ValidateNetAppBackupPolicyCombinedRetention(model.DailyBackupsToKeep, model.WeeklyBackupsToKeep, model.MonthlyBackupsToKeep); len(errorList) > 0 { + return fmt.Errorf("one or more issues found while performing deeper validations for %s:\n%+v", id, errorList) + } + + metadata.Logger.Infof("Import check for %s", id) + existing, err := client.BackupPoliciesGet(ctx, id) + if err != nil { + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %s", id, err) + } + } + + if !response.WasNotFound(existing.HttpResponse) { + return tf.ImportAsExistsError(r.ResourceType(), id.ID()) + } + + parameters := backuppolicy.BackupPolicy{ + Location: location.Normalize(model.Location), + Tags: pointer.To(model.Tags), + Properties: backuppolicy.BackupPolicyProperties{ + DailyBackupsToKeep: pointer.To(model.DailyBackupsToKeep), + WeeklyBackupsToKeep: pointer.To(model.WeeklyBackupsToKeep), + MonthlyBackupsToKeep: pointer.To(model.MonthlyBackupsToKeep), + Enabled: pointer.To(model.Enabled), + }, + } + + err = client.BackupPoliciesCreateThenPoll(ctx, id, parameters) + if err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + + return nil + }, + } +} + +func (r NetAppBackupPolicyResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 120 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.NetApp.BackupPolicyClient + + id, err := backuppolicy.ParseBackupPolicyID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("Decoding state for %s", id) + var state netAppModels.NetAppBackupPolicyModel + if err := metadata.Decode(&state); err != nil { + return err + } + + var shouldUpdate = false + + update := backuppolicy.BackupPolicyPatch{ + Properties: &backuppolicy.BackupPolicyProperties{}, + } + + // Checking properties with changes + if metadata.ResourceData.HasChange("tags") { + update.Tags = pointer.To(state.Tags) + shouldUpdate = true + } + + if metadata.ResourceData.HasChange("daily_backups_to_keep") { + update.Properties.DailyBackupsToKeep = pointer.To(state.DailyBackupsToKeep) + shouldUpdate = true + } + + if metadata.ResourceData.HasChange("weekly_backups_to_keep") { + update.Properties.WeeklyBackupsToKeep = pointer.To(state.WeeklyBackupsToKeep) + shouldUpdate = true + } + + if metadata.ResourceData.HasChange("monthly_backups_to_keep") { + update.Properties.MonthlyBackupsToKeep = pointer.To(state.MonthlyBackupsToKeep) + shouldUpdate = true + } + + if metadata.ResourceData.HasChange("enabled") { + update.Properties.Enabled = pointer.To(state.Enabled) + shouldUpdate = true + } + + if shouldUpdate { + metadata.Logger.Infof("Updating %s", id) + + if err := client.BackupPoliciesUpdateThenPoll(ctx, pointer.From(id), update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + metadata.SetID(id) + } + + return nil + }, + } +} + +func (r NetAppBackupPolicyResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.BackupPolicyClient + + id, err := backuppolicy.ParseBackupPolicyID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("Decoding state for %s", id) + var state netAppModels.NetAppBackupPolicyModel + if err := metadata.Decode(&state); err != nil { + return err + } + + existing, err := client.BackupPoliciesGet(ctx, pointer.From(id)) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(id) + } + return fmt.Errorf("retrieving %s: %v", id, err) + } + + if model := existing.Model; model != nil { + state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Tags = pointer.From(model.Tags) + state.AccountName = id.NetAppAccountName + state.Name = id.BackupPolicyName + state.ResourceGroupName = id.ResourceGroupName + + state.DailyBackupsToKeep = pointer.From(model.Properties.DailyBackupsToKeep) + state.WeeklyBackupsToKeep = pointer.From(model.Properties.WeeklyBackupsToKeep) + state.MonthlyBackupsToKeep = pointer.From(model.Properties.MonthlyBackupsToKeep) + state.Enabled = pointer.From(model.Properties.Enabled) + } + + metadata.SetID(id) + + return metadata.Encode(&state) + }, + } +} + +func (r NetAppBackupPolicyResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 120 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + + client := metadata.Client.NetApp.BackupPolicyClient + + id, err := backuppolicy.ParseBackupPolicyID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + existing, err := client.BackupPoliciesGet(ctx, pointer.From(id)) + if err != nil { + if existing.HttpResponse.StatusCode == http.StatusNotFound { + return metadata.MarkAsGone(id) + } + return fmt.Errorf("retrieving %s: %v", id, err) + } + + if err = client.BackupPoliciesDeleteThenPoll(ctx, pointer.From(id)); err != nil { + return fmt.Errorf("deleting %s: %+v", pointer.From(id), err) + } + + if err = waitForBackupPolicyDeletion(ctx, client, *id); err != nil { + return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) + } + + return nil + }, + } +} + +func waitForBackupPolicyDeletion(ctx context.Context, client *backuppolicy.BackupPolicyClient, id backuppolicy.BackupPolicyId) error { + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal-error: context had no deadline") + } + stateConf := &pluginsdk.StateChangeConf{ + ContinuousTargetOccurence: 5, + Delay: 5 * time.Second, + MinTimeout: 5 * time.Second, + Pending: []string{"200", "202"}, + Target: []string{"204", "404"}, + Refresh: netappBackupPolicyStateRefreshFunc(ctx, client, id), + Timeout: time.Until(deadline), + } + + if _, err := stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for %s to be deleted: %+v", id, err) + } + + return nil +} + +func netappBackupPolicyStateRefreshFunc(ctx context.Context, client *backuppolicy.BackupPolicyClient, id backuppolicy.BackupPolicyId) pluginsdk.StateRefreshFunc { + return func() (interface{}, string, error) { + res, err := client.BackupPoliciesGet(ctx, id) + if err != nil { + if !response.WasNotFound(res.HttpResponse) { + return nil, "", fmt.Errorf("retrieving %s: %s", id, err) + } + } + + statusCode := "dropped connection" + if res.HttpResponse != nil { + statusCode = strconv.Itoa(res.HttpResponse.StatusCode) + } + return res, statusCode, nil + } +} diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go new file mode 100644 index 000000000000..fdc32a8d83e0 --- /dev/null +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -0,0 +1,163 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package netapp_test + +import ( + "context" + "fmt" + "net/http" + "testing" + + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "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" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type NetAppBackupPolicyResource struct{} + +func (t NetAppBackupPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { + id, err := backuppolicy.ParseBackupPolicyID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.NetApp.BackupPolicyClient.BackupPoliciesGet(ctx, *id) + + if err != nil { + if resp.HttpResponse.StatusCode == http.StatusNotFound { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", id, err) + } + + return utils.Bool(true), nil +} + +func TestAccNetAppBackupPolicy_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_backup_policy", "test") + r := NetAppBackupPolicyResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccNetAppBackupPolicy_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_backup_policy", "test") + r := NetAppBackupPolicyResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), + check.That(data.ResourceName).Key("enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.update(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("2"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("10"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("10"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("10"), + check.That(data.ResourceName).Key("enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func (r NetAppBackupPolicyResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +resource "azurerm_netapp_backup_policy" "test" { + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true + + tags = { + "testTag" = "testTagValue" + } +} +`, r.template(data), data.RandomInteger) +} + +func (r NetAppBackupPolicyResource) update(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + +resource "azurerm_netapp_backup_policy" "test" { + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + daily_backups_to_keep = 10 + weekly_backups_to_keep = 10 + monthly_backups_to_keep = 10 + enabled = false + + tags = { + "testTag" = "testTagValue", + "FoO" = "BaR" + } +} +`, r.template(data), data.RandomInteger) +} + +func (NetAppBackupPolicyResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-netapp-%[1]d" + location = "%[2]s" + + tags = { + "SkipNRMSNSG" = "true" + } +} + +resource "azurerm_netapp_account" "test" { + name = "acctest-NetAppAccount-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + tags = { + "CreatedOnDate" = "2023-08-17T08:01:00Z", + "SkipASMAzSecPack" = "true" + } +} + +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/internal/services/netapp/netapp_backup_vault_data_source.go b/internal/services/netapp/netapp_backup_vault_data_source.go index 9a42daefbe13..8cd7c8796a28 100644 --- a/internal/services/netapp/netapp_backup_vault_data_source.go +++ b/internal/services/netapp/netapp_backup_vault_data_source.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_backup_vault_data_source_test.go b/internal/services/netapp/netapp_backup_vault_data_source_test.go index 72b12279713c..9ba0d9d61cb3 100644 --- a/internal/services/netapp/netapp_backup_vault_data_source_test.go +++ b/internal/services/netapp/netapp_backup_vault_data_source_test.go @@ -19,7 +19,6 @@ func TestAccNetAppBackupVaultDataSource_basic(t *testing.T) { data.DataSourceTest(t, []acceptance.TestStep{ { - //Config: d.basicDataSource(data), Config: d.basic(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("name").Exists(), diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 34f18ee58614..914bd2cd4b78 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -8,13 +8,15 @@ import ( "fmt" "net/http" "strconv" + "strings" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" @@ -186,74 +188,192 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { } } +func waitForBackupDeletion(ctx context.Context, client *backups.BackupsClient, id backups.BackupId) error { + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal-error: context had no deadline") + } + stateConf := &pluginsdk.StateChangeConf{ + ContinuousTargetOccurence: 5, + Delay: 5 * time.Second, + MinTimeout: 5 * time.Second, + Pending: []string{"200", "202"}, + Target: []string{"404"}, + Refresh: netappBackupStateRefreshFunc(ctx, client, id), + Timeout: time.Until(deadline), + } + + if _, err := stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for %s to be deleted: %+v", id, err) + } + + return nil +} + +func netappBackupStateRefreshFunc(ctx context.Context, client *backups.BackupsClient, id backups.BackupId) pluginsdk.StateRefreshFunc { + return func() (interface{}, string, error) { + res, err := client.Get(ctx, id) + if err != nil { + if !response.WasNotFound(res.HttpResponse) { + return nil, "", fmt.Errorf("retrieving %s: %s", id, err) + } + } + + statusCode := "dropped connection" + if res.HttpResponse != nil { + statusCode = strconv.Itoa(res.HttpResponse.StatusCode) + } + + return res, statusCode, nil + } +} + func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 120 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - - client := metadata.Client.NetApp.BackupVaultsClient + vaultClient := metadata.Client.NetApp.BackupVaultsClient + backupClient := metadata.Client.NetApp.BackupClient id, err := backupvaults.ParseBackupVaultID(metadata.ResourceData.Id()) if err != nil { return err } - existing, err := client.Get(ctx, pointer.From(id)) - if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { - return metadata.MarkAsGone(id) + // Attempt to delete backup vault with retries + for retries := 0; retries < 5; retries++ { + // Delete backups + if err := deleteBackupsFromVault(ctx, id, backupClient, metadata.Client.Features.NetApp.DeleteBackupsOnBackupVaultDestroy); err != nil { + return err } - return fmt.Errorf("retrieving %s: %v", id, err) - } - if err = client.DeleteThenPoll(ctx, pointer.From(id)); err != nil { - return fmt.Errorf("deleting %s: %+v", pointer.From(id), err) - } + // DeleteThenPoll cannot be used due to potential racing condition where backup actually started when volume got deleted but it takes time for it to show up within the vault + // This will be handled by waitForBackupVaultDeletion and operation will be retried if needed + if _, err := vaultClient.Delete(ctx, pointer.From(id)); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + // Wait for deletion to complete + err = waitForBackupVaultDeletion(ctx, vaultClient, backupClient, pointer.From(id)) + if err == nil { + return nil // Successful deletion + } - if err = waitForBackupVaultDeletion(ctx, client, *id); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) + if strings.Contains(err.Error(), "backups found on vault") { + // Backup may not be showing up in the vault yet through a GET, wait for a bit before retrying + time.Sleep(30 * time.Second) + continue + } + + return err // If it's a different error, return it immediately } - return nil + return fmt.Errorf("failed to delete backup vault after 5 attempts") }, } } -func waitForBackupVaultDeletion(ctx context.Context, client *backupvaults.BackupVaultsClient, id backupvaults.BackupVaultId) error { +func waitForBackupVaultDeletion(ctx context.Context, vaultClient *backupvaults.BackupVaultsClient, backupClient *backups.BackupsClient, id backupvaults.BackupVaultId) error { deadline, ok := ctx.Deadline() if !ok { return fmt.Errorf("internal-error: context had no deadline") } stateConf := &pluginsdk.StateChangeConf{ ContinuousTargetOccurence: 5, - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, + Delay: 10 * time.Second, + MinTimeout: 10 * time.Second, Pending: []string{"200", "202"}, - Target: []string{"204", "404"}, - Refresh: netappbBackupVaultStateRefreshFunc(ctx, client, id), + Target: []string{"404"}, + Refresh: netappBackupVaultStateRefreshFunc(ctx, vaultClient, backupClient, id), Timeout: time.Until(deadline), } - if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for %s to be deleted: %+v", id, err) + _, err := stateConf.WaitForStateContext(ctx) + if err != nil { + return fmt.Errorf("waiting for deletion of %s: %w", id, err) } return nil } -func netappbBackupVaultStateRefreshFunc(ctx context.Context, client *backupvaults.BackupVaultsClient, id backupvaults.BackupVaultId) pluginsdk.StateRefreshFunc { +func netappBackupVaultStateRefreshFunc(ctx context.Context, vaultClient *backupvaults.BackupVaultsClient, backupClient *backups.BackupsClient, id backupvaults.BackupVaultId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { - res, err := client.Get(ctx, id) + res, err := vaultClient.Get(ctx, id) if err != nil { - if !response.WasNotFound(res.HttpResponse) { - return nil, "", fmt.Errorf("retrieving %s: %s", id, err) + if response.WasNotFound(res.HttpResponse) { + return res, strconv.Itoa(res.HttpResponse.StatusCode), nil } + return nil, "", fmt.Errorf("retrieving %s: %s", id, err) } - statusCode := "dropped connection" - if res.HttpResponse != nil { - statusCode = strconv.Itoa(res.HttpResponse.StatusCode) + // Handling a race condition where backup actually started when volume got deleted but it takes time for it to show up within the vault + // vault deletion process will hang until the deadline is reached and never retry to delete the backup preventing vault to be deleted. + // For this to work, need to scrub activity logs to see if there was a failed deletion operation due to backup just showing up in the vault + // midway after the vault deletion process started. + backupVaultID := backups.NewBackupVaultID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName) + backupList, err := backupClient.ListByVault(ctx, backupVaultID, backups.ListByVaultOperationOptions{}) + if err != nil { + return nil, "", fmt.Errorf("listing backups from vault %s: %w", id.ID(), err) } - return res, statusCode, nil + + if backupList.Model != nil || len(pointer.From(backupList.Model)) > 0 { + return nil, "409", fmt.Errorf("backups found on vault %s, forcing retry", id.ID()) // Forcing vault deletion to retry + } + + return res, strconv.Itoa(res.HttpResponse.StatusCode), nil + } +} + +func deleteBackupsFromVault(ctx context.Context, id *backupvaults.BackupVaultId, backupClient *backups.BackupsClient, shouldDestroyBackups bool) error { + for { + backupVaultID := backups.NewBackupVaultID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName) + backupList, err := backupClient.ListByVault(ctx, backupVaultID, backups.ListByVaultOperationOptions{}) + if err != nil { + return fmt.Errorf("listing backups from vault %s: %w", id.ID(), err) + } + + if backupList.Model == nil || len(pointer.From(backupList.Model)) == 0 { + return nil // No more backups to delete + } + + for _, backup := range pointer.From(backupList.Model) { + if backup.Name == nil { + continue + } + + if shouldDestroyBackups { + backupID, err := backups.ParseBackupID(pointer.From(backup.Id)) + if err != nil { + return fmt.Errorf("parsing backup ID %s: %w", pointer.From(backup.Id), err) + } + + if err := retryBackupDelete(ctx, backupClient, pointer.From(backupID), 120, 30); err != nil { + return fmt.Errorf("failed to delete backup %s: %w", backupID.ID(), err) + } + } else { + return fmt.Errorf("cannot delete backups from backup vault due to missing DeleteBackupsOnBackupVaultDestroy feature set as true, backup vault id %s, DeleteBackupsOnBackupVaultDestroy setting is: %t", id.ID(), shouldDestroyBackups) + } + } + + time.Sleep(10 * time.Second) } } + +func retryBackupDelete(ctx context.Context, client *backups.BackupsClient, id backups.BackupId, retryAttempts, retryIntervalSec int) error { + var lastErr error + for attempt := 0; attempt < retryAttempts; attempt++ { + if err := client.DeleteThenPoll(ctx, id); err == nil { + if err := waitForBackupDeletion(ctx, client, id); err != nil { + return fmt.Errorf("waiting for deletion of %s: %w", id.ID(), err) + } + return nil + } else if strings.Contains(err.Error(), "Please retry after backup transfer is complete") { + lastErr = err + time.Sleep(time.Duration(retryIntervalSec) * time.Second) + } else { + return fmt.Errorf("deleting backup %s: %+v", id.ID(), err) + } + } + + return fmt.Errorf("failed to delete backup after %d attempts: %v", retryAttempts, lastErr) +} diff --git a/internal/services/netapp/netapp_backup_vault_test.go b/internal/services/netapp/netapp_backup_vault_test.go index 02322443823a..de062666f548 100644 --- a/internal/services/netapp/netapp_backup_vault_test.go +++ b/internal/services/netapp/netapp_backup_vault_test.go @@ -9,7 +9,7 @@ import ( "net/http" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" @@ -119,6 +119,9 @@ provider "azurerm" { resource_group { prevent_deletion_if_contains_resources = false } + netapp { + delete_backups_on_backup_vault_destroy = true + } } } diff --git a/internal/services/netapp/netapp_pool_data_source.go b/internal/services/netapp/netapp_pool_data_source.go index 14ccc2ab245a..3451735b1d33 100644 --- a/internal/services/netapp/netapp_pool_data_source.go +++ b/internal/services/netapp/netapp_pool_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_pool_resource.go b/internal/services/netapp/netapp_pool_resource.go index f6f6ec4588ab..fc2a52382d87 100644 --- a/internal/services/netapp/netapp_pool_resource.go +++ b/internal/services/netapp/netapp_pool_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_pool_resource_test.go b/internal/services/netapp/netapp_pool_resource_test.go index 4eed7029b2ff..2afc819cac93 100644 --- a/internal/services/netapp/netapp_pool_resource_test.go +++ b/internal/services/netapp/netapp_pool_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" "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/netapp/netapp_snapshot_data_source.go b/internal/services/netapp/netapp_snapshot_data_source.go index 500c1dde2ecf..cb38e1bfdde9 100644 --- a/internal/services/netapp/netapp_snapshot_data_source.go +++ b/internal/services/netapp/netapp_snapshot_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_snapshot_policy_data_source.go b/internal/services/netapp/netapp_snapshot_policy_data_source.go index 01ab829788be..0cdff64dc7d7 100644 --- a/internal/services/netapp/netapp_snapshot_policy_data_source.go +++ b/internal/services/netapp/netapp_snapshot_policy_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" diff --git a/internal/services/netapp/netapp_snapshot_policy_resource.go b/internal/services/netapp/netapp_snapshot_policy_resource.go index 45c084ca9ed4..2786529a6f58 100644 --- a/internal/services/netapp/netapp_snapshot_policy_resource.go +++ b/internal/services/netapp/netapp_snapshot_policy_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_snapshot_policy_resource_test.go b/internal/services/netapp/netapp_snapshot_policy_resource_test.go index 569c4d047185..0e0a9d878ecb 100644 --- a/internal/services/netapp/netapp_snapshot_policy_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_policy_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy" "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/netapp/netapp_snapshot_resource.go b/internal/services/netapp/netapp_snapshot_resource.go index 407cd898e9a2..cf729cc41f91 100644 --- a/internal/services/netapp/netapp_snapshot_resource.go +++ b/internal/services/netapp/netapp_snapshot_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/netapp/2023-11-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/netapp/netapp_snapshot_resource_test.go b/internal/services/netapp/netapp_snapshot_resource_test.go index a7dc18b85faf..a0cb68e5850e 100644 --- a/internal/services/netapp/netapp_snapshot_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" "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/netapp/netapp_volume_data_source.go b/internal/services/netapp/netapp_volume_data_source.go index ab5d74148907..50a97f2641c4 100644 --- a/internal/services/netapp/netapp_volume_data_source.go +++ b/internal/services/netapp/netapp_volume_data_source.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-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -121,6 +121,29 @@ func dataSourceNetAppVolume() *pluginsdk.Resource { }, }, + "data_protection_backup_policy": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "backup_policy_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "policy_enforced": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + + "backup_vault_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + "encryption_key_source": { Type: pluginsdk.TypeString, Computed: true, @@ -212,6 +235,9 @@ func dataSourceNetAppVolumeRead(d *pluginsdk.ResourceData, meta interface{}) err if err := d.Set("data_protection_replication", flattenNetAppVolumeDataProtectionReplication(props.DataProtection)); err != nil { return fmt.Errorf("setting `data_protection_replication`: %+v", err) } + if err := d.Set("data_protection_backup_policy", flattenNetAppVolumeDataProtectionBackupPolicy(props.DataProtection)); err != nil { + return fmt.Errorf("setting `data_protection_backup_policy`: %+v", err) + } } return nil diff --git a/internal/services/netapp/netapp_volume_data_source_test.go b/internal/services/netapp/netapp_volume_data_source_test.go index 9319ae4230a5..52cea289455a 100644 --- a/internal/services/netapp/netapp_volume_data_source_test.go +++ b/internal/services/netapp/netapp_volume_data_source_test.go @@ -34,6 +34,20 @@ func TestAccDataSourceNetAppVolume_basic(t *testing.T) { }) } +func TestAccDataSourceNetAppVolume_backupPolicy(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_netapp_volume", "test") + r := NetAppVolumeDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.backupPolicy(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("data_protection_backup_policy.#").HasValue("1"), + ), + }, + }) +} + func (NetAppVolumeDataSource) basic(data acceptance.TestData) string { return fmt.Sprintf(` %s @@ -55,3 +69,25 @@ data "azurerm_netapp_volume" "test" { } `, NetAppVolumeResource{}.basic(data)) } + +func (NetAppVolumeDataSource) backupPolicy(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + alias = "all" + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +data "azurerm_netapp_volume" "test" { + resource_group_name = azurerm_netapp_volume.test.resource_group_name + account_name = azurerm_netapp_volume.test.account_name + pool_name = azurerm_netapp_volume.test.pool_name + name = azurerm_netapp_volume.test.name +} +`, NetAppVolumeResource{}.backupPolicy(data)) +} diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go index 8237e2660439..45f84465a7f4 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.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-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go index 95d6ef98959e..0b8a41f77b0d 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go @@ -15,10 +15,10 @@ 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/netapp/2023-11-01/capacitypools" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go index 0cc5d0966e3b..d47ae3812905 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 0e2cddae3a6f..583c024b2292 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -13,9 +13,10 @@ 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/netapp/2023-11-01/volumegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -273,6 +274,58 @@ func expandNetAppVolumeDataProtectionSnapshotPolicyPatch(input []interface{}) *v } } +func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes.VolumePropertiesDataProtection { + if len(input) == 0 { + return &volumes.VolumePropertiesDataProtection{} + } + + backupPolicyObject := volumes.VolumeBackupProperties{} + + backupRaw := input[0].(map[string]interface{}) + + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } + + if v, ok := backupRaw["policy_enforced"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } + + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) + } + + return &volumes.VolumePropertiesDataProtection{ + Backup: &backupPolicyObject, + } +} + +func expandNetAppVolumeDataProtectionBackupPolicyPatch(input []interface{}) *volumes.VolumePatchPropertiesDataProtection { + if len(input) == 0 { + return &volumes.VolumePatchPropertiesDataProtection{} + } + + backupPolicyObject := volumes.VolumeBackupProperties{} + + backupRaw := input[0].(map[string]interface{}) + + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } + + if v, ok := backupRaw["policy_enforced"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } + + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) + } + + return &volumes.VolumePatchPropertiesDataProtection{ + Backup: &backupPolicyObject, + } +} + func flattenNetAppVolumeGroupVolumes(ctx context.Context, input *[]volumegroups.VolumeGroupVolumeProperties, metadata sdk.ResourceMetaData) ([]netAppModels.NetAppVolumeGroupVolume, error) { results := make([]netAppModels.NetAppVolumeGroupVolume, 0) @@ -493,7 +546,7 @@ func deleteVolume(ctx context.Context, metadata sdk.ResourceMetaData, volumeId s } } - // Deleting volume and waiting for it fo fully complete the operation + // Deleting volume and waiting for it to fully complete the operation if err = client.DeleteThenPoll(ctx, pointer.From(id), volumes.DeleteOperationOptions{ ForceDelete: utils.Bool(true), }); err != nil { @@ -640,6 +693,28 @@ func waitForVolumeDeletion(ctx context.Context, client *volumes.VolumesClient, i return nil } +func waitForBackupRelationshipStateForDeletion(ctx context.Context, client *backups.BackupsClient, id backups.VolumeId) error { + deadline, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal-error: context had no deadline") + } + stateConf := &pluginsdk.StateChangeConf{ + ContinuousTargetOccurence: 5, + Delay: 10 * time.Second, + MinTimeout: 10 * time.Second, + Pending: []string{"200"}, // 200 means not in the state we need for backup + Target: []string{"204"}, // 204 means backup is in a state that need (! transitioning) + Refresh: netappVolumeBackupRelationshipStateForDeletionRefreshFunc(ctx, client, id), + Timeout: time.Until(deadline), + } + + if _, err := stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for %s to not be in the transferring state", id) + } + + return nil +} + func netappVolumeStateRefreshFunc(ctx context.Context, client *volumes.VolumesClient, id volumes.VolumeId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { res, err := client.Get(ctx, id) @@ -703,6 +778,25 @@ func netappVolumeReplicationMirrorStateRefreshFunc(ctx context.Context, client * } } +func netappVolumeBackupRelationshipStateForDeletionRefreshFunc(ctx context.Context, client *backups.BackupsClient, id backups.VolumeId) pluginsdk.StateRefreshFunc { + return func() (interface{}, string, error) { + res, err := client.GetLatestStatus(ctx, id) + if err != nil { + if !response.WasNotFound(res.HttpResponse) { + return nil, "", fmt.Errorf("retrieving backup relationship status information from %s: %s", id, err) + } + } + + response := 200 + if res.Model != nil && res.Model.RelationshipStatus != nil && *res.Model.RelationshipStatus != backups.RelationshipStatusTransferring { + // return 204 if state matches desired state + response = 204 + } + + return res, strconv.Itoa(response), nil + } +} + func netappVolumeReplicationStateRefreshFunc(ctx context.Context, client *volumesreplication.VolumesReplicationClient, id volumesreplication.VolumeId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { res, err := client.VolumesReplicationStatus(ctx, id) diff --git a/internal/services/netapp/netapp_volume_quota_rule_data_source.go b/internal/services/netapp/netapp_volume_quota_rule_data_source.go index a4efe6ee162f..3e1b5bdc2dbd 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_data_source.go +++ b/internal/services/netapp/netapp_volume_quota_rule_data_source.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource.go b/internal/services/netapp/netapp_volume_quota_rule_resource.go index cf54ef5cd48c..d3b7003fff98 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" @@ -158,18 +158,21 @@ func (r NetAppVolumeQuotaRuleResource) Update() sdk.ResourceFunc { return err } - metadata.Logger.Infof("Updating %s", id) + if metadata.ResourceData.HasChange("quota_size_in_kib") { + metadata.Logger.Infof("Updating %s", id) - update := volumequotarules.VolumeQuotaRulePatch{ - Properties: &volumequotarules.VolumeQuotaRulesProperties{}, - } + update := volumequotarules.VolumeQuotaRulePatch{ + Properties: &volumequotarules.VolumeQuotaRulesProperties{}, + } - update.Properties.QuotaSizeInKiBs = utils.Int64(state.QuotaSizeInKiB) - if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } + update.Properties.QuotaSizeInKiBs = utils.Int64(state.QuotaSizeInKiB) - metadata.SetID(id) + if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + metadata.SetID(id) + } return nil }, diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go index 2e46415b973d..a0de12896886 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go @@ -9,7 +9,7 @@ import ( "net/http" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 12208842dee5..7f89560b7be2 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -15,9 +15,10 @@ 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/netapp/2023-11-01/snapshots" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -317,6 +318,36 @@ func resourceNetAppVolume() *pluginsdk.Resource { }, }, + "data_protection_backup_policy": { + Type: pluginsdk.TypeList, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "backup_policy_id": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: azure.ValidateResourceID, + Description: "The ID of the backup policy to associate with this volume.", + }, + + "policy_enforced": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + Description: "If set to false, the backup policy will not be enforced on this volume, thus disabling scheduled backups.", + }, + + "backup_vault_id": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: azure.ValidateResourceID, + Description: "The ID of the backup vault to associate with this volume.", + }, + }, + }, + }, + "azure_vmware_data_store_enabled": { Type: pluginsdk.TypeBool, ForceNew: true, @@ -437,25 +468,36 @@ func resourceNetAppVolumeCreate(d *pluginsdk.ResourceData, meta interface{}) err exportPolicyRule := expandNetAppVolumeExportPolicyRule(exportPolicyRuleRaw) dataProtectionReplicationRaw := d.Get("data_protection_replication").([]interface{}) - dataProtectionSnapshotPolicyRaw := d.Get("data_protection_snapshot_policy").([]interface{}) - dataProtectionReplication := expandNetAppVolumeDataProtectionReplication(dataProtectionReplicationRaw) + + dataProtectionSnapshotPolicyRaw := d.Get("data_protection_snapshot_policy").([]interface{}) dataProtectionSnapshotPolicy := expandNetAppVolumeDataProtectionSnapshotPolicy(dataProtectionSnapshotPolicyRaw) + dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) + dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicy(dataProtectionBackupPolicyRaw) + authorizeReplication := false volumeType := "" + endpointType := "" if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil { - endpointType := "" if dataProtectionReplication.Replication.EndpointType != nil { endpointType = string(*dataProtectionReplication.Replication.EndpointType) } - if strings.ToLower(endpointType) == "dst" { + if strings.EqualFold(endpointType, "dst") { authorizeReplication = true volumeType = "DataProtection" } } - // Validating that snapshot policies are not being created in a data protection volume + // Validate applicability of backup policies + if dataProtectionReplication != nil && dataProtectionReplication.Backup != nil { + // Validate that backup policies are not being enforced in a data protection replication destination volume + if strings.EqualFold(volumeType, "dst") && dataProtectionReplication.Backup.PolicyEnforced == utils.Bool(true) { + return fmt.Errorf("backup policy cannot be enforced on a data protection destination volume, NetApp Volume %q (Resource Group %q)", id.VolumeName, id.ResourceGroupName) + } + } + + // Validating that snapshot policies are not being created in a data protection replication volume if dataProtectionSnapshotPolicy.Snapshot != nil && volumeType != "" { return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, NetApp Volume %q (Resource Group %q)", id.VolumeName, id.ResourceGroupName) } @@ -545,6 +587,7 @@ func resourceNetAppVolumeCreate(d *pluginsdk.ResourceData, meta interface{}) err DataProtection: &volumes.VolumePropertiesDataProtection{ Replication: dataProtectionReplication.Replication, Snapshot: dataProtectionSnapshotPolicy.Snapshot, + Backup: dataProtectionBackupPolicy.Backup, }, AvsDataStore: &avsDataStoreEnabled, SnapshotDirectoryVisible: utils.Bool(snapshotDirectoryVisible), @@ -643,14 +686,37 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err dataProtectionReplicationRaw := d.Get("data_protection_replication").([]interface{}) dataProtectionReplication := expandNetAppVolumeDataProtectionReplication(dataProtectionReplicationRaw) - if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil && dataProtectionReplication.Replication.EndpointType != nil && strings.ToLower(string(*dataProtectionReplication.Replication.EndpointType)) == "dst" { + if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil && dataProtectionReplication.Replication.EndpointType != nil && strings.EqualFold(string(*dataProtectionReplication.Replication.EndpointType), "dst") { return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, %s", id) } shouldUpdate = true dataProtectionSnapshotPolicyRaw := d.Get("data_protection_snapshot_policy").([]interface{}) dataProtectionSnapshotPolicy := expandNetAppVolumeDataProtectionSnapshotPolicyPatch(dataProtectionSnapshotPolicyRaw) - update.Properties.DataProtection = dataProtectionSnapshotPolicy + update.Properties.DataProtection.Snapshot = dataProtectionSnapshotPolicy.Snapshot + } + + if d.HasChange("data_protection_backup_policy") { + // Validate applicability of backup policies + dataProtectionReplicationRaw := d.Get("data_protection_replication").([]interface{}) + dataProtectionReplication := expandNetAppVolumeDataProtectionReplication(dataProtectionReplicationRaw) + + if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil && dataProtectionReplication.Replication.EndpointType != nil && strings.EqualFold(string(*dataProtectionReplication.Replication.EndpointType), "dst") { + return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, %s", id) + } + + // Validate applicability of backup policies + if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil { + // Validate that backup policies are not being enforced in a data protection replication destination volume + if strings.EqualFold(string(*dataProtectionReplication.Replication.EndpointType), "dst") && dataProtectionReplication.Backup.PolicyEnforced == utils.Bool(true) { + return fmt.Errorf("backup policy cannot be enforced on a data protection destination volume, NetApp Volume %q (Resource Group %q)", id.VolumeName, id.ResourceGroupName) + } + } + + shouldUpdate = true + dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) + dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicyPatch(dataProtectionBackupPolicyRaw) + update.Properties.DataProtection.Backup = dataProtectionBackupPolicy.Backup } if d.HasChange("throughput_in_mibps") { @@ -780,6 +846,9 @@ func resourceNetAppVolumeRead(d *pluginsdk.ResourceData, meta interface{}) error if err := d.Set("data_protection_snapshot_policy", flattenNetAppVolumeDataProtectionSnapshotPolicy(props.DataProtection)); err != nil { return fmt.Errorf("setting `data_protection_snapshot_policy`: %+v", err) } + if err := d.Set("data_protection_backup_policy", flattenNetAppVolumeDataProtectionBackupPolicy(props.DataProtection)); err != nil { + return fmt.Errorf("setting `data_protection_backup_policy`: %+v", err) + } return tags.FlattenAndSet(d, model.Tags) } @@ -801,53 +870,128 @@ func resourceNetAppVolumeDelete(d *pluginsdk.ResourceData, meta interface{}) err return fmt.Errorf("fetching netapp error: %+v", err) } + // Preventing unintentional severe data loss + if meta.(*clients.Client).Features.NetApp.PreventVolumeDestruction { + return fmt.Errorf("deleting NetApp Volume %q (Resource Group %q) is not allowed due to prevent_volume_destruction feature flag", id.VolumeName, id.ResourceGroupName) + } + + // Handling DataProtection if netApp.Model != nil && netApp.Model.Properties.DataProtection != nil { - dataProtectionReplication := netApp.Model.Properties.DataProtection - replicaVolumeId, err := volumesreplication.ParseVolumeID(id.ID()) - if err != nil { - return err - } - if dataProtectionReplication.Replication != nil && dataProtectionReplication.Replication.EndpointType != nil && strings.ToLower(string(*dataProtectionReplication.Replication.EndpointType)) != "dst" { - // This is the case where primary volume started the deletion, in this case, to be consistent we will remove replication from secondary - replicaVolumeId, err = volumesreplication.ParseVolumeID(dataProtectionReplication.Replication.RemoteVolumeResourceId) + + // Handling Replication before volume deletion + if netApp.Model.Properties.DataProtection.Replication != nil { + dataProtectionReplication := netApp.Model.Properties.DataProtection + replicaVolumeId, err := volumesreplication.ParseVolumeID(id.ID()) if err != nil { return err } - } + if dataProtectionReplication.Replication != nil && dataProtectionReplication.Replication.EndpointType != nil && !(strings.EqualFold(string(*dataProtectionReplication.Replication.EndpointType), "dst")) { + // This is the case where primary volume started the deletion, in this case, to be consistent we will remove replication from secondary + replicaVolumeId, err = volumesreplication.ParseVolumeID(dataProtectionReplication.Replication.RemoteVolumeResourceId) + if err != nil { + return err + } + } - replicationClient := meta.(*clients.Client).NetApp.VolumeReplicationClient - // Checking replication status before deletion, it needs to be broken before proceeding with deletion - if res, err := replicationClient.VolumesReplicationStatus(ctx, *replicaVolumeId); err == nil { - // Wait for replication state = "mirrored" - if model := res.Model; model != nil { - if model.MirrorState != nil && strings.ToLower(string(*model.MirrorState)) == "uninitialized" { - if err := waitForReplMirrorState(ctx, replicationClient, *replicaVolumeId, "mirrored"); err != nil { - return fmt.Errorf("waiting for replica %s to become 'mirrored': %+v", *replicaVolumeId, err) + replicationClient := meta.(*clients.Client).NetApp.VolumeReplicationClient + // Checking replication status before deletion, it needs to be broken before proceeding with deletion + if res, err := replicationClient.VolumesReplicationStatus(ctx, *replicaVolumeId); err == nil { + // Wait for replication state = "mirrored" + if model := res.Model; model != nil { + if model.MirrorState != nil && strings.ToLower(string(*model.MirrorState)) == "uninitialized" { + if err := waitForReplMirrorState(ctx, replicationClient, *replicaVolumeId, "mirrored"); err != nil { + return fmt.Errorf("waiting for replica %s to become 'mirrored': %+v", *replicaVolumeId, err) + } } } + + // Breaking replication + if err = replicationClient.VolumesBreakReplicationThenPoll(ctx, *replicaVolumeId, volumesreplication.BreakReplicationRequest{ + ForceBreakReplication: utils.Bool(true), + }); err != nil { + return fmt.Errorf("breaking replication for %s: %+v", *replicaVolumeId, err) + } + + // Waiting for replication be in broken state + log.Printf("[DEBUG] Waiting for the replication of %s to be in broken state", *replicaVolumeId) + if err := waitForReplMirrorState(ctx, replicationClient, *replicaVolumeId, "broken"); err != nil { + return fmt.Errorf("waiting for the breaking of replication for %s: %+v", *replicaVolumeId, err) + } } - // Breaking replication - if err = replicationClient.VolumesBreakReplicationThenPoll(ctx, *replicaVolumeId, volumesreplication.BreakReplicationRequest{ - ForceBreakReplication: utils.Bool(true), - }); err != nil { - return fmt.Errorf("breaking replication for %s: %+v", *replicaVolumeId, err) + // Deleting replication and waiting for it to fully complete the operation + if _, err = replicationClient.VolumesDeleteReplication(ctx, *replicaVolumeId); err != nil { + return fmt.Errorf("deleting replicate %s: %+v", *replicaVolumeId, err) } - // Waiting for replication be in broken state - log.Printf("[DEBUG] Waiting for the replication of %s to be in broken state", *replicaVolumeId) - if err := waitForReplMirrorState(ctx, replicationClient, *replicaVolumeId, "broken"); err != nil { - return fmt.Errorf("waiting for the breaking of replication for %s: %+v", *replicaVolumeId, err) + if err := waitForReplicationDeletion(ctx, replicationClient, *replicaVolumeId); err != nil { + return fmt.Errorf("waiting for the replica %s to be deleted: %+v", *replicaVolumeId, err) } } - // Deleting replication and waiting for it to fully complete the operation - if _, err = replicationClient.VolumesDeleteReplication(ctx, *replicaVolumeId); err != nil { - return fmt.Errorf("deleting replicate %s: %+v", *replicaVolumeId, err) - } + // Handling Backup before volume deletion + if netApp.Model.Properties.DataProtection.Backup != nil { + dataProtectionBackup := netApp.Model.Properties.DataProtection + + if dataProtectionBackup.Backup != nil { + dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) + dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicyPatch(dataProtectionBackupPolicyRaw) + + if dataProtectionBackupPolicy.Backup != nil { + + // Checking if initial backup is in progress + volumeIdFromBackupClient := backups.NewVolumeID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) + backupClient := meta.(*clients.Client).NetApp.BackupClient + if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { + return fmt.Errorf("waiting for of %s: %+v", *id, err) + } + + // Disabling backup policy first, PolicyEnforced and BackupPolicyId can't be sent together + disableBackupPolicy := volumes.VolumePatch{ + Properties: &volumes.VolumePatchProperties{ + DataProtection: &volumes.VolumePatchPropertiesDataProtection{ + Backup: &volumes.VolumeBackupProperties{ + PolicyEnforced: utils.Bool(false), + }, + }, + }, + } + + if err = client.UpdateThenPoll(ctx, *id, disableBackupPolicy); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + // Wait for volume to complete update + if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { + return err + } + + // Checking again if backup is in progress + if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { + return fmt.Errorf("waiting for of %s: %+v", *id, err) + } + + // Removing BackupPolicyId + backupPolicyIdRemoval := volumes.VolumePatch{ + Properties: &volumes.VolumePatchProperties{ + DataProtection: &volumes.VolumePatchPropertiesDataProtection{ + Backup: &volumes.VolumeBackupProperties{ + BackupPolicyId: pointer.To(""), + }, + }, + }, + } - if err := waitForReplicationDeletion(ctx, replicationClient, *replicaVolumeId); err != nil { - return fmt.Errorf("waiting for the replica %s to be deleted: %+v", *replicaVolumeId, err) + if err = client.UpdateThenPoll(ctx, *id, backupPolicyIdRemoval); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + // Wait for volume to complete update + if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { + return err + } + } + } } } @@ -1052,7 +1196,7 @@ func flattenNetAppVolumeDataProtectionReplication(input *volumes.VolumePropertie return []interface{}{} } - if strings.ToLower(string(*input.Replication.EndpointType)) == "" || strings.ToLower(string(*input.Replication.EndpointType)) != "dst" { + if strings.ToLower(string(*input.Replication.EndpointType)) == "" || !(strings.EqualFold(string(*input.Replication.EndpointType), "dst")) { return []interface{}{} } @@ -1082,3 +1226,33 @@ func flattenNetAppVolumeDataProtectionSnapshotPolicy(input *volumes.VolumeProper }, } } + +func flattenNetAppVolumeDataProtectionBackupPolicy(input *volumes.VolumePropertiesDataProtection) []interface{} { + if input == nil || input.Backup == nil { + return []interface{}{} + } + + backupPolicyID := "" + policyEnforced := false + backupVaultID := "" + + if input.Backup.BackupPolicyId != nil { + backupPolicyID = pointer.From(input.Backup.BackupPolicyId) + } + + if input.Backup.PolicyEnforced != nil { + policyEnforced = pointer.From(input.Backup.PolicyEnforced) + } + + if input.Backup.BackupVaultId != nil { + backupVaultID = pointer.From(input.Backup.BackupVaultId) + } + + return []interface{}{ + map[string]interface{}{ + "backup_policy_id": backupPolicyID, + "policy_enforced": policyEnforced, + "backup_vault_id": backupVaultID, + }, + } +} diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index acea9676bb3b..2a447d700027 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -10,7 +10,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "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" @@ -35,6 +35,21 @@ func TestAccNetAppVolume_basic(t *testing.T) { }) } +func TestAccNetAppVolume_backupPolicy(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") + r := NetAppVolumeResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.backupPolicy(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccNetAppVolume_availabilityZone(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") r := NetAppVolumeResource{} @@ -482,6 +497,54 @@ resource "azurerm_netapp_volume" "test" { `, cmkUserAssginedTemplate, networkTemplate, data.RandomInteger) } +func (NetAppVolumeResource) backupPolicy(data acceptance.TestData) string { + template := NetAppVolumeResource{}.template(data) + return fmt.Sprintf(` +%[1]s + +resource "azurerm_netapp_backup_vault" "test" { + name = "acctest-NetAppBackupVault-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + + tags = { + "testTag" = "testTagValue" + } +} + +resource "azurerm_netapp_backup_policy" "test" { + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true +} + +resource "azurerm_netapp_volume" "test" { + name = "acctest-NetAppVolume-%[2]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + pool_name = azurerm_netapp_pool.test.name + volume_path = "my-unique-file-path-%[2]d" + service_level = "Standard" + subnet_id = azurerm_subnet.test.id + storage_quota_in_gb = 100 + throughput_in_mibps = 10 + + data_protection_backup_policy { + backup_vault_id = azurerm_netapp_backup_vault.test.id + backup_policy_id = azurerm_netapp_backup_policy.test.id + policy_enforced = true + } +} +`, template, data.RandomInteger) +} + func (NetAppVolumeResource) basic(data acceptance.TestData) string { template := NetAppVolumeResource{}.template(data) return fmt.Sprintf(` @@ -1160,16 +1223,9 @@ resource "azurerm_netapp_pool" "test_secondary" { `, r.template(data), data.RandomInteger, "eastus2") } -func (NetAppVolumeResource) template(data acceptance.TestData) string { +func (r NetAppVolumeResource) template(data acceptance.TestData) string { return fmt.Sprintf(` -provider "azurerm" { - alias = "all1" - features { - resource_group { - prevent_deletion_if_contains_resources = false - } - } -} +%s resource "azurerm_resource_group" "test" { name = "acctestRG-netapp-%d" @@ -1235,19 +1291,12 @@ resource "azurerm_netapp_pool" "test" { "SkipASMAzSecPack" = "true" } } -`, data.RandomInteger, "westus2", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) +`, r.templateProviderFeatureFlags(), data.RandomInteger, "westus2", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) } -func (NetAppVolumeResource) templatePoolQosManual(data acceptance.TestData) string { +func (r NetAppVolumeResource) templatePoolQosManual(data acceptance.TestData) string { return fmt.Sprintf(` -provider "azurerm" { - alias = "all2" - features { - resource_group { - prevent_deletion_if_contains_resources = false - } - } -} +%s resource "azurerm_resource_group" "test" { name = "acctestRG-netapp-%d" @@ -1325,7 +1374,7 @@ resource "azurerm_netapp_pool" "test" { "SkipASMAzSecPack" = "true" } } -`, data.RandomInteger, "westus2", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) +`, r.templateProviderFeatureFlags(), data.RandomInteger, "westus2", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) } func (NetAppVolumeResource) networkTemplate(data acceptance.TestData) string { @@ -1366,3 +1415,19 @@ resource "azurerm_subnet" "test-non-delegated" { } `, data.RandomInteger) } + +func (NetAppVolumeResource) templateProviderFeatureFlags() string { + return ` +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } + } +} +` +} diff --git a/internal/services/netapp/registration.go b/internal/services/netapp/registration.go index b2ba2a550cc2..9b0e86bee0e8 100644 --- a/internal/services/netapp/registration.go +++ b/internal/services/netapp/registration.go @@ -56,6 +56,7 @@ func (r Registration) DataSources() []sdk.DataSource { NetAppVolumeQuotaRuleDataSource{}, NetAppAccountEncryptionDataSource{}, NetAppBackupVaultDataSource{}, + NetAppBackupPolicyDataSource{}, } } @@ -66,5 +67,6 @@ func (r Registration) Resources() []sdk.Resource { NetAppVolumeQuotaRuleResource{}, NetAppAccountEncryptionResource{}, NetAppBackupVaultResource{}, + NetAppBackupPolicyResource{}, } } diff --git a/internal/services/netapp/validate/account_id.go b/internal/services/netapp/validate/account_id.go index e975007e634a..b9dfdb5d7551 100644 --- a/internal/services/netapp/validate/account_id.go +++ b/internal/services/netapp/validate/account_id.go @@ -6,7 +6,7 @@ package validate import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" ) func ValidateNetAppAccountID(input interface{}, key string) (warnings []string, errors []error) { diff --git a/internal/services/netapp/validate/backup_policy_validation.go b/internal/services/netapp/validate/backup_policy_validation.go new file mode 100644 index 000000000000..b25bbc905f0b --- /dev/null +++ b/internal/services/netapp/validate/backup_policy_validation.go @@ -0,0 +1,34 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "fmt" +) + +const ( + maximumAllowedCombinedRetentionCount = 1019 +) + +func ValidateNetAppBackupPolicyCombinedRetention(dailyBackupsToKeep, weeklyBackupsToKeep, monthlyBackupsToKeep int64) []error { + errors := make([]error, 0) + + // Validates that the combined retention count is less than the maximum allowed + if dailyBackupsToKeep+weeklyBackupsToKeep+monthlyBackupsToKeep > maximumAllowedCombinedRetentionCount { + errors = append(errors, fmt.Errorf("the combined retention count of daily_backups_to_keep, weekly_backups_to_keep, and monthly_backups_to_keep must be less than or equal to %d", maximumAllowedCombinedRetentionCount)) + } + + return errors +} + +// TODO: Validating that the policy attached to a secondary CRR volume (destination) is not enabled for backup +func ValidateNetAppBackupPolicyForSecondaryCRRVolume(backupPolicyEnabled bool) []error { + errors := make([]error, 0) + + if backupPolicyEnabled { + errors = append(errors, fmt.Errorf("backup policy cannot be enabled on a secondary CRR volume")) + } + + return errors +} diff --git a/internal/services/netapp/validate/backup_policy_validation_test.go b/internal/services/netapp/validate/backup_policy_validation_test.go new file mode 100644 index 000000000000..132db1def2df --- /dev/null +++ b/internal/services/netapp/validate/backup_policy_validation_test.go @@ -0,0 +1,58 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" +) + +const ( + minDataDailyBackupsToKeep int64 = 10 + minDataWeeklyBackupsToKeep int64 = 10 + minDataMonthlyBackupsToKeep int64 = 10 + + maxDataDailyBackupsToKeep int64 = 1019 + maxDataWeeklyBackupsToKeep int64 = 1019 + maxDataMonthlyBackupsToKeep int64 = 1019 +) + +func TestValidateNetAppBackupPolicyCombinedRetention(t *testing.T) { + cases := []struct { + Name string + BackupPolicyData backuppolicy.BackupPolicyProperties + Errors int + }{ + { + Name: "ValidateCombinedRetentionWithValidValues", + BackupPolicyData: backuppolicy.BackupPolicyProperties{ + DailyBackupsToKeep: pointer.To(minDataDailyBackupsToKeep), + WeeklyBackupsToKeep: pointer.To(minDataWeeklyBackupsToKeep), + MonthlyBackupsToKeep: pointer.To(minDataMonthlyBackupsToKeep), + }, + Errors: 0, + }, + { + Name: "ValidateCombinedRetentionWithValidValuesMaximumReachedFailure", + BackupPolicyData: backuppolicy.BackupPolicyProperties{ + DailyBackupsToKeep: pointer.To(maxDataDailyBackupsToKeep), + WeeklyBackupsToKeep: pointer.To(maxDataWeeklyBackupsToKeep), + MonthlyBackupsToKeep: pointer.To(maxDataMonthlyBackupsToKeep), + }, + Errors: 1, + }, + } + + for _, tc := range cases { + t.Run(tc.Name, func(t *testing.T) { + errors := ValidateNetAppBackupPolicyCombinedRetention(pointer.From(tc.BackupPolicyData.DailyBackupsToKeep), pointer.From(tc.BackupPolicyData.WeeklyBackupsToKeep), pointer.From(tc.BackupPolicyData.MonthlyBackupsToKeep)) + + if len(errors) != tc.Errors { + t.Fatalf("expected ValidateUnixUserIDOrGroupID to return %d error(s) not %d\nError List: \n%v", tc.Errors, len(errors), errors) + } + }) + } +} diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go index 94a8d1cb0e75..1adfea70124e 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" ) func ValidateNetAppVolumeGroupExportPolicyRuleSAPHanna(rule volumegroups.ExportPolicyRule, protocolType string) []error { diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go index 1e9bba8d7a83..c2416e3d8aca 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_export_policy_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go index 2d948a165e99..6fb761f68433 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go index 964081d4f043..a01d28537ac9 100644 --- a/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go +++ b/internal/services/netapp/validate/volume_group_sap_hana_volumes_validation_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go index 9ca366991070..51fcf816d33d 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_unix_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRulesUnix(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go index d7e572759a10..67f2a92c9f6f 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_id_windows_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRules(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go b/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go index ba4b0e712605..7f5df51f0306 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_target_validation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" ) func TestValidateNetAppVolumeQuotaRulesQuotaType(t *testing.T) { diff --git a/internal/services/netapp/validate/volume_quota_rule_quota_validations.go b/internal/services/netapp/validate/volume_quota_rule_quota_validations.go index dc4b7d401e7c..823a56d4333e 100644 --- a/internal/services/netapp/validate/volume_quota_rule_quota_validations.go +++ b/internal/services/netapp/validate/volume_quota_rule_quota_validations.go @@ -9,8 +9,8 @@ import ( "net/http" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" netAppModels "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/models" ) diff --git a/website/docs/d/netapp_backup_policy.markdown b/website/docs/d/netapp_backup_policy.markdown new file mode 100644 index 000000000000..b94b4f537d8c --- /dev/null +++ b/website/docs/d/netapp_backup_policy.markdown @@ -0,0 +1,67 @@ +--- +subcategory: "NetApp" +layout: "azurerm" +page_title: "Azure Resource Manager: netapp_backup_policy" +description: |- + Gets information about an existing NetApp Backup Policy +--- + +# Data Source: netapp_backup_policy + +Use this data source to access information about an existing NetApp Backup Vault. + +## NetApp Backup Policy Usage + +```hcl +data "azurerm_netapp_backup_policy" "example" { + resource_group_name = "example-resource-group" + account_name = "example-netappaccount" + name = "example-backuppolicy" +} + +output "backup_policy_id" { + value = data.azurerm_netapp_backup_policy.example.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - The name of the NetApp Backup Policy. + +* `resource_group_name` - The name of the resource group where the NetApp Backup Policy exists. + +* `account_name` - The name of the NetApp Account in which the NetApp Policy exists. + +## Attributes Reference + +The following attributes are exported: + +* `location` - NetApp Backup Policy location. + +* `account_name` - The name of the NetApp account in which the NetApp Policy exists. + +* `daily_backups_to_keep` - The number of daily backups to keep. + +* `weekly_backups_to_keep` - The number of weekly backups to keep. + +* `monthly_backups_to_keep` - The number of monthly backups to keep. + +* `enabled` - Whether the Backup Policy is enabled. + +* `tags` - List of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the NetApp Backup Policy. + +## Import + +NetApp Backup Policy can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_netapp_backup_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/backuppolicy1 +``` diff --git a/website/docs/d/netapp_backup_vault.markdown b/website/docs/d/netapp_backup_vault.markdown new file mode 100644 index 000000000000..e5494d3e65bf --- /dev/null +++ b/website/docs/d/netapp_backup_vault.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "NetApp" +layout: "azurerm" +page_title: "Azure Resource Manager: netapp_backup_vault" +description: |- + Gets information about an existing NetApp Backup Vault +--- + +# Data Source: netapp_backup_vault + +Use this data source to access information about an existing NetApp Backup Vault. + +## NetApp Backup Vault Usage + +```hcl +data "azurerm_netapp_backup_vault" "example" { + resource_group_name = "example-resource-group" + account_name = "example-netappaccount" + name = "example-backupvault" +} + +output "backup_vault_id" { + value = data.azurerm_netapp_backup_vault.example.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - The name of the NetApp Backup Vault. + +* `resource_group_name` - The name of the resource group where the NetApp Backup Vault exists. + +* `account_name` - The name of the NetApp Account in which the NetApp Vault exists. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the NetApp Backup Vault. + +## Import + +NetApp Backup Vault can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_netapp_backup_vault.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/backupvault1 +``` diff --git a/website/docs/d/netapp_volume.html.markdown b/website/docs/d/netapp_volume.html.markdown index 1b15c2955ca6..9c70584d4ca1 100644 --- a/website/docs/d/netapp_volume.html.markdown +++ b/website/docs/d/netapp_volume.html.markdown @@ -59,7 +59,9 @@ The following attributes are exported: * `security_style` - Volume security style -* `data_protection_replication` - Volume data protection block +* `data_protection_replication` - Volume data protection replication block + +* `data_protection_backup_policy` - A data protecion backup policy block * `volume_path` - The unique file path of the volume. @@ -81,6 +83,16 @@ A `data_protection_replication` block exports the following: --- +A `data_protection_backup_policy` block supports the following: + +* `backup_vault_id` - The Resource ID of the backup backup vault. + +* `backup_policy_id` - The Resource ID of the backup policy. + +* `policy_enforced` - Backup policy is enforced or not. + +--- + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: diff --git a/website/docs/guides/features-block.html.markdown b/website/docs/guides/features-block.html.markdown index 7e35202a8031..6f420158e52f 100644 --- a/website/docs/guides/features-block.html.markdown +++ b/website/docs/guides/features-block.html.markdown @@ -62,6 +62,11 @@ provider "azurerm" { expand_without_downtime = true } + netapp { + delete_backups_on_backup_vault_destroy = false + prevent_volume_destruction = true + } + postgresql_flexible_server { restart_server_on_configuration_value_change = true } @@ -123,6 +128,8 @@ The `features` block supports the following: * `managed_disk` - (Optional) A `managed_disk` block as defined below. +* `netapp` - (Optional) A `netapp` block as defined below. + * `recovery_service` - (Optional) A `recovery_service` block as defined below. * `resource_group` - (Optional) A `resource_group` block as defined below. @@ -217,6 +224,13 @@ The `managed_disk` block supports the following: --- +The `netapp` block supports the following: + +* `delete_backups_on_backup_vault_destroy` - (Optional) Should backups be deleted when an `azurerm_netapp_backup_vault` is being deleted? Defaults to `false`. +* `prevent_volume_destruction` - (Optional) Should an `azurerm_netapp_volume` be protected against deletion (intentionally or unintentionally)? Defaults to `true`. + +--- + The `postgresql_flexible_server` block supports the following: * `restart_server_on_configuration_value_change` - (Optional) Should the `postgresql_flexible_server` restart after static server parameter change or removal? Defaults to `true`. diff --git a/website/docs/r/netapp_backup_policy.markdown b/website/docs/r/netapp_backup_policy.markdown new file mode 100644 index 000000000000..b4440df355f9 --- /dev/null +++ b/website/docs/r/netapp_backup_policy.markdown @@ -0,0 +1,78 @@ +--- +subcategory: "NetApp" +layout: "azurerm" +page_title: "Azure Resource Manager: netapp_backup_policy" +description: |- + Manages a NetApp Backup Policy. +--- + +# netapp_backup_policy + +Manages a NetApp Backup Policy. + +## NetApp Backup Policy Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_netapp_account" "example" { + name = "example-netappaccount" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_netapp_backup_policy" "example" { + name = "example-netappbackuppolicy" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the NetApp Backup Policy. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the resource group where the NetApp Backup Policy should be created. Changing this forces a new resource to be created. + +* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. + +* `account_name` - (Required) The name of the NetApp account in which the NetApp Policy should be created under. Changing this forces a new resource to be created. + +* `daily_backups_to_keep` - (Optional) Provides the number of daily backups to keep, defaults to `2` which is the minimum, maximum is 1019. + +* `weekly_backups_to_keep` - (Optional) Provides the number of weekly backups to keep, defaults to `1` which is the minimum, maximum is 1019. + +* `monthly_backups_to_keep` - (Optional) Provides the number of monthly backups to keep, defaults to `1` which is the minimum, maximum is 1019. + +* `enabled` - (Optional) Whether the Backup Policy is enabled. Defaults to `true`. + +* `tags` - (Optional) A mapping of tags to assign to the resource. + +~> **Note:** Currently, the combined (daily + weekly + monthy) retention counts cannot exceed 1019. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 90 minutes) Used when creating the NetApp Backup Policy. +* `update` - (Defaults to 120 minutes) Used when updating the NetApp Backup Policy. +* `read` - (Defaults to 5 minutes) Used when retrieving the NetApp Backup Policy. +* `delete` - (Defaults to 120 minutes) Used when deleting the NetApp Backup Policy. + +## Import + +NetApp Backup Policy can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_netapp_backup_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/backuppolicy1 +``` diff --git a/website/docs/r/netapp_backup_vault.markdown b/website/docs/r/netapp_backup_vault.markdown new file mode 100644 index 000000000000..72fcd2cf16f6 --- /dev/null +++ b/website/docs/r/netapp_backup_vault.markdown @@ -0,0 +1,64 @@ +--- +subcategory: "NetApp" +layout: "azurerm" +page_title: "Azure Resource Manager: netapp_backup_vault" +description: |- + Manages a NetApp Backup Vault. +--- + +# netapp_backup_vault + +Manages a NetApp Backup Vault. + +## NetApp Backup Vault Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_netapp_account" "example" { + name = "example-netappaccount" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_netapp_backup_vault" "example" { + name = "example-netappbackupvault" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the NetApp Backup Vault. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the resource group where the NetApp Backup Vault should be created. Changing this forces a new resource to be created. + +* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. + +* `account_name` - (Required) The name of the NetApp account in which the NetApp Vault should be created under. Changing this forces a new resource to be created. + +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 90 minutes) Used when creating the NetApp Backup Vault. +* `update` - (Defaults to 120 minutes) Used when updating the NetApp Backup Vault. +* `read` - (Defaults to 5 minutes) Used when retrieving the NetApp Backup Vault. +* `delete` - (Defaults to 120 minutes) Used when deleting the NetApp Backup Vault. + +## Import + +NetApp Backup Vault can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_netapp_backup_vault.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1 +``` diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index ec487d36fc41..df792288d815 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -10,11 +10,20 @@ description: |- Manages a NetApp Volume. -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). +!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). With the latest version of this resource, we're also implementing another safeguard that by default will fail volume deletions if a newly introduced feature block for netapp, called `prevent_volume_destruction`, defaulting to `true`, is not intentionally set to `false`. The example in this page shows all possible protection options you can apply, it is using same values as the defaults. ## NetApp Volume Usage ```hcl +provider "azurerm" { + features { + netapp { + prevent_volume_destruction = true + delete_backups_on_backup_vault_destroy = false + } + } +} + resource "azurerm_resource_group" "example" { name = "example-resources" location = "West Europe" @@ -49,6 +58,24 @@ resource "azurerm_netapp_account" "example" { resource_group_name = azurerm_resource_group.example.name } +resource "azurerm_netapp_backup_vault" "example" { + name = "example-netappbackupvault" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name +} + +resource "azurerm_netapp_backup_policy" "example" { + name = "example-netappbackuppolicy" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true +} + resource "azurerm_netapp_pool" "example" { name = "example-netapppool" location = azurerm_resource_group.example.location @@ -92,6 +119,13 @@ resource "azurerm_netapp_volume" "example" { snapshot_policy_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotpolicy1" } + # Enabling backup policy + data_protection_backup_policy { + backup_vault_id = azurerm_netapp_backup_vault.example.id + backup_policy_id = azurerm_netapp_backup_policy.example.id + policy_enforced = true + } + # prevent the possibility of accidental data loss lifecycle { prevent_destroy = true @@ -139,6 +173,8 @@ The following arguments are supported: * `data_protection_snapshot_policy` - (Optional) A `data_protection_snapshot_policy` block as defined below. +* `data_protection_backup_policy` - (Optional) A `data_protection_backup_policy` block as defined below. + * `export_policy_rule` - (Optional) One or more `export_policy_rule` block defined below. * `throughput_in_mibps` - (Optional) Throughput of this volume in Mibps. @@ -217,6 +253,18 @@ A full example of the `data_protection_snapshot_policy` attribute usage can be f --- +A `data_protection_backup_policy` block is used to setup automatic backups through a specific backup policy. It supports the following: + +* `backup_vault_id` - (Required) Resource ID of the backup backup vault to associate this volume to. + +* `backup_policy_id` - (Required) Resource ID of the backup policy to apply to the volume. + +* `policy_enforced` - (Optional) Enables the backup policy on the volume, defaults to `true`. + +For more information on Azure NetApp Files Backup feature please see [Understand Azure NetApp Files backup](https://learn.microsoft.com/en-us/azure/azure-netapp-files/backup-introduction) + +--- + ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: From 5f8b852e423491145e7b92d664894e0643720c10 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 23 Aug 2024 17:57:23 +0000 Subject: [PATCH 05/32] adding feature block to allow volume deletion on test and bug fix for snapshot_directory_visible --- .../netapp/netapp_snapshot_resource_test.go | 10 +++++++++- .../netapp/netapp_volume_data_source_test.go | 4 ++++ ...netapp_volume_group_sap_hana_resource_test.go | 4 ++++ .../netapp_volume_quota_rule_resource_test.go | 4 ++++ .../services/netapp/netapp_volume_resource.go | 7 +++++++ .../netapp/netapp_volume_resource_test.go | 16 +++++++++------- 6 files changed, 37 insertions(+), 8 deletions(-) diff --git a/internal/services/netapp/netapp_snapshot_resource_test.go b/internal/services/netapp/netapp_snapshot_resource_test.go index a0cb68e5850e..b2e93db29386 100644 --- a/internal/services/netapp/netapp_snapshot_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_resource_test.go @@ -128,7 +128,15 @@ resource "azurerm_netapp_snapshot" "test" { func (NetAppSnapshotResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { - features {} + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } + } } resource "azurerm_resource_group" "test" { diff --git a/internal/services/netapp/netapp_volume_data_source_test.go b/internal/services/netapp/netapp_volume_data_source_test.go index 52cea289455a..58ae6d6ed785 100644 --- a/internal/services/netapp/netapp_volume_data_source_test.go +++ b/internal/services/netapp/netapp_volume_data_source_test.go @@ -58,6 +58,10 @@ provider "azurerm" { resource_group { prevent_deletion_if_contains_resources = false } + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } } } diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go index d47ae3812905..7005d5cfb90f 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go @@ -1606,6 +1606,10 @@ provider "azurerm" { resource_group { prevent_deletion_if_contains_resources = false } + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } } } diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go index a0de12896886..aa804754e903 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go @@ -166,6 +166,10 @@ provider "azurerm" { resource_group { prevent_deletion_if_contains_resources = false } + netapp { + prevent_volume_destruction = false + delete_backups_on_backup_vault_destroy = true + } } } diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 7f89560b7be2..1ca0de6b8780 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -263,6 +263,7 @@ func resourceNetAppVolume() *pluginsdk.Resource { "snapshot_directory_visible": { Type: pluginsdk.TypeBool, Optional: true, + Default: true, Computed: true, }, @@ -668,6 +669,12 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err return fmt.Errorf("zone changes are not supported after volume is already created, %s", id) } + if d.HasChange("snapshot_directory_visible") { + shouldUpdate = true + snapshotDirectoryVisible := d.Get("snapshot_directory_visible").(bool) + update.Properties.SnapshotDirectoryVisible = pointer.To(snapshotDirectoryVisible) + } + if d.HasChange("storage_quota_in_gb") { shouldUpdate = true storageQuotaInBytes := int64(d.Get("storage_quota_in_gb").(int) * 1073741824) diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index 2a447d700027..dcc4391bdbc2 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -720,7 +720,7 @@ resource "azurerm_netapp_volume" "test_primary" { subnet_id = azurerm_subnet.test.id protocols = ["NFSv3"] storage_quota_in_gb = 100 - snapshot_directory_visible = false + snapshot_directory_visible = true throughput_in_mibps = 1.562 export_policy_rule { @@ -748,7 +748,7 @@ resource "azurerm_netapp_volume" "test_secondary" { subnet_id = azurerm_subnet.test_secondary.id protocols = ["NFSv3"] storage_quota_in_gb = 100 - snapshot_directory_visible = false + snapshot_directory_visible = true throughput_in_mibps = 1.562 export_policy_rule { @@ -1377,10 +1377,12 @@ resource "azurerm_netapp_pool" "test" { `, r.templateProviderFeatureFlags(), data.RandomInteger, "westus2", data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) } -func (NetAppVolumeResource) networkTemplate(data acceptance.TestData) string { +func (r NetAppVolumeResource) networkTemplate(data acceptance.TestData) string { return fmt.Sprintf(` +%[1]s + resource "azurerm_virtual_network" "test" { - name = "acctest-VirtualNetwork-%[1]d" + name = "acctest-VirtualNetwork-%[2]d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name address_space = ["10.6.0.0/16"] @@ -1392,7 +1394,7 @@ resource "azurerm_virtual_network" "test" { } resource "azurerm_subnet" "test-delegated" { - name = "acctest-Delegated-Subnet-%[1]d" + name = "acctest-Delegated-Subnet-%[2]d" resource_group_name = azurerm_resource_group.test.name virtual_network_name = azurerm_virtual_network.test.name address_prefixes = ["10.6.1.0/24"] @@ -1408,12 +1410,12 @@ resource "azurerm_subnet" "test-delegated" { } resource "azurerm_subnet" "test-non-delegated" { - name = "acctest-Non-Delegated-Subnet-%[1]d" + name = "acctest-Non-Delegated-Subnet-%[2]d" resource_group_name = azurerm_resource_group.test.name virtual_network_name = azurerm_virtual_network.test.name address_prefixes = ["10.6.0.0/24"] } -`, data.RandomInteger) +`, r.templateProviderFeatureFlags(), data.RandomInteger) } func (NetAppVolumeResource) templateProviderFeatureFlags() string { From 2995a3e1fd2ca14d46a8852e0f0b8aa2b32fb0d4 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 13:25:13 +0000 Subject: [PATCH 06/32] Fixing issue with snapshot_directory_visible and addikng alias to acctest provider block --- .../services/netapp/netapp_account_encryption_resource_test.go | 1 + internal/services/netapp/netapp_volume_resource.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/netapp/netapp_account_encryption_resource_test.go b/internal/services/netapp/netapp_account_encryption_resource_test.go index 0fa754abc395..b224126f9790 100644 --- a/internal/services/netapp/netapp_account_encryption_resource_test.go +++ b/internal/services/netapp/netapp_account_encryption_resource_test.go @@ -511,6 +511,7 @@ resource "azurerm_netapp_account_encryption" "test" { func (NetAppAccountEncryptionResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { + alias = "acccountEncryption" features { resource_group { prevent_deletion_if_contains_resources = false diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 1ca0de6b8780..f1121bf9f516 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -264,7 +264,6 @@ func resourceNetAppVolume() *pluginsdk.Resource { Type: pluginsdk.TypeBool, Optional: true, Default: true, - Computed: true, }, "data_protection_replication": { From 459f2e003ab320de0ec5f6c812adfe4ae97686df Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 13:53:19 +0000 Subject: [PATCH 07/32] Fixing variable name --- internal/acceptance/testing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/acceptance/testing.go b/internal/acceptance/testing.go index dcbd46ff2afc..1dc6a3070f5e 100644 --- a/internal/acceptance/testing.go +++ b/internal/acceptance/testing.go @@ -18,7 +18,7 @@ import ( func PreCheck(t *testing.T) { variables := []string{ "ARM_CLIENT_ID", - "ARM_CLIETN_SECRET", + "ARM_CLIENT_SECRET", "ARM_SUBSCRIPTION_ID", "ARM_TENANT_ID", "ARM_TEST_LOCATION", From 55620b4245621db5c438a44538901e6e0f8684ba Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 14:21:15 +0000 Subject: [PATCH 08/32] Adding updated module files --- go.mod | 4 ++-- go.sum | 12 ++++++++---- vendor/modules.txt | 23 +++++++++++++---------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 47eba0cc828b..6de48cfecfb2 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.4.0 github.com/hashicorp/go-azure-helpers v0.69.0 - github.com/hashicorp/go-azure-sdk/resource-manager v0.20240701.1082110 - github.com/hashicorp/go-azure-sdk/sdk v0.20240701.1082110 + github.com/hashicorp/go-azure-sdk/resource-manager v0.20240819.1075239 + github.com/hashicorp/go-azure-sdk/sdk v0.20240819.1075239 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 35f0774fa278..e10572d0ece3 100644 --- a/go.sum +++ b/go.sum @@ -95,10 +95,14 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.69.0 h1:JwUWXyDgyr6OafU4CgSvrbEP1wcMjfz4gxRQciDQkBQ= github.com/hashicorp/go-azure-helpers v0.69.0/go.mod h1:BmbF4JDYXK5sEmFeU5hcn8Br21uElcqLfdQxjatwQKw= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240701.1082110 h1:rotSksh9NVTXbwhbWj7zCkAcEppRG+NWitiDIfGRA5M= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240701.1082110/go.mod h1:E6Z2/LJ/VQY/XWK38m4lHpUJ0VL9hVfsxY8oqIkhyFs= -github.com/hashicorp/go-azure-sdk/sdk v0.20240701.1082110 h1:9Pw+uCTpkGlioKNeR6GxaKsw10LinCBC0+sOVxn7caQ= -github.com/hashicorp/go-azure-sdk/sdk v0.20240701.1082110/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240708.1080555 h1:KAFDdMndOLAiL0Gjz8D8rJqRvFVrLJf1eNu7MDU6kZM= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240708.1080555/go.mod h1:m30+8aphXDNcc9gDPSE7tQYPVt1uzZDM93teCMdIAf0= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240819.1075239 h1:Vs3yqWI0DEy0AswanjEB+Vj7486rc1O6QCPv8uX2qgg= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240819.1075239/go.mod h1:lDFtVt7Q/VcFqyu/SlE9IhtroHlsAurHpw0YMhsa5Oc= +github.com/hashicorp/go-azure-sdk/sdk v0.20240708.1080555 h1:Q/4B/1Al2Gk3QgjMRZOuag8mnlpoqO812kbpJl+FeXE= +github.com/hashicorp/go-azure-sdk/sdk v0.20240708.1080555/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= +github.com/hashicorp/go-azure-sdk/sdk v0.20240819.1075239 h1:SUrK9B4A04gmCfdPzj4ZisIyOI10RYwurUyBU0dfkm8= +github.com/hashicorp/go-azure-sdk/sdk v0.20240819.1075239/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/modules.txt b/vendor/modules.txt index 4761b5ecabfb..c4cb0e89d1c0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -152,7 +152,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240701.1082110 +# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240819.1075239 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview @@ -707,14 +707,17 @@ github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestar github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes -github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes +github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/azurefirewalls @@ -1119,7 +1122,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplands github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances -# github.com/hashicorp/go-azure-sdk/sdk v0.20240701.1082110 +# github.com/hashicorp/go-azure-sdk/sdk v0.20240819.1075239 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/sdk/auth github.com/hashicorp/go-azure-sdk/sdk/auth/autorest From de66980ae17759212de857c38cc6a3a46cadfae5 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 14:23:50 +0000 Subject: [PATCH 09/32] vendor updates --- .../netapp/2024-03-01/backuppolicy/README.md | 98 +++++++++++ .../netapp/2024-03-01/backuppolicy/client.go | 26 +++ .../backuppolicy/id_backuppolicy.go | 139 +++++++++++++++ .../backuppolicy/id_netappaccount.go | 130 ++++++++++++++ .../method_backuppoliciescreate.go | 76 ++++++++ .../method_backuppoliciesdelete.go | 71 ++++++++ .../backuppolicy/method_backuppoliciesget.go | 54 ++++++ .../backuppolicy/method_backuppolicieslist.go | 55 ++++++ .../method_backuppoliciesupdate.go | 75 ++++++++ .../backuppolicy/model_backuppolicieslist.go | 8 + .../backuppolicy/model_backuppolicy.go | 19 ++ .../backuppolicy/model_backuppolicypatch.go | 13 ++ .../model_backuppolicyproperties.go | 15 ++ .../backuppolicy/model_volumebackups.go | 11 ++ .../netapp/2024-03-01/backuppolicy/version.go | 12 ++ .../netapp/2024-03-01/backups/README.md | 166 ++++++++++++++++++ .../netapp/2024-03-01/backups/client.go | 26 +++ .../netapp/2024-03-01/backups/constants.go | 142 +++++++++++++++ .../netapp/2024-03-01/backups/id_backup.go | 148 ++++++++++++++++ .../2024-03-01/backups/id_backupvault.go | 139 +++++++++++++++ .../2024-03-01/backups/id_netappaccount.go | 130 ++++++++++++++ .../netapp/2024-03-01/backups/id_volume.go | 148 ++++++++++++++++ .../2024-03-01/backups/method_create.go | 75 ++++++++ .../2024-03-01/backups/method_delete.go | 70 ++++++++ .../netapp/2024-03-01/backups/method_get.go | 54 ++++++ .../backups/method_getlateststatus.go | 55 ++++++ .../2024-03-01/backups/method_listbyvault.go | 133 ++++++++++++++ .../method_underaccountmigratebackups.go | 73 ++++++++ .../method_underbackupvaultrestorefiles.go | 73 ++++++++ .../method_undervolumemigratebackups.go | 73 ++++++++ .../2024-03-01/backups/method_update.go | 75 ++++++++ .../netapp/2024-03-01/backups/model_backup.go | 16 ++ .../2024-03-01/backups/model_backuppatch.go | 8 + .../backups/model_backuppatchproperties.go | 8 + .../backups/model_backupproperties.go | 36 ++++ .../backups/model_backuprestorefiles.go | 10 ++ .../backups/model_backupsmigrationrequest.go | 8 + .../2024-03-01/backups/model_backupstatus.go | 16 ++ .../netapp/2024-03-01/backups/predicates.go | 27 +++ .../netapp/2024-03-01/backups/version.go | 12 ++ .../backupvaults/README.md | 6 +- .../backupvaults/client.go | 0 .../backupvaults/id_backupvault.go | 0 .../backupvaults/id_netappaccount.go | 0 .../backupvaults/method_createorupdate.go | 0 .../backupvaults/method_delete.go | 0 .../backupvaults/method_get.go | 0 .../method_listbynetappaccount.go | 0 .../backupvaults/method_update.go | 0 .../backupvaults/model_backupvault.go | 0 .../backupvaults/model_backupvaultpatch.go | 0 .../model_backupvaultproperties.go | 0 .../backupvaults/predicates.go | 0 .../backupvaults/version.go | 2 +- .../capacitypools/README.md | 6 +- .../capacitypools/client.go | 0 .../capacitypools/constants.go | 0 .../capacitypools/id_capacitypool.go | 0 .../capacitypools/id_netappaccount.go | 0 .../method_poolscreateorupdate.go | 0 .../capacitypools/method_poolsdelete.go | 0 .../capacitypools/method_poolsget.go | 0 .../capacitypools/method_poolslist.go | 0 .../capacitypools/method_poolsupdate.go | 0 .../capacitypools/model_capacitypool.go | 0 .../capacitypools/model_capacitypoolpatch.go | 0 .../model_poolpatchproperties.go | 0 .../capacitypools/model_poolproperties.go | 0 .../capacitypools/predicates.go | 0 .../capacitypools/version.go | 2 +- .../netappaccounts/README.md | 6 +- .../netappaccounts/client.go | 0 .../netappaccounts/constants.go | 0 .../netappaccounts/id_netappaccount.go | 0 .../method_accountscreateorupdate.go | 0 .../netappaccounts/method_accountsdelete.go | 0 .../netappaccounts/method_accountsget.go | 0 .../netappaccounts/method_accountslist.go | 0 .../method_accountslistbysubscription.go | 0 .../method_accountsrenewcredentials.go | 0 .../netappaccounts/method_accountsupdate.go | 0 .../netappaccounts/model_accountencryption.go | 0 .../netappaccounts/model_accountproperties.go | 0 .../netappaccounts/model_activedirectory.go | 0 .../model_encryptionidentity.go | 0 .../model_keyvaultproperties.go | 2 +- .../model_ldapsearchscopeopt.go | 0 .../netappaccounts/model_netappaccount.go | 0 .../model_netappaccountpatch.go | 0 .../netappaccounts/predicates.go | 0 .../netappaccounts/version.go | 2 +- .../snapshotpolicy/README.md | 6 +- .../snapshotpolicy/client.go | 0 .../snapshotpolicy/id_netappaccount.go | 0 .../snapshotpolicy/id_snapshotpolicy.go | 0 .../method_snapshotpoliciescreate.go | 0 .../method_snapshotpoliciesdelete.go | 0 .../method_snapshotpoliciesget.go | 0 .../method_snapshotpolicieslist.go | 0 .../method_snapshotpoliciesupdate.go | 0 .../snapshotpolicy/model_dailyschedule.go | 0 .../snapshotpolicy/model_hourlyschedule.go | 0 .../snapshotpolicy/model_monthlyschedule.go | 0 .../model_snapshotpolicieslist.go | 0 .../snapshotpolicy/model_snapshotpolicy.go | 0 .../model_snapshotpolicypatch.go | 0 .../model_snapshotpolicyproperties.go | 0 .../snapshotpolicy/model_weeklyschedule.go | 0 .../snapshotpolicy/version.go | 2 +- .../snapshots/README.md | 6 +- .../snapshots/client.go | 0 .../snapshots/id_snapshot.go | 0 .../snapshots/id_volume.go | 0 .../snapshots/method_create.go | 0 .../snapshots/method_delete.go | 0 .../snapshots/method_get.go | 0 .../snapshots/method_list.go | 0 .../snapshots/method_restorefiles.go | 0 .../snapshots/method_update.go | 0 .../snapshots/model_snapshot.go | 0 .../snapshots/model_snapshotproperties.go | 0 .../snapshots/model_snapshotrestorefiles.go | 0 .../snapshots/model_snapshotslist.go | 0 .../snapshots/version.go | 2 +- .../volumegroups/README.md | 6 +- .../volumegroups/client.go | 0 .../volumegroups/constants.go | 0 .../volumegroups/id_netappaccount.go | 0 .../volumegroups/id_volumegroup.go | 0 .../volumegroups/method_create.go | 0 .../volumegroups/method_delete.go | 0 .../volumegroups/method_get.go | 0 .../method_listbynetappaccount.go | 0 .../volumegroups/model_exportpolicyrule.go | 0 .../model_mounttargetproperties.go | 0 .../model_placementkeyvaluepairs.go | 0 .../volumegroups/model_replicationobject.go | 0 .../model_volumebackupproperties.go | 0 .../volumegroups/model_volumegroup.go | 0 .../volumegroups/model_volumegroupdetails.go | 0 .../volumegroups/model_volumegrouplist.go | 0 .../model_volumegrouplistproperties.go | 0 .../volumegroups/model_volumegroupmetadata.go | 0 .../model_volumegroupproperties.go | 0 .../model_volumegroupvolumeproperties.go | 0 .../volumegroups/model_volumeproperties.go | 0 .../model_volumepropertiesdataprotection.go | 0 .../model_volumepropertiesexportpolicy.go | 0 .../model_volumerelocationproperties.go | 0 .../model_volumesnapshotproperties.go | 0 .../volumegroups/version.go | 2 +- .../volumequotarules/README.md | 6 +- .../volumequotarules/client.go | 0 .../volumequotarules/constants.go | 0 .../volumequotarules/id_volume.go | 0 .../volumequotarules/id_volumequotarule.go | 0 .../volumequotarules/method_create.go | 0 .../volumequotarules/method_delete.go | 0 .../volumequotarules/method_get.go | 0 .../volumequotarules/method_listbyvolume.go | 0 .../volumequotarules/method_update.go | 0 .../volumequotarules/model_volumequotarule.go | 0 .../model_volumequotarulepatch.go | 0 .../model_volumequotaruleslist.go | 0 .../model_volumequotarulesproperties.go | 0 .../volumequotarules/version.go | 2 +- .../volumes/README.md | 6 +- .../volumes/client.go | 0 .../volumes/constants.go | 0 .../volumes/id_capacitypool.go | 0 .../volumes/id_volume.go | 0 .../volumes/method_createorupdate.go | 0 .../volumes/method_delete.go | 0 .../volumes/method_get.go | 0 .../volumes/method_list.go | 0 .../method_populateavailabilityzone.go | 0 .../volumes/method_update.go | 0 .../volumes/model_exportpolicyrule.go | 0 .../volumes/model_mounttargetproperties.go | 0 .../volumes/model_placementkeyvaluepairs.go | 0 .../volumes/model_replicationobject.go | 0 .../volumes/model_volume.go | 0 .../volumes/model_volumebackupproperties.go | 0 .../volumes/model_volumepatch.go | 0 .../volumes/model_volumepatchproperties.go | 0 ...del_volumepatchpropertiesdataprotection.go | 0 ...model_volumepatchpropertiesexportpolicy.go | 0 .../volumes/model_volumeproperties.go | 0 .../model_volumepropertiesdataprotection.go | 0 .../model_volumepropertiesexportpolicy.go | 0 .../model_volumerelocationproperties.go | 0 .../volumes/model_volumesnapshotproperties.go | 0 .../volumes/predicates.go | 0 .../volumes/version.go | 2 +- .../volumesreplication/README.md | 6 +- .../volumesreplication/client.go | 0 .../volumesreplication/constants.go | 0 .../volumesreplication/id_volume.go | 0 .../method_volumesauthorizereplication.go | 0 .../method_volumesbreakreplication.go | 0 .../method_volumesdeletereplication.go | 0 .../method_volumeslistreplications.go | 0 .../method_volumesreestablishreplication.go | 0 .../method_volumesreinitializereplication.go | 0 .../method_volumesreplicationstatus.go | 0 .../method_volumesresyncreplication.go | 0 .../model_authorizerequest.go | 0 .../model_breakreplicationrequest.go | 0 .../model_listreplications.go | 0 .../model_reestablishreplicationrequest.go | 0 .../volumesreplication/model_replication.go | 1 + .../model_replicationstatus.go | 0 .../volumesreplication/version.go | 2 +- .../go-azure-sdk/sdk/client/msgraph/client.go | 7 +- .../sdk/client/resourcemanager/client.go | 7 +- .../sdk/client/resourcemanager/poller_lro.go | 32 ++-- .../resourcemanager/poller_lro_statuses.go | 3 + .../poller_provisioning_state.go | 10 +- .../sdk/environments/application_ids.go | 9 +- .../sdk/environments/constants.go | 9 +- 220 files changed, 2609 insertions(+), 66 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciescreate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesdelete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicieslist.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicy.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicypatch.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicyproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_volumebackups.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underaccountmigratebackups.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underbackupvaultrestorefiles.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_undervolumemigratebackups.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatch.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatchproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuprestorefiles.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupsmigrationrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupstatus.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/id_backupvault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/method_listbynetappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/model_backupvault.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/model_backupvaultpatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/model_backupvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/backupvaults/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/id_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/method_poolscreateorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/method_poolsdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/method_poolsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/method_poolslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/method_poolsupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/model_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/model_capacitypoolpatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/model_poolpatchproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/model_poolproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/capacitypools/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountscreateorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountsdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountslistbysubscription.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountsrenewcredentials.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/method_accountsupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_accountencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_accountproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_activedirectory.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_encryptionidentity.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_keyvaultproperties.go (85%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_ldapsearchscopeopt.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/model_netappaccountpatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/netappaccounts/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/id_snapshotpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/method_snapshotpoliciescreate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/method_snapshotpoliciesdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/method_snapshotpoliciesget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/method_snapshotpolicieslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/method_snapshotpoliciesupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_dailyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_hourlyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_monthlyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_snapshotpolicieslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_snapshotpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_snapshotpolicypatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_snapshotpolicyproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/model_weeklyschedule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshotpolicy/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/id_snapshot.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_restorefiles.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/model_snapshot.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/model_snapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/model_snapshotrestorefiles.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/model_snapshotslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/snapshots/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/id_netappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/id_volumegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/method_listbynetappaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_exportpolicyrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_mounttargetproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_placementkeyvaluepairs.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_replicationobject.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumebackupproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegroupdetails.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegrouplist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegrouplistproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegroupmetadata.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegroupproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumegroupvolumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumepropertiesdataprotection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumepropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumerelocationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/model_volumesnapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumegroups/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/id_volumequotarule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/method_listbyvolume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/model_volumequotarule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/model_volumequotarulepatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/model_volumequotaruleslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/model_volumequotarulesproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumequotarules/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/id_capacitypool.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_populateavailabilityzone.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_exportpolicyrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_mounttargetproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_placementkeyvaluepairs.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_replicationobject.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumebackupproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepatch.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepatchproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepatchpropertiesdataprotection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepatchpropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumeproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepropertiesdataprotection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumepropertiesexportpolicy.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumerelocationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/model_volumesnapshotproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumes/version.go (88%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/id_volume.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesauthorizereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesbreakreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesdeletereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumeslistreplications.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesreestablishreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesreinitializereplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesreplicationstatus.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/method_volumesresyncreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_authorizerequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_breakreplicationrequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_listreplications.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_reestablishreplicationrequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_replication.go (87%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/model_replicationstatus.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/{2023-11-01 => 2024-03-01}/volumesreplication/version.go (88%) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md new file mode 100644 index 000000000000..7d4818124687 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md @@ -0,0 +1,98 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy` Documentation + +The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2024-03-01/backuppolicy" +``` + + +### Client Initialization + +```go +client := backuppolicy.NewBackupPolicyClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupPolicyClient.BackupPoliciesCreate` + +```go +ctx := context.TODO() +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") + +payload := backuppolicy.BackupPolicy{ + // ... +} + + +if err := client.BackupPoliciesCreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupPolicyClient.BackupPoliciesDelete` + +```go +ctx := context.TODO() +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") + +if err := client.BackupPoliciesDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupPolicyClient.BackupPoliciesGet` + +```go +ctx := context.TODO() +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") + +read, err := client.BackupPoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupPolicyClient.BackupPoliciesList` + +```go +ctx := context.TODO() +id := backuppolicy.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") + +read, err := client.BackupPoliciesList(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupPolicyClient.BackupPoliciesUpdate` + +```go +ctx := context.TODO() +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") + +payload := backuppolicy.BackupPolicyPatch{ + // ... +} + + +if err := client.BackupPoliciesUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go new file mode 100644 index 000000000000..1db45e634e56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go @@ -0,0 +1,26 @@ +package backuppolicy + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPolicyClient struct { + Client *resourcemanager.Client +} + +func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) + } + + return &BackupPolicyClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go new file mode 100644 index 000000000000..9f45aceef308 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go @@ -0,0 +1,139 @@ +package backuppolicy + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&BackupPolicyId{}) +} + +var _ resourceids.ResourceId = &BackupPolicyId{} + +// BackupPolicyId is a struct representing the Resource ID for a Backup Policy +type BackupPolicyId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string + BackupPolicyName string +} + +// NewBackupPolicyID returns a new BackupPolicyId struct +func NewBackupPolicyID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupPolicyName string) BackupPolicyId { + return BackupPolicyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + BackupPolicyName: backupPolicyName, + } +} + +// ParseBackupPolicyID parses 'input' into a BackupPolicyId +func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupPolicyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBackupPolicyIDInsensitively parses 'input' case-insensitively into a BackupPolicyId +// note: this method should only be used for API response data and not user input +func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupPolicyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupPolicyId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + if id.BackupPolicyName, ok = input.Parsed["backupPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", input) + } + + return nil +} + +// ValidateBackupPolicyID checks that 'input' can be parsed as a Backup Policy ID +func ValidateBackupPolicyID(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 := ParseBackupPolicyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Backup Policy ID +func (id BackupPolicyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s/backupPolicies/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupPolicyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Backup Policy ID +func (id BackupPolicyId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.StaticSegment("staticBackupPolicies", "backupPolicies", "backupPolicies"), + resourceids.UserSpecifiedSegment("backupPolicyName", "backupPolicyValue"), + } +} + +// String returns a human-readable description of this Backup Policy ID +func (id BackupPolicyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + fmt.Sprintf("Backup Policy Name: %q", id.BackupPolicyName), + } + return fmt.Sprintf("Backup Policy (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go new file mode 100644 index 000000000000..d722f9a676d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go @@ -0,0 +1,130 @@ +package backuppolicy + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&NetAppAccountId{}) +} + +var _ resourceids.ResourceId = &NetAppAccountId{} + +// NetAppAccountId is a struct representing the Resource ID for a Net App Account +type NetAppAccountId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string +} + +// NewNetAppAccountID returns a new NetAppAccountId struct +func NewNetAppAccountID(subscriptionId string, resourceGroupName string, netAppAccountName string) NetAppAccountId { + return NetAppAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + } +} + +// ParseNetAppAccountID parses 'input' into a NetAppAccountId +func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseNetAppAccountIDInsensitively parses 'input' case-insensitively into a NetAppAccountId +// note: this method should only be used for API response data and not user input +func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetAppAccountId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + return nil +} + +// ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID +func ValidateNetAppAccountID(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 := ParseNetAppAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Net App Account ID +func (id NetAppAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Net App Account ID +func (id NetAppAccountId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + } +} + +// String returns a human-readable description of this Net App Account ID +func (id NetAppAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + } + return fmt.Sprintf("Net App Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciescreate.go new file mode 100644 index 000000000000..bb886f447546 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciescreate.go @@ -0,0 +1,76 @@ +package backuppolicy + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesCreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BackupPolicy +} + +// BackupPoliciesCreate ... +func (c BackupPolicyClient) BackupPoliciesCreate(ctx context.Context, id BackupPolicyId, input BackupPolicy) (result BackupPoliciesCreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// BackupPoliciesCreateThenPoll performs BackupPoliciesCreate then polls until it's completed +func (c BackupPolicyClient) BackupPoliciesCreateThenPoll(ctx context.Context, id BackupPolicyId, input BackupPolicy) error { + result, err := c.BackupPoliciesCreate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing BackupPoliciesCreate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after BackupPoliciesCreate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesdelete.go new file mode 100644 index 000000000000..482cdc1780e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesdelete.go @@ -0,0 +1,71 @@ +package backuppolicy + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// BackupPoliciesDelete ... +func (c BackupPolicyClient) BackupPoliciesDelete(ctx context.Context, id BackupPolicyId) (result BackupPoliciesDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// BackupPoliciesDeleteThenPoll performs BackupPoliciesDelete then polls until it's completed +func (c BackupPolicyClient) BackupPoliciesDeleteThenPoll(ctx context.Context, id BackupPolicyId) error { + result, err := c.BackupPoliciesDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing BackupPoliciesDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after BackupPoliciesDelete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go new file mode 100644 index 000000000000..73667d207d31 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go @@ -0,0 +1,54 @@ +package backuppolicy + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BackupPolicy +} + +// BackupPoliciesGet ... +func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPolicyId) (result BackupPoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model BackupPolicy + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go new file mode 100644 index 000000000000..7a939318453d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go @@ -0,0 +1,55 @@ +package backuppolicy + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BackupPoliciesList +} + +// BackupPoliciesList ... +func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAccountId) (result BackupPoliciesListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/backupPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model BackupPoliciesList + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesupdate.go new file mode 100644 index 000000000000..b24e23a21cf1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesupdate.go @@ -0,0 +1,75 @@ +package backuppolicy + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BackupPolicy +} + +// BackupPoliciesUpdate ... +func (c BackupPolicyClient) BackupPoliciesUpdate(ctx context.Context, id BackupPolicyId, input BackupPolicyPatch) (result BackupPoliciesUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// BackupPoliciesUpdateThenPoll performs BackupPoliciesUpdate then polls until it's completed +func (c BackupPolicyClient) BackupPoliciesUpdateThenPoll(ctx context.Context, id BackupPolicyId, input BackupPolicyPatch) error { + result, err := c.BackupPoliciesUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing BackupPoliciesUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after BackupPoliciesUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicieslist.go new file mode 100644 index 000000000000..3db3d131a60e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicieslist.go @@ -0,0 +1,8 @@ +package backuppolicy + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPoliciesList struct { + Value *[]BackupPolicy `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicy.go new file mode 100644 index 000000000000..747ab65be24b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicy.go @@ -0,0 +1,19 @@ +package backuppolicy + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPolicy struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties BackupPolicyProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,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/netapp/2024-03-01/backuppolicy/model_backuppolicypatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicypatch.go new file mode 100644 index 000000000000..bf7eecb1358e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicypatch.go @@ -0,0 +1,13 @@ +package backuppolicy + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPolicyPatch struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *BackupPolicyProperties `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/netapp/2024-03-01/backuppolicy/model_backuppolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicyproperties.go new file mode 100644 index 000000000000..d5694f4797d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_backuppolicyproperties.go @@ -0,0 +1,15 @@ +package backuppolicy + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPolicyProperties struct { + BackupPolicyId *string `json:"backupPolicyId,omitempty"` + DailyBackupsToKeep *int64 `json:"dailyBackupsToKeep,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + MonthlyBackupsToKeep *int64 `json:"monthlyBackupsToKeep,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + VolumeBackups *[]VolumeBackups `json:"volumeBackups,omitempty"` + VolumesAssigned *int64 `json:"volumesAssigned,omitempty"` + WeeklyBackupsToKeep *int64 `json:"weeklyBackupsToKeep,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_volumebackups.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_volumebackups.go new file mode 100644 index 000000000000..b53afb9ae148 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/model_volumebackups.go @@ -0,0 +1,11 @@ +package backuppolicy + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeBackups struct { + BackupsCount *int64 `json:"backupsCount,omitempty"` + PolicyEnabled *bool `json:"policyEnabled,omitempty"` + VolumeName *string `json:"volumeName,omitempty"` + VolumeResourceId *string `json:"volumeResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go new file mode 100644 index 000000000000..e96943db05e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go @@ -0,0 +1,12 @@ +package backuppolicy + +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-03-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md new file mode 100644 index 000000000000..5f247f25d5a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md @@ -0,0 +1,166 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups` Documentation + +The `backups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2024-03-01/backups" +``` + + +### Client Initialization + +```go +client := backups.NewBackupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupsClient.Create` + +```go +ctx := context.TODO() +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") + +payload := backups.Backup{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsClient.Delete` + +```go +ctx := context.TODO() +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsClient.Get` + +```go +ctx := context.TODO() +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") + +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: `BackupsClient.GetLatestStatus` + +```go +ctx := context.TODO() +id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue") + +read, err := client.GetLatestStatus(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupsClient.ListByVault` + +```go +ctx := context.TODO() +id := backups.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") + +// alternatively `client.ListByVault(ctx, id, backups.DefaultListByVaultOperationOptions())` can be used to do batched pagination +items, err := client.ListByVaultComplete(ctx, id, backups.DefaultListByVaultOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BackupsClient.UnderAccountMigrateBackups` + +```go +ctx := context.TODO() +id := backups.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") + +payload := backups.BackupsMigrationRequest{ + // ... +} + + +if err := client.UnderAccountMigrateBackupsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsClient.UnderBackupVaultRestoreFiles` + +```go +ctx := context.TODO() +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") + +payload := backups.BackupRestoreFiles{ + // ... +} + + +if err := client.UnderBackupVaultRestoreFilesThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsClient.UnderVolumeMigrateBackups` + +```go +ctx := context.TODO() +id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue") + +payload := backups.BackupsMigrationRequest{ + // ... +} + + +if err := client.UnderVolumeMigrateBackupsThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsClient.Update` + +```go +ctx := context.TODO() +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") + +payload := backups.BackupPatch{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go new file mode 100644 index 000000000000..a0f81d2a6aba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go @@ -0,0 +1,26 @@ +package backups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupsClient struct { + Client *resourcemanager.Client +} + +func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) + } + + return &BackupsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/constants.go new file mode 100644 index 000000000000..d3c86cd75c04 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/constants.go @@ -0,0 +1,142 @@ +package backups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupType string + +const ( + BackupTypeManual BackupType = "Manual" + BackupTypeScheduled BackupType = "Scheduled" +) + +func PossibleValuesForBackupType() []string { + return []string{ + string(BackupTypeManual), + string(BackupTypeScheduled), + } +} + +func (s *BackupType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupType(input string) (*BackupType, error) { + vals := map[string]BackupType{ + "manual": BackupTypeManual, + "scheduled": BackupTypeScheduled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupType(input) + return &out, nil +} + +type MirrorState string + +const ( + MirrorStateBroken MirrorState = "Broken" + MirrorStateMirrored MirrorState = "Mirrored" + MirrorStateUninitialized MirrorState = "Uninitialized" +) + +func PossibleValuesForMirrorState() []string { + return []string{ + string(MirrorStateBroken), + string(MirrorStateMirrored), + string(MirrorStateUninitialized), + } +} + +func (s *MirrorState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMirrorState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMirrorState(input string) (*MirrorState, error) { + vals := map[string]MirrorState{ + "broken": MirrorStateBroken, + "mirrored": MirrorStateMirrored, + "uninitialized": MirrorStateUninitialized, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MirrorState(input) + return &out, nil +} + +type RelationshipStatus string + +const ( + RelationshipStatusFailed RelationshipStatus = "Failed" + RelationshipStatusIdle RelationshipStatus = "Idle" + RelationshipStatusTransferring RelationshipStatus = "Transferring" + RelationshipStatusUnknown RelationshipStatus = "Unknown" +) + +func PossibleValuesForRelationshipStatus() []string { + return []string{ + string(RelationshipStatusFailed), + string(RelationshipStatusIdle), + string(RelationshipStatusTransferring), + string(RelationshipStatusUnknown), + } +} + +func (s *RelationshipStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRelationshipStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRelationshipStatus(input string) (*RelationshipStatus, error) { + vals := map[string]RelationshipStatus{ + "failed": RelationshipStatusFailed, + "idle": RelationshipStatusIdle, + "transferring": RelationshipStatusTransferring, + "unknown": RelationshipStatusUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RelationshipStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go new file mode 100644 index 000000000000..4af4424ea146 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go @@ -0,0 +1,148 @@ +package backups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&BackupId{}) +} + +var _ resourceids.ResourceId = &BackupId{} + +// BackupId is a struct representing the Resource ID for a Backup +type BackupId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string + BackupVaultName string + BackupName string +} + +// NewBackupID returns a new BackupId struct +func NewBackupID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupVaultName string, backupName string) BackupId { + return BackupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + BackupVaultName: backupVaultName, + BackupName: backupName, + } +} + +// ParseBackupID parses 'input' into a BackupId +func ParseBackupID(input string) (*BackupId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBackupIDInsensitively parses 'input' case-insensitively into a BackupId +// note: this method should only be used for API response data and not user input +func ParseBackupIDInsensitively(input string) (*BackupId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) + } + + if id.BackupName, ok = input.Parsed["backupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupName", input) + } + + return nil +} + +// ValidateBackupID checks that 'input' can be parsed as a Backup ID +func ValidateBackupID(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 := ParseBackupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Backup ID +func (id BackupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s/backupVaults/%s/backups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName, id.BackupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Backup ID +func (id BackupId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + resourceids.StaticSegment("staticBackups", "backups", "backups"), + resourceids.UserSpecifiedSegment("backupName", "backupValue"), + } +} + +// String returns a human-readable description of this Backup ID +func (id BackupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + fmt.Sprintf("Backup Vault Name: %q", id.BackupVaultName), + fmt.Sprintf("Backup Name: %q", id.BackupName), + } + return fmt.Sprintf("Backup (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go new file mode 100644 index 000000000000..930429185338 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go @@ -0,0 +1,139 @@ +package backups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&BackupVaultId{}) +} + +var _ resourceids.ResourceId = &BackupVaultId{} + +// BackupVaultId is a struct representing the Resource ID for a Backup Vault +type BackupVaultId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string + BackupVaultName string +} + +// NewBackupVaultID returns a new BackupVaultId struct +func NewBackupVaultID(subscriptionId string, resourceGroupName string, netAppAccountName string, backupVaultName string) BackupVaultId { + return BackupVaultId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + BackupVaultName: backupVaultName, + } +} + +// ParseBackupVaultID parses 'input' into a BackupVaultId +func ParseBackupVaultID(input string) (*BackupVaultId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupVaultId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBackupVaultIDInsensitively parses 'input' case-insensitively into a BackupVaultId +// note: this method should only be used for API response data and not user input +func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupVaultId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupVaultId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) + } + + return nil +} + +// ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID +func ValidateBackupVaultID(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 := ParseBackupVaultID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Backup Vault ID +func (id BackupVaultId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s/backupVaults/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Backup Vault ID +func (id BackupVaultId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + } +} + +// String returns a human-readable description of this Backup Vault ID +func (id BackupVaultId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + fmt.Sprintf("Backup Vault Name: %q", id.BackupVaultName), + } + return fmt.Sprintf("Backup Vault (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go new file mode 100644 index 000000000000..26feaa5e8b27 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go @@ -0,0 +1,130 @@ +package backups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&NetAppAccountId{}) +} + +var _ resourceids.ResourceId = &NetAppAccountId{} + +// NetAppAccountId is a struct representing the Resource ID for a Net App Account +type NetAppAccountId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string +} + +// NewNetAppAccountID returns a new NetAppAccountId struct +func NewNetAppAccountID(subscriptionId string, resourceGroupName string, netAppAccountName string) NetAppAccountId { + return NetAppAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + } +} + +// ParseNetAppAccountID parses 'input' into a NetAppAccountId +func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseNetAppAccountIDInsensitively parses 'input' case-insensitively into a NetAppAccountId +// note: this method should only be used for API response data and not user input +func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetAppAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetAppAccountId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + return nil +} + +// ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID +func ValidateNetAppAccountID(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 := ParseNetAppAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Net App Account ID +func (id NetAppAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Net App Account ID +func (id NetAppAccountId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + } +} + +// String returns a human-readable description of this Net App Account ID +func (id NetAppAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + } + return fmt.Sprintf("Net App Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go new file mode 100644 index 000000000000..839d08e459e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go @@ -0,0 +1,148 @@ +package backups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&VolumeId{}) +} + +var _ resourceids.ResourceId = &VolumeId{} + +// VolumeId is a struct representing the Resource ID for a Volume +type VolumeId struct { + SubscriptionId string + ResourceGroupName string + NetAppAccountName string + CapacityPoolName string + VolumeName string +} + +// NewVolumeID returns a new VolumeId struct +func NewVolumeID(subscriptionId string, resourceGroupName string, netAppAccountName string, capacityPoolName string, volumeName string) VolumeId { + return VolumeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetAppAccountName: netAppAccountName, + CapacityPoolName: capacityPoolName, + VolumeName: volumeName, + } +} + +// ParseVolumeID parses 'input' into a VolumeId +func ParseVolumeID(input string) (*VolumeId, error) { + parser := resourceids.NewParserFromResourceIdType(&VolumeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseVolumeIDInsensitively parses 'input' case-insensitively into a VolumeId +// note: this method should only be used for API response data and not user input +func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { + parser := resourceids.NewParserFromResourceIdType(&VolumeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VolumeId) 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.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) + } + + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) + } + + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) + } + + return nil +} + +// ValidateVolumeID checks that 'input' can be parsed as a Volume ID +func ValidateVolumeID(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 := ParseVolumeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Volume ID +func (id VolumeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetApp/netAppAccounts/%s/capacityPools/%s/volumes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Volume ID +func (id VolumeId) 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("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), + resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.StaticSegment("staticCapacityPools", "capacityPools", "capacityPools"), + resourceids.UserSpecifiedSegment("capacityPoolName", "capacityPoolValue"), + resourceids.StaticSegment("staticVolumes", "volumes", "volumes"), + resourceids.UserSpecifiedSegment("volumeName", "volumeValue"), + } +} + +// String returns a human-readable description of this Volume ID +func (id VolumeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Net App Account Name: %q", id.NetAppAccountName), + fmt.Sprintf("Capacity Pool Name: %q", id.CapacityPoolName), + fmt.Sprintf("Volume Name: %q", id.VolumeName), + } + return fmt.Sprintf("Volume (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_create.go new file mode 100644 index 000000000000..547e1883e1f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_create.go @@ -0,0 +1,75 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Backup +} + +// Create ... +func (c BackupsClient) Create(ctx context.Context, id BackupId, input Backup) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c BackupsClient) CreateThenPoll(ctx context.Context, id BackupId, input Backup) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_delete.go new file mode 100644 index 000000000000..15a40b88c3cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_delete.go @@ -0,0 +1,70 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c BackupsClient) Delete(ctx context.Context, id BackupId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c BackupsClient) DeleteThenPoll(ctx context.Context, id BackupId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go new file mode 100644 index 000000000000..65321ba9ef6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go @@ -0,0 +1,54 @@ +package backups + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 + OData *odata.OData + Model *Backup +} + +// Get ... +func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Backup + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go new file mode 100644 index 000000000000..dcd2709c74ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go @@ -0,0 +1,55 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetLatestStatusOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BackupStatus +} + +// GetLatestStatus ... +func (c BackupsClient) GetLatestStatus(ctx context.Context, id VolumeId) (result GetLatestStatusOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/latestBackupStatus/current", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model BackupStatus + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go new file mode 100644 index 000000000000..f92c1548b810 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go @@ -0,0 +1,133 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByVaultOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Backup +} + +type ListByVaultCompleteResult struct { + LatestHttpResponse *http.Response + Items []Backup +} + +type ListByVaultOperationOptions struct { + Filter *string +} + +func DefaultListByVaultOperationOptions() ListByVaultOperationOptions { + return ListByVaultOperationOptions{} +} + +func (o ListByVaultOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ListByVaultOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ListByVaultOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + return &out +} + +type ListByVaultCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByVaultCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByVault ... +func (c BackupsClient) ListByVault(ctx context.Context, id BackupVaultId, options ListByVaultOperationOptions) (result ListByVaultOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ListByVaultCustomPager{}, + Path: fmt.Sprintf("%s/backups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Backup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByVaultComplete retrieves all the results into a single object +func (c BackupsClient) ListByVaultComplete(ctx context.Context, id BackupVaultId, options ListByVaultOperationOptions) (ListByVaultCompleteResult, error) { + return c.ListByVaultCompleteMatchingPredicate(ctx, id, options, BackupOperationPredicate{}) +} + +// ListByVaultCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BackupsClient) ListByVaultCompleteMatchingPredicate(ctx context.Context, id BackupVaultId, options ListByVaultOperationOptions, predicate BackupOperationPredicate) (result ListByVaultCompleteResult, err error) { + items := make([]Backup, 0) + + resp, err := c.ListByVault(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByVaultCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underaccountmigratebackups.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underaccountmigratebackups.go new file mode 100644 index 000000000000..d8792fed2b6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underaccountmigratebackups.go @@ -0,0 +1,73 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UnderAccountMigrateBackupsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// UnderAccountMigrateBackups ... +func (c BackupsClient) UnderAccountMigrateBackups(ctx context.Context, id NetAppAccountId, input BackupsMigrationRequest) (result UnderAccountMigrateBackupsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/migrateBackups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UnderAccountMigrateBackupsThenPoll performs UnderAccountMigrateBackups then polls until it's completed +func (c BackupsClient) UnderAccountMigrateBackupsThenPoll(ctx context.Context, id NetAppAccountId, input BackupsMigrationRequest) error { + result, err := c.UnderAccountMigrateBackups(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UnderAccountMigrateBackups: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UnderAccountMigrateBackups: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underbackupvaultrestorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underbackupvaultrestorefiles.go new file mode 100644 index 000000000000..fae1ff9c3ac0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_underbackupvaultrestorefiles.go @@ -0,0 +1,73 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UnderBackupVaultRestoreFilesOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// UnderBackupVaultRestoreFiles ... +func (c BackupsClient) UnderBackupVaultRestoreFiles(ctx context.Context, id BackupId, input BackupRestoreFiles) (result UnderBackupVaultRestoreFilesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/restoreFiles", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UnderBackupVaultRestoreFilesThenPoll performs UnderBackupVaultRestoreFiles then polls until it's completed +func (c BackupsClient) UnderBackupVaultRestoreFilesThenPoll(ctx context.Context, id BackupId, input BackupRestoreFiles) error { + result, err := c.UnderBackupVaultRestoreFiles(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UnderBackupVaultRestoreFiles: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UnderBackupVaultRestoreFiles: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_undervolumemigratebackups.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_undervolumemigratebackups.go new file mode 100644 index 000000000000..1bbdca6b0841 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_undervolumemigratebackups.go @@ -0,0 +1,73 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UnderVolumeMigrateBackupsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// UnderVolumeMigrateBackups ... +func (c BackupsClient) UnderVolumeMigrateBackups(ctx context.Context, id VolumeId, input BackupsMigrationRequest) (result UnderVolumeMigrateBackupsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/migrateBackups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UnderVolumeMigrateBackupsThenPoll performs UnderVolumeMigrateBackups then polls until it's completed +func (c BackupsClient) UnderVolumeMigrateBackupsThenPoll(ctx context.Context, id VolumeId, input BackupsMigrationRequest) error { + result, err := c.UnderVolumeMigrateBackups(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UnderVolumeMigrateBackups: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UnderVolumeMigrateBackups: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_update.go new file mode 100644 index 000000000000..0a8669d7caa4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_update.go @@ -0,0 +1,75 @@ +package backups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Backup +} + +// Update ... +func (c BackupsClient) Update(ctx context.Context, id BackupId, input BackupPatch) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c BackupsClient) UpdateThenPoll(ctx context.Context, id BackupId, input BackupPatch) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backup.go new file mode 100644 index 000000000000..ef5ef0a7bc60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backup.go @@ -0,0 +1,16 @@ +package backups + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Backup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties BackupProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatch.go new file mode 100644 index 000000000000..a87251f4b0c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatch.go @@ -0,0 +1,8 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPatch struct { + Properties *BackupPatchProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatchproperties.go new file mode 100644 index 000000000000..b374bda31438 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuppatchproperties.go @@ -0,0 +1,8 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupPatchProperties struct { + Label *string `json:"label,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupproperties.go new file mode 100644 index 000000000000..168aa8182a95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupproperties.go @@ -0,0 +1,36 @@ +package backups + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupProperties struct { + BackupId *string `json:"backupId,omitempty"` + BackupPolicyResourceId *string `json:"backupPolicyResourceId,omitempty"` + BackupType *BackupType `json:"backupType,omitempty"` + CreationDate *string `json:"creationDate,omitempty"` + FailureReason *string `json:"failureReason,omitempty"` + Label *string `json:"label,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Size *int64 `json:"size,omitempty"` + SnapshotName *string `json:"snapshotName,omitempty"` + UseExistingSnapshot *bool `json:"useExistingSnapshot,omitempty"` + VolumeResourceId string `json:"volumeResourceId"` +} + +func (o *BackupProperties) GetCreationDateAsTime() (*time.Time, error) { + if o.CreationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *BackupProperties) SetCreationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuprestorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuprestorefiles.go new file mode 100644 index 000000000000..e26ce886407f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backuprestorefiles.go @@ -0,0 +1,10 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupRestoreFiles struct { + DestinationVolumeId string `json:"destinationVolumeId"` + FileList []string `json:"fileList"` + RestoreFilePath *string `json:"restoreFilePath,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupsmigrationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupsmigrationrequest.go new file mode 100644 index 000000000000..f0fb612b507d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupsmigrationrequest.go @@ -0,0 +1,8 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupsMigrationRequest struct { + BackupVaultId string `json:"backupVaultId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupstatus.go new file mode 100644 index 000000000000..e873cd9463d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/model_backupstatus.go @@ -0,0 +1,16 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupStatus struct { + ErrorMessage *string `json:"errorMessage,omitempty"` + Healthy *bool `json:"healthy,omitempty"` + LastTransferSize *int64 `json:"lastTransferSize,omitempty"` + LastTransferType *string `json:"lastTransferType,omitempty"` + MirrorState *MirrorState `json:"mirrorState,omitempty"` + RelationshipStatus *RelationshipStatus `json:"relationshipStatus,omitempty"` + TotalTransferBytes *int64 `json:"totalTransferBytes,omitempty"` + TransferProgressBytes *int64 `json:"transferProgressBytes,omitempty"` + UnhealthyReason *string `json:"unhealthyReason,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/predicates.go new file mode 100644 index 000000000000..f5033a2bb91f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/predicates.go @@ -0,0 +1,27 @@ +package backups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p BackupOperationPredicate) Matches(input Backup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go new file mode 100644 index 000000000000..4595bccaa3c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go @@ -0,0 +1,12 @@ +package backups + +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-03-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md index e06b4ae1999c..e808dcbd596e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/backupvaults" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_listbynetappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_listbynetappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_listbynetappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvaultpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvaultpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/model_backupvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/model_backupvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go index 742a32aa4616..029ef1334e25 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md index 6db036a47854..59cd65e46cee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/capacitypools" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/method_poolsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/method_poolsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypoolpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_capacitypoolpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_capacitypoolpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_capacitypoolpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_poolpatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolpatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_poolpatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_poolproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/model_poolproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/model_poolproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go index 54c4a477f546..a54b7e07c217 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md index 9d541bb9ec42..553ff9ba984d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/netappaccounts" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountscreateorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountscreateorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountscreateorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslistbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountslistbysubscription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountslistbysubscription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountslistbysubscription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsrenewcredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsrenewcredentials.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsrenewcredentials.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsrenewcredentials.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_accountencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_accountencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_accountproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_accountproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_accountproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_activedirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_activedirectory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_activedirectory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_activedirectory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_encryptionidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_encryptionidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_encryptionidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_encryptionidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_keyvaultproperties.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_keyvaultproperties.go index ac5d8c6afa48..f4722a948a2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_keyvaultproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_keyvaultproperties.go @@ -6,7 +6,7 @@ package netappaccounts type KeyVaultProperties struct { KeyName string `json:"keyName"` KeyVaultId *string `json:"keyVaultId,omitempty"` - KeyVaultResourceId string `json:"keyVaultResourceId"` + KeyVaultResourceId *string `json:"keyVaultResourceId,omitempty"` KeyVaultUri string `json:"keyVaultUri"` Status *KeyVaultStatus `json:"status,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_ldapsearchscopeopt.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_ldapsearchscopeopt.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_ldapsearchscopeopt.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_ldapsearchscopeopt.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccountpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_netappaccountpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/model_netappaccountpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/model_netappaccountpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go index 2fb0e0d3b5b7..e549100b56ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md index e5c48c02b7ec..7ada41404831 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/snapshotpolicy" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_dailyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_dailyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_dailyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_dailyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_hourlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_hourlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_hourlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_hourlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_monthlyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_monthlyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_monthlyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_monthlyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicieslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicieslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicieslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicypatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicypatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicypatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicypatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_snapshotpolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_snapshotpolicyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_weeklyschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_weeklyschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/model_weeklyschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/model_weeklyschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go index 4b716695a280..53f4f1296f15 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md index 4a8604cc08c1..1fc94878173a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/snapshots" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_restorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_restorefiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_restorefiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_restorefiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshot.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshot.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshot.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotrestorefiles.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotrestorefiles.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotrestorefiles.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotrestorefiles.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/model_snapshotslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/model_snapshotslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go index dba1cc342367..2ca03be14515 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md index 1424cd706bc0..cd133975cd86 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/volumegroups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_exportpolicyrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_exportpolicyrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_exportpolicyrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_exportpolicyrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_mounttargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_mounttargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_mounttargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_mounttargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_placementkeyvaluepairs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_placementkeyvaluepairs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_placementkeyvaluepairs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_placementkeyvaluepairs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_replicationobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_replicationobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_replicationobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_replicationobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumebackupproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumebackupproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumebackupproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupdetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupdetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupdetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegrouplist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegrouplist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplistproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegrouplistproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegrouplistproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegrouplistproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupmetadata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupmetadata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupmetadata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupvolumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupvolumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumegroupvolumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumegroupvolumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumepropertiesdataprotection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumepropertiesdataprotection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumepropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumepropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumepropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumerelocationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumerelocationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumerelocationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumerelocationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumesnapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumesnapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/model_volumesnapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/model_volumesnapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go index e9eb0225bac2..be6400a3a2b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md index 9deddc0c0e08..b001e5b7b262 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/volumequotarules" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulepatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarulepatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulepatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarulepatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotaruleslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotaruleslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotaruleslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotaruleslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarulesproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/model_volumequotarulesproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/model_volumequotarulesproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go index ee9371b563c2..7a5fa9210769 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md index 8172e40f4fe7..b2594356a192 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/volumes" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_populateavailabilityzone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_populateavailabilityzone.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_populateavailabilityzone.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_populateavailabilityzone.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_exportpolicyrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_exportpolicyrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_exportpolicyrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_exportpolicyrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_mounttargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_mounttargetproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_mounttargetproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_mounttargetproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_placementkeyvaluepairs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_placementkeyvaluepairs.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_placementkeyvaluepairs.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_placementkeyvaluepairs.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_replicationobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_replicationobject.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_replicationobject.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_replicationobject.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumebackupproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumebackupproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumebackupproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchpropertiesdataprotection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchpropertiesdataprotection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchpropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepatchpropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepatchpropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumeproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumeproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumeproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesdataprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepropertiesdataprotection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesdataprotection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepropertiesdataprotection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesexportpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepropertiesexportpolicy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumepropertiesexportpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumepropertiesexportpolicy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumerelocationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumerelocationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumerelocationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumerelocationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumesnapshotproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumesnapshotproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/model_volumesnapshotproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/model_volumesnapshotproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go index 3583fe71b164..6b764b88e877 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md index a2e754a7aca1..345be2df7235 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-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/netapp/2023-11-01/volumesreplication" +import "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesauthorizereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesauthorizereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesauthorizereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesauthorizereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesbreakreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesbreakreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesbreakreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesbreakreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesdeletereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesdeletereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesdeletereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesdeletereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreestablishreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreestablishreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreestablishreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreestablishreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreinitializereplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreinitializereplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreinitializereplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreinitializereplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesresyncreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesresyncreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesresyncreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesresyncreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_authorizerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_authorizerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_authorizerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_authorizerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_breakreplicationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_breakreplicationrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_breakreplicationrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_breakreplicationrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_listreplications.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_listreplications.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_listreplications.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_listreplications.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_reestablishreplicationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_reestablishreplicationrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_reestablishreplicationrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_reestablishreplicationrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_replication.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_replication.go index 06e345fdb5e6..ff1273507a2b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replication.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_replication.go @@ -7,5 +7,6 @@ type Replication struct { EndpointType *EndpointType `json:"endpointType,omitempty"` RemoteVolumeRegion *string `json:"remoteVolumeRegion,omitempty"` RemoteVolumeResourceId string `json:"remoteVolumeResourceId"` + ReplicationId *string `json:"replicationId,omitempty"` ReplicationSchedule *ReplicationSchedule `json:"replicationSchedule,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replicationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_replicationstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/model_replicationstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/model_replicationstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go index a9e89056628b..9ec37edb8f3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/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-11-01" +const defaultApiVersion = "2024-03-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go index 3cf67d08f25d..0a74b22cad1c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go @@ -35,7 +35,7 @@ type Client struct { tenantId string } -func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { +func NewClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { endpoint, ok := api.Endpoint() if !ok { return nil, fmt.Errorf("no `endpoint` was returned for this environment") @@ -49,6 +49,11 @@ func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVe }, nil } +// Deprecated: use NewClient instead +func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVersion) (*Client, error) { + return NewClient(api, serviceName, apiVersion) +} + func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go index 8c9b67a9c4fe..9cd3335f1ba8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go @@ -23,7 +23,7 @@ type Client struct { apiVersion string } -func NewResourceManagerClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { +func NewClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { endpoint, ok := api.Endpoint() if !ok { return nil, fmt.Errorf("no `endpoint` was returned for this environment") @@ -38,6 +38,11 @@ func NewResourceManagerClient(api environments.Api, serviceName, apiVersion stri }, nil } +// Deprecated: use NewClient instead +func NewResourceManagerClient(api environments.Api, serviceName, apiVersion string) (*Client, error) { + return NewClient(api, serviceName, apiVersion) +} + func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro.go index da08efa21e47..0eade8da42ee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro.go @@ -15,10 +15,8 @@ import ( "strings" "time" - "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/sdk/client" "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/odata" ) var _ pollers.PollerType = &longRunningOperationPoller{} @@ -79,14 +77,6 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers. return nil, fmt.Errorf("internal error: cannot poll without a pollingUrl") } - // Retry the polling operation if a 404 was returned - retryOn404 := func(resp *http.Response, _ *odata.OData) (bool, error) { - if resp != nil && response.WasStatusCode(resp, http.StatusNotFound) { - return true, nil - } - return false, nil - } - reqOpts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -94,11 +84,14 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers. http.StatusCreated, http.StatusAccepted, http.StatusNoContent, + + // NOTE: 404 doesn't want to be a retry since we already retry on 404 + http.StatusNotFound, }, HttpMethod: http.MethodGet, OptionsObject: nil, Path: p.pollingUrl.Path, - RetryFunc: client.RequestRetryAny(append(defaultRetryFunctions, retryOn404)...), + RetryFunc: client.RequestRetryAny(defaultRetryFunctions...), } // TODO: port over the `api-version` header @@ -135,6 +128,13 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers. } } + // We've just created/changed this resource, so it _should_ exist but some APIs + // return a 404 initially - so we should wait for that to complete for non-Delete LROs + if result.HttpResponse.StatusCode == http.StatusNotFound { + result.Status = pollers.PollingStatusInProgress + return + } + // 202's don't necessarily return a body, so there's nothing to deserialize if result.HttpResponse.StatusCode == http.StatusAccepted { result.Status = pollers.PollingStatusInProgress @@ -213,15 +213,17 @@ type operationResult struct { // > cannot parse " 01:58:30 +0000" as "T" StartTime *string `json:"startTime"` - Properties struct { - // Some APIs (such as Storage) return the Resource Representation from the LRO API, as such we need to check provisioningState - ProvisioningState status `json:"provisioningState"` - } `json:"properties"` + Properties operationResultProperties `json:"properties"` // others return Status, so we check that too Status status `json:"status"` } +type operationResultProperties struct { + // Some APIs (such as Storage) return the Resource Representation from the LRO API, as such we need to check provisioningState + ProvisioningState status `json:"provisioningState"` +} + type status string const ( diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go index 888feb6a2439..bc9806bed6ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go @@ -103,4 +103,7 @@ var longRunningOperationCustomStatuses = map[status]pollers.PollingStatus{ // StorageSync@2020-03-01 returns `validateInput` rather than `InProgress` during creation/update (https://github.com/hashicorp/go-azure-sdk/issues/565) "validateInput": pollers.PollingStatusInProgress, + + // EventGrid @ 2022-06-15 returns `AwaitingManualAction` while waiting for manual validation of a webhook (https://github.com/hashicorp/terraform-provider-azurerm/issues/25689) + "AwaitingManualAction": pollers.PollingStatusInProgress, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_provisioning_state.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_provisioning_state.go index 0805d872b613..f5c6f2e81d7a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_provisioning_state.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_provisioning_state.go @@ -143,15 +143,17 @@ func (p *provisioningStatePoller) Poll(ctx context.Context) (*pollers.PollResult } type provisioningStateResult struct { - Properties struct { - // Some API's (such as Storage) return the Resource Representation from the LRO API, as such we need to check provisioningState - ProvisioningState status `json:"provisioningState"` - } `json:"properties"` + Properties provisioningStateResultProperties `json:"properties"` // others return Status, so we check that too Status status `json:"status"` } +type provisioningStateResultProperties struct { + // Some API's (such as Storage) return the Resource Representation from the LRO API, as such we need to check provisioningState + ProvisioningState status `json:"provisioningState"` +} + func resourceManagerResourcePathFromUri(input string) (*string, error) { parsed, err := url.ParseRequestURI(input) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go index 0bd454a9b3ae..136d554a7e6a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go @@ -33,7 +33,7 @@ var PublishedApis = map[string]string{ "AzureIotHubDeviceProvisioning": iotHubDeviceProvisioningAppId, "AzureKeyVault": keyVaultAppId, "AzureKubernetesServiceAadServer": kubernetesServiceAadServerAppId, - "AzureLinuxVirtualMachineSignIn": azureLinuxVmSignIn, + "AzureLinuxVirtualMachineSignIn": azureLinuxVmSignInAppId, "AzureMaps": mapsAppId, "AzureMediaServices": mediaServicesAppId, "AzurePortal": portalAppId, @@ -49,7 +49,7 @@ var PublishedApis = map[string]string{ "AzureSynapseStudio": synapseStudioAppId, "AzureTimeSeriesInsights": timeSeriesInsightsAppId, "AzureVPN": azureVPNAppId, - "AzureWindowsVirtualMachineSignIn": azureWindowsVmSignIn, + "AzureWindowsVirtualMachineSignIn": azureWindowsVmSignInAppId, "Bing": bingAppId, "BotFrameworkDevPortal": botFrameworkDevPortalAppId, "BranchConnectWebService": branchConnectWebServiceAppId, @@ -79,10 +79,11 @@ var PublishedApis = map[string]string{ "MileIqRestService": mileIqRestServiceAppId, "MixedReality": mixedRealityAppId, "Microsoft365DataAtRestEncryption": microsoft365DataAtRestEncryptionAppId, - "MicrosoftAppAccessPanel": microsoftAppAccessPanel, + "MicrosoftAppAccessPanel": microsoftAppAccessPanelAppId, "MicrosoftAzureCli": microsoftAzureCliAppId, "MicrosoftGraph": microsoftGraphAppId, - "MicrosoftIntuneEnrollment": microsoftIntuneEnrollment, + "MicrosoftIntune": microsoftIntuneAppId, + "MicrosoftIntuneEnrollment": microsoftIntuneEnrollmentAppId, "MicrosoftInvoicing": microsoftInvoicingAppId, "MicrosoftOffice": microsoftOfficeAppId, "MicrosoftStorageSync": microsoftStorageSyncAppId, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go index b344da0cdb11..486a2b20a462 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go @@ -13,8 +13,8 @@ const azureAdIdentityGovernanceInsightsAppId = "58c746b0-a0b0-4647-a8f6-12dde598 const azureAdIntegratedAppAppId = "af47b99c-8954-4b45-ab68-8121157418ef" const azureAdNotificationAppId = "fc03f97a-9db0-4627-a216-ec98ce54e018" const azureDevOpsAppId = "499b84ac-1321-427f-aa17-267ca6975798" -const azureLinuxVmSignIn = "ce6ff14a-7fdc-4685-bbe0-f6afdfcfa8e0" -const azureWindowsVmSignIn = "372140e0-b3b7-4226-8ef9-d57986796201" +const azureLinuxVmSignInAppId = "ce6ff14a-7fdc-4685-bbe0-f6afdfcfa8e0" +const azureWindowsVmSignInAppId = "372140e0-b3b7-4226-8ef9-d57986796201" const azureServiceManagementAppId = "797f4846-ba00-4fd7-ba43-dac1f8f63013" const azureVPNAppId = "41b23e61-6c1e-4545-b367-cd054e0ed4b4" const batchAppId = "ddbf3205-c6bd-46ae-8127-60eb93363864" @@ -61,11 +61,12 @@ const managedHSMAppId = "1341df96-0b28-43da-ba24-7a6ce39be816" const mapsAppId = "ba1ea022-5807-41d5-bbeb-292c7e1cf5f6" const mediaServicesAppId = "374b2a64-3b6b-436b-934c-b820eacca870" const microsoft365DataAtRestEncryptionAppId = "c066d759-24ae-40e7-a56f-027002b5d3e4" -const microsoftAppAccessPanel = "0000000c-0000-0000-c000-000000000000" +const microsoftAppAccessPanelAppId = "0000000c-0000-0000-c000-000000000000" const microsoftAzureCliAppId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46" const microsoftGraphAppId = "00000003-0000-0000-c000-000000000000" const microsoftInvoicingAppId = "b6b84568-6c01-4981-a80f-09da9a20bbed" -const microsoftIntuneEnrollment = "d4ebce55-015a-49b5-a083-c84d1797ae8c" +const microsoftIntuneAppId = "0000000a-0000-0000-c000-000000000000" +const microsoftIntuneEnrollmentAppId = "d4ebce55-015a-49b5-a083-c84d1797ae8c" const microsoftOfficeAppId = "d3590ed6-52b3-4102-aeff-aad2292ab01c" const microsoftStorageSyncAppId = "9469b9f5-6722-4481-a2b2-14ed560b706f" const microsoftTeamsAppId = "1fec8e78-bce4-4aaf-ab1b-5451cc387264" From 165793d13093040ef88747c2f9c7547592188b50 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 14:41:02 +0000 Subject: [PATCH 10/32] Removing unnecessary Get --- .../services/netapp/netapp_volume_resource.go | 84 +++++++++---------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index f1121bf9f516..66bde36baf22 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -940,62 +940,56 @@ func resourceNetAppVolumeDelete(d *pluginsdk.ResourceData, meta interface{}) err dataProtectionBackup := netApp.Model.Properties.DataProtection if dataProtectionBackup.Backup != nil { - dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) - dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicyPatch(dataProtectionBackupPolicyRaw) - - if dataProtectionBackupPolicy.Backup != nil { - - // Checking if initial backup is in progress - volumeIdFromBackupClient := backups.NewVolumeID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) - backupClient := meta.(*clients.Client).NetApp.BackupClient - if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { - return fmt.Errorf("waiting for of %s: %+v", *id, err) - } + // Checking if initial backup is in progress + volumeIdFromBackupClient := backups.NewVolumeID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.CapacityPoolName, id.VolumeName) + backupClient := meta.(*clients.Client).NetApp.BackupClient + if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { + return fmt.Errorf("waiting for of %s: %+v", *id, err) + } - // Disabling backup policy first, PolicyEnforced and BackupPolicyId can't be sent together - disableBackupPolicy := volumes.VolumePatch{ - Properties: &volumes.VolumePatchProperties{ - DataProtection: &volumes.VolumePatchPropertiesDataProtection{ - Backup: &volumes.VolumeBackupProperties{ - PolicyEnforced: utils.Bool(false), - }, + // Disabling backup policy first, PolicyEnforced and BackupPolicyId can't be sent together + disableBackupPolicy := volumes.VolumePatch{ + Properties: &volumes.VolumePatchProperties{ + DataProtection: &volumes.VolumePatchPropertiesDataProtection{ + Backup: &volumes.VolumeBackupProperties{ + PolicyEnforced: utils.Bool(false), }, }, - } + }, + } - if err = client.UpdateThenPoll(ctx, *id, disableBackupPolicy); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } + if err = client.UpdateThenPoll(ctx, *id, disableBackupPolicy); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } - // Wait for volume to complete update - if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { - return err - } + // Wait for volume to complete update + if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { + return err + } - // Checking again if backup is in progress - if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { - return fmt.Errorf("waiting for of %s: %+v", *id, err) - } + // Checking again if backup is in progress + if err = waitForBackupRelationshipStateForDeletion(ctx, backupClient, volumeIdFromBackupClient); err != nil { + return fmt.Errorf("waiting for of %s: %+v", *id, err) + } - // Removing BackupPolicyId - backupPolicyIdRemoval := volumes.VolumePatch{ - Properties: &volumes.VolumePatchProperties{ - DataProtection: &volumes.VolumePatchPropertiesDataProtection{ - Backup: &volumes.VolumeBackupProperties{ - BackupPolicyId: pointer.To(""), - }, + // Removing BackupPolicyId + backupPolicyIdRemoval := volumes.VolumePatch{ + Properties: &volumes.VolumePatchProperties{ + DataProtection: &volumes.VolumePatchPropertiesDataProtection{ + Backup: &volumes.VolumeBackupProperties{ + BackupPolicyId: pointer.To(""), }, }, - } + }, + } - if err = client.UpdateThenPoll(ctx, *id, backupPolicyIdRemoval); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } + if err = client.UpdateThenPoll(ctx, *id, backupPolicyIdRemoval); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } - // Wait for volume to complete update - if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { - return err - } + // Wait for volume to complete update + if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { + return err } } } From 21f43260e7df89307e18953139507e05dfac9dc1 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 15:34:56 +0000 Subject: [PATCH 11/32] Fixing checks issues --- .../services/netapp/netapp_backup_policy_test.go | 12 ++++++------ internal/services/netapp/netapp_backup_vault_test.go | 5 +++-- .../services/netapp/netapp_snapshot_resource_test.go | 4 ++-- .../netapp/netapp_volume_data_source_test.go | 4 ++-- .../netapp_volume_group_sap_hana_resource_test.go | 4 ++-- .../netapp/netapp_volume_quota_rule_resource_test.go | 4 ++-- .../services/netapp/netapp_volume_resource_test.go | 2 +- ...y.markdown => netapp_backup_policy.html.markdown} | 0 ...lt.markdown => netapp_backup_vault.html.markdown} | 0 ...y.markdown => netapp_backup_policy.html.markdown} | 0 ...lt.markdown => netapp_backup_vault.html.markdown} | 0 11 files changed, 18 insertions(+), 17 deletions(-) rename website/docs/d/{netapp_backup_policy.markdown => netapp_backup_policy.html.markdown} (100%) rename website/docs/d/{netapp_backup_vault.markdown => netapp_backup_vault.html.markdown} (100%) rename website/docs/r/{netapp_backup_policy.markdown => netapp_backup_policy.html.markdown} (100%) rename website/docs/r/{netapp_backup_vault.markdown => netapp_backup_vault.html.markdown} (100%) diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go index fdc32a8d83e0..6328b59c507c 100644 --- a/internal/services/netapp/netapp_backup_policy_test.go +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -98,7 +98,7 @@ resource "azurerm_netapp_backup_policy" "test" { daily_backups_to_keep = 2 weekly_backups_to_keep = 2 monthly_backups_to_keep = 2 - enabled = true + enabled = true tags = { "testTag" = "testTagValue" @@ -112,14 +112,14 @@ func (r NetAppBackupPolicyResource) update(data acceptance.TestData) string { %[1]s resource "azurerm_netapp_backup_policy" "test" { - name = "acctest-NetAppBackupPolicy-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_name = azurerm_netapp_account.test.name + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name daily_backups_to_keep = 10 weekly_backups_to_keep = 10 monthly_backups_to_keep = 10 - enabled = false + enabled = false tags = { "testTag" = "testTagValue", diff --git a/internal/services/netapp/netapp_backup_vault_test.go b/internal/services/netapp/netapp_backup_vault_test.go index de062666f548..70516ed1a92f 100644 --- a/internal/services/netapp/netapp_backup_vault_test.go +++ b/internal/services/netapp/netapp_backup_vault_test.go @@ -120,8 +120,8 @@ provider "azurerm" { prevent_deletion_if_contains_resources = false } netapp { - delete_backups_on_backup_vault_destroy = true - } + delete_backups_on_backup_vault_destroy = true + } } } @@ -145,5 +145,6 @@ resource "azurerm_netapp_account" "test" { } } + `, data.RandomInteger, data.Locations.Primary) } diff --git a/internal/services/netapp/netapp_snapshot_resource_test.go b/internal/services/netapp/netapp_snapshot_resource_test.go index b2e93db29386..6fbc24bfd4d5 100644 --- a/internal/services/netapp/netapp_snapshot_resource_test.go +++ b/internal/services/netapp/netapp_snapshot_resource_test.go @@ -133,9 +133,9 @@ provider "azurerm" { prevent_deletion_if_contains_resources = false } netapp { - prevent_volume_destruction = false + prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } diff --git a/internal/services/netapp/netapp_volume_data_source_test.go b/internal/services/netapp/netapp_volume_data_source_test.go index 58ae6d6ed785..20e26ec96948 100644 --- a/internal/services/netapp/netapp_volume_data_source_test.go +++ b/internal/services/netapp/netapp_volume_data_source_test.go @@ -59,9 +59,9 @@ provider "azurerm" { prevent_deletion_if_contains_resources = false } netapp { - prevent_volume_destruction = false + prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go index 7005d5cfb90f..e4a128be7f51 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource_test.go @@ -1607,9 +1607,9 @@ provider "azurerm" { prevent_deletion_if_contains_resources = false } netapp { - prevent_volume_destruction = false + prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go index aa804754e903..54c260dccd46 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource_test.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource_test.go @@ -167,9 +167,9 @@ provider "azurerm" { prevent_deletion_if_contains_resources = false } netapp { - prevent_volume_destruction = false + prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index dcc4391bdbc2..bde570ac162b 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -521,7 +521,7 @@ resource "azurerm_netapp_backup_policy" "test" { daily_backups_to_keep = 2 weekly_backups_to_keep = 2 monthly_backups_to_keep = 2 - enabled = true + enabled = true } resource "azurerm_netapp_volume" "test" { diff --git a/website/docs/d/netapp_backup_policy.markdown b/website/docs/d/netapp_backup_policy.html.markdown similarity index 100% rename from website/docs/d/netapp_backup_policy.markdown rename to website/docs/d/netapp_backup_policy.html.markdown diff --git a/website/docs/d/netapp_backup_vault.markdown b/website/docs/d/netapp_backup_vault.html.markdown similarity index 100% rename from website/docs/d/netapp_backup_vault.markdown rename to website/docs/d/netapp_backup_vault.html.markdown diff --git a/website/docs/r/netapp_backup_policy.markdown b/website/docs/r/netapp_backup_policy.html.markdown similarity index 100% rename from website/docs/r/netapp_backup_policy.markdown rename to website/docs/r/netapp_backup_policy.html.markdown diff --git a/website/docs/r/netapp_backup_vault.markdown b/website/docs/r/netapp_backup_vault.html.markdown similarity index 100% rename from website/docs/r/netapp_backup_vault.markdown rename to website/docs/r/netapp_backup_vault.html.markdown From 28a4f0b38c4cb9ded5269d69fa9a4d51e757d6ea Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 15:44:25 +0000 Subject: [PATCH 12/32] Fixing linting issue --- internal/services/netapp/netapp_backup_policy_data_source.go | 2 +- internal/services/netapp/netapp_backup_vault_data_source.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/netapp/netapp_backup_policy_data_source.go b/internal/services/netapp/netapp_backup_policy_data_source.go index e99cf07ec665..b3e057169f33 100644 --- a/internal/services/netapp/netapp_backup_policy_data_source.go +++ b/internal/services/netapp/netapp_backup_policy_data_source.go @@ -95,7 +95,7 @@ func (r NetAppBackupPolicyDataSource) Read() sdk.ResourceFunc { existing, err := client.BackupPoliciesGet(ctx, backupPolicyID) if err != nil { if existing.HttpResponse.StatusCode == http.StatusNotFound { - return metadata.MarkAsGone(backupPolicyID) + return fmt.Errorf("%s was not found", backupPolicyID) } return fmt.Errorf("retrieving %s: %v", backupPolicyID, err) } diff --git a/internal/services/netapp/netapp_backup_vault_data_source.go b/internal/services/netapp/netapp_backup_vault_data_source.go index 8cd7c8796a28..b1237824866c 100644 --- a/internal/services/netapp/netapp_backup_vault_data_source.go +++ b/internal/services/netapp/netapp_backup_vault_data_source.go @@ -75,7 +75,7 @@ func (r NetAppBackupVaultDataSource) Read() sdk.ResourceFunc { existing, err := client.Get(ctx, backupVaultID) if err != nil { if existing.HttpResponse.StatusCode == http.StatusNotFound { - return metadata.MarkAsGone(backupVaultID) + return fmt.Errorf("%s was not found", backupVaultID) } return fmt.Errorf("retrieving %s: %v", backupVaultID, err) } From 6a8cdb3b1f624f2a0d534a8c0f269e767c95af03 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Sat, 24 Aug 2024 15:47:25 +0000 Subject: [PATCH 13/32] Fixing website linting issues --- website/docs/r/netapp_backup_policy.html.markdown | 2 +- website/docs/r/netapp_volume.html.markdown | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/r/netapp_backup_policy.html.markdown b/website/docs/r/netapp_backup_policy.html.markdown index b4440df355f9..88def825ea27 100644 --- a/website/docs/r/netapp_backup_policy.html.markdown +++ b/website/docs/r/netapp_backup_policy.html.markdown @@ -32,7 +32,7 @@ resource "azurerm_netapp_backup_policy" "example" { daily_backups_to_keep = 2 weekly_backups_to_keep = 2 monthly_backups_to_keep = 2 - enabled = true + enabled = true } ``` diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index a3ce3679a881..2541139498c2 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -18,9 +18,9 @@ Manages a NetApp Volume. provider "azurerm" { features { netapp { - prevent_volume_destruction = true + prevent_volume_destruction = true delete_backups_on_backup_vault_destroy = false - } + } } } @@ -73,7 +73,7 @@ resource "azurerm_netapp_backup_policy" "example" { daily_backups_to_keep = 2 weekly_backups_to_keep = 2 monthly_backups_to_keep = 2 - enabled = true + enabled = true } resource "azurerm_netapp_pool" "example" { From af360d9516f7e47a305477d922bb7cef47fd3d97 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 17 Oct 2024 22:13:36 +0000 Subject: [PATCH 14/32] fixes related to PR 27188 comments --- .../nfsv3_volume_with_backup_policy/main.tf | 2 +- .../netapp/netapp_volume_data_source.go | 2 +- .../services/netapp/netapp_volume_helper.go | 36 +++++---- .../services/netapp/netapp_volume_resource.go | 20 +++-- .../netapp/netapp_volume_resource_test.go | 74 ++++++++++++++++++- website/docs/d/netapp_volume.html.markdown | 2 +- website/docs/r/netapp_volume.html.markdown | 4 +- 7 files changed, 106 insertions(+), 34 deletions(-) diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf index 8c83de309788..03831be19f39 100755 --- a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf +++ b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf @@ -88,7 +88,7 @@ resource "azurerm_netapp_volume" "example" { data_protection_backup_policy { backup_vault_id = azurerm_netapp_backup_vault.example.id backup_policy_id = azurerm_netapp_backup_policy.example.id - policy_enforced = true + policy_enabled = true } export_policy_rule { diff --git a/internal/services/netapp/netapp_volume_data_source.go b/internal/services/netapp/netapp_volume_data_source.go index 50a97f2641c4..ee6b8b3a5eb5 100644 --- a/internal/services/netapp/netapp_volume_data_source.go +++ b/internal/services/netapp/netapp_volume_data_source.go @@ -131,7 +131,7 @@ func dataSourceNetAppVolume() *pluginsdk.Resource { Computed: true, }, - "policy_enforced": { + "policy_enabled": { Type: pluginsdk.TypeBool, Computed: true, }, diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 0709585b844e..3e5f4d3e3297 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -285,16 +285,18 @@ func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes. backupRaw := input[0].(map[string]interface{}) - if v, ok := backupRaw["backup_policy_id"]; ok { - backupPolicyObject.BackupPolicyId = utils.String(v.(string)) - } + if backupRaw != nil { + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } - if v, ok := backupRaw["policy_enforced"]; ok { - backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) - } + if v, ok := backupRaw["policy_enabled"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } - if v, ok := backupRaw["backup_vault_id"]; ok { - backupPolicyObject.BackupVaultId = utils.String(v.(string)) + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) + } } return &volumes.VolumePropertiesDataProtection{ @@ -311,16 +313,18 @@ func expandNetAppVolumeDataProtectionBackupPolicyPatch(input []interface{}) *vol backupRaw := input[0].(map[string]interface{}) - if v, ok := backupRaw["backup_policy_id"]; ok { - backupPolicyObject.BackupPolicyId = utils.String(v.(string)) - } + if backupRaw != nil { + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } - if v, ok := backupRaw["policy_enforced"]; ok { - backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) - } + if v, ok := backupRaw["policy_enabled"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } - if v, ok := backupRaw["backup_vault_id"]; ok { - backupPolicyObject.BackupVaultId = utils.String(v.(string)) + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) + } } return &volumes.VolumePatchPropertiesDataProtection{ diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 66bde36baf22..038436265a8e 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -331,11 +331,11 @@ func resourceNetAppVolume() *pluginsdk.Resource { Description: "The ID of the backup policy to associate with this volume.", }, - "policy_enforced": { + "policy_enabled": { Type: pluginsdk.TypeBool, Optional: true, Default: true, - Description: "If set to false, the backup policy will not be enforced on this volume, thus disabling scheduled backups.", + Description: "If set to false, the backup policy will not be enabled on this volume, thus disabling scheduled backups.", }, "backup_vault_id": { @@ -699,6 +699,8 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err shouldUpdate = true dataProtectionSnapshotPolicyRaw := d.Get("data_protection_snapshot_policy").([]interface{}) dataProtectionSnapshotPolicy := expandNetAppVolumeDataProtectionSnapshotPolicyPatch(dataProtectionSnapshotPolicyRaw) + + update.Properties.DataProtection = &volumes.VolumePatchPropertiesDataProtection{} update.Properties.DataProtection.Snapshot = dataProtectionSnapshotPolicy.Snapshot } @@ -711,17 +713,13 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, %s", id) } - // Validate applicability of backup policies - if dataProtectionReplication != nil && dataProtectionReplication.Replication != nil { - // Validate that backup policies are not being enforced in a data protection replication destination volume - if strings.EqualFold(string(*dataProtectionReplication.Replication.EndpointType), "dst") && dataProtectionReplication.Backup.PolicyEnforced == utils.Bool(true) { - return fmt.Errorf("backup policy cannot be enforced on a data protection destination volume, NetApp Volume %q (Resource Group %q)", id.VolumeName, id.ResourceGroupName) - } - } - shouldUpdate = true dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicyPatch(dataProtectionBackupPolicyRaw) + + if update.Properties.DataProtection == nil { + update.Properties.DataProtection = &volumes.VolumePatchPropertiesDataProtection{} + } update.Properties.DataProtection.Backup = dataProtectionBackupPolicy.Backup } @@ -1251,7 +1249,7 @@ func flattenNetAppVolumeDataProtectionBackupPolicy(input *volumes.VolumeProperti return []interface{}{ map[string]interface{}{ "backup_policy_id": backupPolicyID, - "policy_enforced": policyEnforced, + "policy_enabled": policyEnforced, "backup_vault_id": backupVaultID, }, } diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index bde570ac162b..aacbced5330a 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -50,6 +50,28 @@ func TestAccNetAppVolume_backupPolicy(t *testing.T) { }) } +func TestAccNetAppVolume_updateBackupPolicy(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") + r := NetAppVolumeResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.backupPolicy(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.updateBackupPolicy(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccNetAppVolume_availabilityZone(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") r := NetAppVolumeResource{} @@ -539,7 +561,55 @@ resource "azurerm_netapp_volume" "test" { data_protection_backup_policy { backup_vault_id = azurerm_netapp_backup_vault.test.id backup_policy_id = azurerm_netapp_backup_policy.test.id - policy_enforced = true + policy_enabled = true + } +} +`, template, data.RandomInteger) +} + +func (NetAppVolumeResource) updateBackupPolicy(data acceptance.TestData) string { + template := NetAppVolumeResource{}.template(data) + return fmt.Sprintf(` +%[1]s + +resource "azurerm_netapp_backup_vault" "test" { + name = "acctest-NetAppBackupVault-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + + tags = { + "testTag" = "testTagValue" + } +} + +resource "azurerm_netapp_backup_policy" "test" { + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name + daily_backups_to_keep = 2 + weekly_backups_to_keep = 2 + monthly_backups_to_keep = 2 + enabled = true +} + +resource "azurerm_netapp_volume" "test" { + name = "acctest-NetAppVolume-%[2]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + account_name = azurerm_netapp_account.test.name + pool_name = azurerm_netapp_pool.test.name + volume_path = "my-unique-file-path-%[2]d" + service_level = "Standard" + subnet_id = azurerm_subnet.test.id + storage_quota_in_gb = 100 + throughput_in_mibps = 10 + + data_protection_backup_policy { + backup_vault_id = azurerm_netapp_backup_vault.test.id + backup_policy_id = azurerm_netapp_backup_policy.test.id + policy_enabled = false } } `, template, data.RandomInteger) @@ -1428,7 +1498,7 @@ provider "azurerm" { netapp { prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } ` diff --git a/website/docs/d/netapp_volume.html.markdown b/website/docs/d/netapp_volume.html.markdown index 9c70584d4ca1..9fadb3d7e7fc 100644 --- a/website/docs/d/netapp_volume.html.markdown +++ b/website/docs/d/netapp_volume.html.markdown @@ -89,7 +89,7 @@ A `data_protection_backup_policy` block supports the following: * `backup_policy_id` - The Resource ID of the backup policy. -* `policy_enforced` - Backup policy is enforced or not. +* `policy_enabled` - Backup policy is enabled or not. --- diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index 2541139498c2..7b774eb882cc 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -122,7 +122,7 @@ resource "azurerm_netapp_volume" "example" { data_protection_backup_policy { backup_vault_id = azurerm_netapp_backup_vault.example.id backup_policy_id = azurerm_netapp_backup_policy.example.id - policy_enforced = true + policy_enabled = true } # prevent the possibility of accidental data loss @@ -258,7 +258,7 @@ A `data_protection_backup_policy` block is used to setup automatic backups throu * `backup_policy_id` - (Required) Resource ID of the backup policy to apply to the volume. -* `policy_enforced` - (Optional) Enables the backup policy on the volume, defaults to `true`. +* `policy_enabled` - (Optional) Enables the backup policy on the volume, defaults to `true`. For more information on Azure NetApp Files Backup feature please see [Understand Azure NetApp Files backup](https://learn.microsoft.com/en-us/azure/azure-netapp-files/backup-introduction) From a9409405042afb5641ae94698bc1eff3ebac43f5 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 17 Oct 2024 23:10:24 +0000 Subject: [PATCH 15/32] fixing vendor issues --- .../netapp/2024-03-01/backuppolicy/README.md | 12 +++++------ .../netapp/2024-03-01/backuppolicy/client.go | 2 +- .../backuppolicy/id_backuppolicy.go | 8 ++++---- .../backuppolicy/id_netappaccount.go | 6 +++--- .../backuppolicy/method_backuppoliciesget.go | 1 - .../backuppolicy/method_backuppolicieslist.go | 1 - .../netapp/2024-03-01/backuppolicy/version.go | 4 +--- .../netapp/2024-03-01/backups/README.md | 20 +++++++++---------- .../netapp/2024-03-01/backups/client.go | 2 +- .../netapp/2024-03-01/backups/id_backup.go | 10 +++++----- .../2024-03-01/backups/id_backupvault.go | 8 ++++---- .../2024-03-01/backups/id_netappaccount.go | 6 +++--- .../netapp/2024-03-01/backups/id_volume.go | 10 +++++----- .../netapp/2024-03-01/backups/method_get.go | 1 - .../backups/method_getlateststatus.go | 1 - .../2024-03-01/backups/method_listbyvault.go | 1 + .../netapp/2024-03-01/backups/version.go | 4 +--- .../netapp/2024-03-01/backupvaults/README.md | 12 +++++------ .../netapp/2024-03-01/backupvaults/client.go | 2 +- .../2024-03-01/backupvaults/id_backupvault.go | 8 ++++---- .../backupvaults/id_netappaccount.go | 6 +++--- .../2024-03-01/backupvaults/method_get.go | 1 - .../netapp/2024-03-01/backupvaults/version.go | 4 +--- .../netapp/2024-03-01/capacitypools/README.md | 2 +- .../2024-03-01/capacitypools/version.go | 2 +- .../2024-03-01/netappaccounts/README.md | 2 +- .../2024-03-01/netappaccounts/version.go | 2 +- .../2024-03-01/snapshotpolicy/README.md | 2 +- .../2024-03-01/snapshotpolicy/version.go | 2 +- .../netapp/2024-03-01/snapshots/README.md | 2 +- .../netapp/2024-03-01/snapshots/version.go | 2 +- .../netapp/2024-03-01/volumegroups/README.md | 2 +- .../netapp/2024-03-01/volumegroups/version.go | 2 +- .../2024-03-01/volumequotarules/README.md | 2 +- .../2024-03-01/volumequotarules/version.go | 2 +- .../netapp/2024-03-01/volumes/README.md | 2 +- .../netapp/2024-03-01/volumes/version.go | 2 +- .../2024-03-01/volumesreplication/README.md | 2 +- .../2024-03-01/volumesreplication/version.go | 2 +- 39 files changed, 76 insertions(+), 86 deletions(-) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md index 7d4818124687..2d3e5eda7664 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy` Documentation -The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backuppolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupPolicyName") payload := backuppolicy.BackupPolicy{ // ... @@ -41,7 +41,7 @@ if err := client.BackupPoliciesCreateThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupPolicyName") if err := client.BackupPoliciesDeleteThenPoll(ctx, id); err != nil { // handle the error @@ -53,7 +53,7 @@ if err := client.BackupPoliciesDeleteThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupPolicyName") read, err := client.BackupPoliciesGet(ctx, id) if err != nil { @@ -69,7 +69,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := backuppolicy.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") +id := backuppolicy.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName") read, err := client.BackupPoliciesList(ctx, id) if err != nil { @@ -85,7 +85,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupPolicyValue") +id := backuppolicy.NewBackupPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupPolicyName") payload := backuppolicy.BackupPolicyPatch{ // ... diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go index 1db45e634e56..8b4fc07ad66e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/client.go @@ -15,7 +15,7 @@ type BackupPolicyClient struct { } func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go index 9f45aceef308..7e2cd95f2103 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -121,9 +121,9 @@ func (id BackupPolicyId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), resourceids.StaticSegment("staticBackupPolicies", "backupPolicies", "backupPolicies"), - resourceids.UserSpecifiedSegment("backupPolicyName", "backupPolicyValue"), + resourceids.UserSpecifiedSegment("backupPolicyName", "backupPolicyName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go index d722f9a676d5..b10e89e1ad13 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -115,7 +115,7 @@ func (id NetAppAccountId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go index 73667d207d31..e8ecfc1fc044 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go @@ -45,7 +45,6 @@ func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPoli var model BackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go index 7a939318453d..7932d9642408 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go @@ -46,7 +46,6 @@ func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAcc var model BackupPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go index e96943db05e6..b6697aad0a16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy/version.go @@ -1,12 +1,10 @@ package backuppolicy -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-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicy/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md index 5f247f25d5a1..be38f5d3e723 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName") payload := backups.Backup{ // ... @@ -41,7 +41,7 @@ if err := client.CreateThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName") if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error @@ -53,7 +53,7 @@ if err := client.DeleteThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName") read, err := client.Get(ctx, id) if err != nil { @@ -69,7 +69,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue") +id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "capacityPoolName", "volumeName") read, err := client.GetLatestStatus(ctx, id) if err != nil { @@ -85,7 +85,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := backups.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") +id := backups.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName") // alternatively `client.ListByVault(ctx, id, backups.DefaultListByVaultOperationOptions())` can be used to do batched pagination items, err := client.ListByVaultComplete(ctx, id, backups.DefaultListByVaultOperationOptions()) @@ -102,7 +102,7 @@ for _, item := range items { ```go ctx := context.TODO() -id := backups.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") +id := backups.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName") payload := backups.BackupsMigrationRequest{ // ... @@ -119,7 +119,7 @@ if err := client.UnderAccountMigrateBackupsThenPoll(ctx, id, payload); err != ni ```go ctx := context.TODO() -id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName") payload := backups.BackupRestoreFiles{ // ... @@ -136,7 +136,7 @@ if err := client.UnderBackupVaultRestoreFilesThenPoll(ctx, id, payload); err != ```go ctx := context.TODO() -id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue") +id := backups.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "capacityPoolName", "volumeName") payload := backups.BackupsMigrationRequest{ // ... @@ -153,7 +153,7 @@ if err := client.UnderVolumeMigrateBackupsThenPoll(ctx, id, payload); err != nil ```go ctx := context.TODO() -id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue", "backupValue") +id := backups.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName", "backupName") payload := backups.BackupPatch{ // ... diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go index a0f81d2a6aba..6e1cc70d4343 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go index 4af4424ea146..06aacd5f5b51 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backup.go @@ -46,7 +46,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -127,11 +127,11 @@ func (id BackupId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), - resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultName"), resourceids.StaticSegment("staticBackups", "backups", "backups"), - resourceids.UserSpecifiedSegment("backupName", "backupValue"), + resourceids.UserSpecifiedSegment("backupName", "backupName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go index 930429185338..779adf353ca9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -121,9 +121,9 @@ func (id BackupVaultId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), - resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go index 26feaa5e8b27..516c7ff39118 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -115,7 +115,7 @@ func (id NetAppAccountId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go index 839d08e459e2..68f2aee4179e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -127,11 +127,11 @@ func (id VolumeId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), resourceids.StaticSegment("staticCapacityPools", "capacityPools", "capacityPools"), - resourceids.UserSpecifiedSegment("capacityPoolName", "capacityPoolValue"), + resourceids.UserSpecifiedSegment("capacityPoolName", "capacityPoolName"), resourceids.StaticSegment("staticVolumes", "volumes", "volumes"), - resourceids.UserSpecifiedSegment("volumeName", "volumeValue"), + resourceids.UserSpecifiedSegment("volumeName", "volumeName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go index 65321ba9ef6c..fe88bb84d0a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model Backup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go index dcd2709c74ff..1668fdfcf7e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go @@ -46,7 +46,6 @@ func (c BackupsClient) GetLatestStatus(ctx context.Context, id VolumeId) (result var model BackupStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go index f92c1548b810..3416244ff498 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go @@ -39,6 +39,7 @@ func (o ListByVaultOperationOptions) ToHeaders() *client.Headers { func (o ListByVaultOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go index 4595bccaa3c1..434265f8cb98 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups/version.go @@ -1,12 +1,10 @@ package backups -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-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md index e808dcbd596e..9bc1ae14b5df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName") payload := backupvaults.BackupVault{ // ... @@ -41,7 +41,7 @@ if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName") if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error @@ -53,7 +53,7 @@ if err := client.DeleteThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName") read, err := client.Get(ctx, id) if err != nil { @@ -69,7 +69,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := backupvaults.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue") +id := backupvaults.NewNetAppAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName") // alternatively `client.ListByNetAppAccount(ctx, id)` can be used to do batched pagination items, err := client.ListByNetAppAccountComplete(ctx, id) @@ -86,7 +86,7 @@ for _, item := range items { ```go ctx := context.TODO() -id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "backupVaultValue") +id := backupvaults.NewBackupVaultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountName", "backupVaultName") payload := backupvaults.BackupVaultPatch{ // ... diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go index 7a4dd9321700..57d96b431b5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go index de1952d78349..84c031650621 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -121,9 +121,9 @@ func (id BackupVaultId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), resourceids.StaticSegment("staticBackupVaults", "backupVaults", "backupVaults"), - resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultValue"), + resourceids.UserSpecifiedSegment("backupVaultName", "backupVaultName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go index 2096ade91b39..203dcf207ec0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -115,7 +115,7 @@ func (id NetAppAccountId) Segments() []resourceids.Segment { resourceids.StaticSegment("staticProviders", "providers", "providers"), resourceids.ResourceProviderSegment("staticMicrosoftNetApp", "Microsoft.NetApp", "Microsoft.NetApp"), resourceids.StaticSegment("staticNetAppAccounts", "netAppAccounts", "netAppAccounts"), - resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountValue"), + resourceids.UserSpecifiedSegment("netAppAccountName", "netAppAccountName"), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go index e3c1b3c69524..6cd544f7ca95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go index 029ef1334e25..692bfdc12575 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -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-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md index 4de7a38a1d72..333457abfcea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `capacitypools` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go index 81c416431bcb..9dc11f4a92cb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools/version.go @@ -6,5 +6,5 @@ package capacitypools const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/capacitypools/2023-05-01" + return "hashicorp/go-azure-sdk/capacitypools/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md index 26b48d683f8c..00896a21f6e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `netappaccounts` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go index 06c4f5eb1fc0..ec5f35de42de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts/version.go @@ -6,5 +6,5 @@ package netappaccounts const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/netappaccounts/2023-05-01" + return "hashicorp/go-azure-sdk/netappaccounts/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md index fddbe7f7d110..e3b1ebd141a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `snapshotpolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go index eba0499846ae..b0ad9aef745d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go @@ -6,5 +6,5 @@ package snapshotpolicy const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/snapshotpolicy/2023-05-01" + return "hashicorp/go-azure-sdk/snapshotpolicy/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md index 98ed5e101462..528d345277b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go index a683268eda47..8dd79283032d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots/version.go @@ -6,5 +6,5 @@ package snapshots const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/snapshots/2023-05-01" + return "hashicorp/go-azure-sdk/snapshots/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md index 8f1b2bce60a7..4dceebb836e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go index 0c24ac096144..7267a3b94128 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups/version.go @@ -6,5 +6,5 @@ package volumegroups const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/volumegroups/2023-05-01" + return "hashicorp/go-azure-sdk/volumegroups/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md index db7b7db6bfb3..7f2b7139307a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumequotarules` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go index 6ac01fc9e170..078a65c7f3d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules/version.go @@ -6,5 +6,5 @@ package volumequotarules const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/volumequotarules/2023-05-01" + return "hashicorp/go-azure-sdk/volumequotarules/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md index ad48ba0d9ffc..6112def45159 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go index 034a2f3c968b..76b4004cf743 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes/version.go @@ -6,5 +6,5 @@ package volumes const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/volumes/2023-05-01" + return "hashicorp/go-azure-sdk/volumes/2024-03-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md index b5712123ec9d..29bdb10cf010 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumesreplication` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-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). diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go index 293296bbcc08..2ce59d52eb4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication/version.go @@ -6,5 +6,5 @@ package volumesreplication const defaultApiVersion = "2024-03-01" func userAgent() string { - return "hashicorp/go-azure-sdk/volumesreplication/2023-05-01" + return "hashicorp/go-azure-sdk/volumesreplication/2024-03-01" } From 0b162d8207f272921beffbfb62a1300320910940 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 17 Oct 2024 23:46:31 +0000 Subject: [PATCH 16/32] Adding _maintainers folder --- .../services/netapp/_maintainers/README.md | 18 ++++++++++++++++++ .../services/netapp/_maintainers/maintained_by | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 internal/services/netapp/_maintainers/README.md create mode 100644 internal/services/netapp/_maintainers/maintained_by diff --git a/internal/services/netapp/_maintainers/README.md b/internal/services/netapp/_maintainers/README.md new file mode 100644 index 000000000000..38816a8b2bbf --- /dev/null +++ b/internal/services/netapp/_maintainers/README.md @@ -0,0 +1,18 @@ +# This is a maintainer file for the Azure NetApp Files service. + +Main idea of this file is to give insights to the revewiwers (and authors) on the details of the service and a few whys or do or dont's so PR review process gets faster and don't potentially introduces issues. + +## Acceptance Tests +- There is lack of SMB-related acct tests, the reason for that is that it requires Active Directory Domain Controller infrastucture which is not available, SMB-related tests can only be added the PR author provides such infrastructure which is not that trivial, so we should not require SMB tests until it is implemented unless it comes with Domain Controller setup automation, otherwise, these acceptance tests will be failing and causing disruptions in CI or bulk testing. +- New tests failing should not be accepted. + +## Polling functions +- Some Netapp resources requires an extra type of polling mechanism, usually named wait`whatever is the resource name and operation` for example: + + ```go + // Waiting for volume be completely provisioned + if err := waitForVolumeCreateOrUpdate(ctx, client, id); err != nil { + return err + } + ``` + This seems redundant but it is not, some operations return from regular SDK polling as completed but in fact due to several factors it is still in progress, so we need to wait for it to be really completed, for this reason, we should not ask PR authors to remove these type of wait functions. \ No newline at end of file diff --git a/internal/services/netapp/_maintainers/maintained_by b/internal/services/netapp/_maintainers/maintained_by new file mode 100644 index 000000000000..dda8160f7cdb --- /dev/null +++ b/internal/services/netapp/_maintainers/maintained_by @@ -0,0 +1,2 @@ +paulomarquesc +Orexii \ No newline at end of file From 51bfd9893935ae80284dc6a406ac5cf2d6a77f1b Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 18 Oct 2024 23:08:39 +0000 Subject: [PATCH 17/32] New round of PR comments fixes --- .../netapp_account_encryption_data_source.go | 4 +- .../netapp_account_encryption_resource.go | 13 ++---- .../netapp/netapp_account_resource.go | 10 +---- .../netapp_backup_policy_data_source.go | 23 +++++----- .../netapp/netapp_backup_policy_resource.go | 44 +++++++------------ .../netapp/netapp_backup_policy_test.go | 38 +++++++++++++--- .../netapp/netapp_backup_vault_data_source.go | 15 +++---- .../netapp/netapp_backup_vault_resource.go | 20 ++++----- .../services/netapp/netapp_pool_resource.go | 19 +++----- ...etapp_volume_group_sap_hana_data_source.go | 1 - .../netapp_volume_group_sap_hana_resource.go | 6 +-- .../services/netapp/netapp_volume_helper.go | 3 +- .../netapp_volume_quota_rule_data_source.go | 2 - .../netapp_volume_quota_rule_resource.go | 15 +++---- .../services/netapp/netapp_volume_resource.go | 30 +++++-------- 15 files changed, 102 insertions(+), 141 deletions(-) diff --git a/internal/services/netapp/netapp_account_encryption_data_source.go b/internal/services/netapp/netapp_account_encryption_data_source.go index c3fc47c34ba5..47460fede341 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source.go +++ b/internal/services/netapp/netapp_account_encryption_data_source.go @@ -79,7 +79,7 @@ func (r NetAppAccountEncryptionDataSource) Read() sdk.ResourceFunc { var state netAppModels.NetAppAccountEncryptionDataSourceModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } id, err := netappaccounts.ParseNetAppAccountID(state.NetAppAccountID) @@ -124,8 +124,6 @@ func (r NetAppAccountEncryptionDataSource) Read() sdk.ResourceFunc { } } - metadata.SetID(id) - return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_account_encryption_resource.go b/internal/services/netapp/netapp_account_encryption_resource.go index 17c21180ff56..b8a51c31d4a4 100644 --- a/internal/services/netapp/netapp_account_encryption_resource.go +++ b/internal/services/netapp/netapp_account_encryption_resource.go @@ -6,7 +6,6 @@ package netapp import ( "context" "fmt" - "net/http" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" @@ -159,7 +158,7 @@ func (r NetAppAccountEncryptionResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppAccountEncryption if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } metadata.Logger.Infof("Updating %s", id) @@ -179,8 +178,6 @@ func (r NetAppAccountEncryptionResource) Update() sdk.ResourceFunc { if err := client.AccountsUpdateThenPoll(ctx, pointer.From(id), update); err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - - metadata.SetID(id) } return nil @@ -203,12 +200,12 @@ func (r NetAppAccountEncryptionResource) Read() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppAccountEncryption if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } existing, err := client.AccountsGet(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) @@ -246,8 +243,6 @@ func (r NetAppAccountEncryptionResource) Read() sdk.ResourceFunc { } } - metadata.SetID(id) - return metadata.Encode(&model) }, } @@ -270,7 +265,7 @@ func (r NetAppAccountEncryptionResource) Delete() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppAccountEncryption if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } metadata.Logger.Infof("Updating %s", id) diff --git a/internal/services/netapp/netapp_account_resource.go b/internal/services/netapp/netapp_account_resource.go index 20e0b6969c2a..9b864094f453 100644 --- a/internal/services/netapp/netapp_account_resource.go +++ b/internal/services/netapp/netapp_account_resource.go @@ -240,26 +240,22 @@ func resourceNetAppAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) er locks.ByID(id.ID()) defer locks.UnlockByID(id.ID()) - shouldUpdate := false update := netappaccounts.NetAppAccountPatch{ Properties: &netappaccounts.AccountProperties{}, } if d.HasChange("active_directory") { - shouldUpdate = true activeDirectoriesRaw := d.Get("active_directory").([]interface{}) activeDirectories := expandNetAppActiveDirectories(activeDirectoriesRaw) update.Properties.ActiveDirectories = activeDirectories } if d.HasChange("tags") { - shouldUpdate = true tagsRaw := d.Get("tags").(map[string]interface{}) update.Tags = tags.Expand(tagsRaw) } if d.HasChange("identity") { - shouldUpdate = true anfAccountIdentity, err := identity.ExpandLegacySystemAndUserAssignedMap(d.Get("identity").([]interface{})) if err != nil { return fmt.Errorf("expanding `identity`: %+v", err) @@ -268,10 +264,8 @@ func resourceNetAppAccountUpdate(d *pluginsdk.ResourceData, meta interface{}) er update.Identity = anfAccountIdentity } - if shouldUpdate { - if err = client.AccountsUpdateThenPoll(ctx, *id, update); err != nil { - return fmt.Errorf("updating %s: %+v", id.ID(), err) - } + if err = client.AccountsUpdateThenPoll(ctx, *id, update); err != nil { + return fmt.Errorf("updating %s: %+v", id.ID(), err) } return resourceNetAppAccountRead(d, meta) diff --git a/internal/services/netapp/netapp_backup_policy_data_source.go b/internal/services/netapp/netapp_backup_policy_data_source.go index b3e057169f33..c2281c9dec93 100644 --- a/internal/services/netapp/netapp_backup_policy_data_source.go +++ b/internal/services/netapp/netapp_backup_policy_data_source.go @@ -6,10 +6,10 @@ package netapp import ( "context" "fmt" - "net/http" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" @@ -87,31 +87,28 @@ func (r NetAppBackupPolicyDataSource) Read() sdk.ResourceFunc { var state netAppModels.NetAppBackupPolicyModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } backupPolicyID := backuppolicy.NewBackupPolicyID(metadata.Client.Account.SubscriptionId, state.ResourceGroupName, state.AccountName, state.Name) existing, err := client.BackupPoliciesGet(ctx, backupPolicyID) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("%s was not found", backupPolicyID) } return fmt.Errorf("retrieving %s: %v", backupPolicyID, err) } - model := existing.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", backupPolicyID) + if model := existing.Model; model != nil { + state.Location = location.Normalize(model.Location) + state.Tags = pointer.From(model.Tags) + state.DailyBackupsToKeep = pointer.From(model.Properties.DailyBackupsToKeep) + state.WeeklyBackupsToKeep = pointer.From(model.Properties.WeeklyBackupsToKeep) + state.MonthlyBackupsToKeep = pointer.From(model.Properties.MonthlyBackupsToKeep) + state.Enabled = pointer.From(model.Properties.Enabled) } - state.Location = location.NormalizeNilable(pointer.To(model.Location)) - state.Tags = pointer.From(model.Tags) - state.DailyBackupsToKeep = pointer.From(model.Properties.DailyBackupsToKeep) - state.WeeklyBackupsToKeep = pointer.From(model.Properties.WeeklyBackupsToKeep) - state.MonthlyBackupsToKeep = pointer.From(model.Properties.MonthlyBackupsToKeep) - state.Enabled = pointer.From(model.Properties.Enabled) - metadata.SetID(backupPolicyID) return metadata.Encode(&state) diff --git a/internal/services/netapp/netapp_backup_policy_resource.go b/internal/services/netapp/netapp_backup_policy_resource.go index ccc386174df3..1c7aa687eefa 100644 --- a/internal/services/netapp/netapp_backup_policy_resource.go +++ b/internal/services/netapp/netapp_backup_policy_resource.go @@ -6,7 +6,6 @@ package netapp import ( "context" "fmt" - "net/http" "strconv" "time" @@ -162,11 +161,9 @@ func (r NetAppBackupPolicyResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppBackupPolicyModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } - var shouldUpdate = false - update := backuppolicy.BackupPolicyPatch{ Properties: &backuppolicy.BackupPolicyProperties{}, } @@ -174,37 +171,28 @@ func (r NetAppBackupPolicyResource) Update() sdk.ResourceFunc { // Checking properties with changes if metadata.ResourceData.HasChange("tags") { update.Tags = pointer.To(state.Tags) - shouldUpdate = true } if metadata.ResourceData.HasChange("daily_backups_to_keep") { update.Properties.DailyBackupsToKeep = pointer.To(state.DailyBackupsToKeep) - shouldUpdate = true } if metadata.ResourceData.HasChange("weekly_backups_to_keep") { update.Properties.WeeklyBackupsToKeep = pointer.To(state.WeeklyBackupsToKeep) - shouldUpdate = true } if metadata.ResourceData.HasChange("monthly_backups_to_keep") { update.Properties.MonthlyBackupsToKeep = pointer.To(state.MonthlyBackupsToKeep) - shouldUpdate = true } if metadata.ResourceData.HasChange("enabled") { update.Properties.Enabled = pointer.To(state.Enabled) - shouldUpdate = true } - if shouldUpdate { - metadata.Logger.Infof("Updating %s", id) + metadata.Logger.Infof("Updating %s", id) - if err := client.BackupPoliciesUpdateThenPoll(ctx, pointer.From(id), update); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } - - metadata.SetID(id) + if err := client.BackupPoliciesUpdateThenPoll(ctx, pointer.From(id), update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) } return nil @@ -227,32 +215,30 @@ func (r NetAppBackupPolicyResource) Read() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppBackupPolicyModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } existing, err := client.BackupPoliciesGet(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } + state.AccountName = id.NetAppAccountName + state.Name = id.BackupPolicyName + state.ResourceGroupName = id.ResourceGroupName + if model := existing.Model; model != nil { - state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Location = location.Normalize(model.Location) state.Tags = pointer.From(model.Tags) - state.AccountName = id.NetAppAccountName - state.Name = id.BackupPolicyName - state.ResourceGroupName = id.ResourceGroupName - state.DailyBackupsToKeep = pointer.From(model.Properties.DailyBackupsToKeep) state.WeeklyBackupsToKeep = pointer.From(model.Properties.WeeklyBackupsToKeep) state.MonthlyBackupsToKeep = pointer.From(model.Properties.MonthlyBackupsToKeep) state.Enabled = pointer.From(model.Properties.Enabled) } - metadata.SetID(id) - return metadata.Encode(&state) }, } @@ -272,18 +258,18 @@ func (r NetAppBackupPolicyResource) Delete() sdk.ResourceFunc { existing, err := client.BackupPoliciesGet(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } if err = client.BackupPoliciesDeleteThenPoll(ctx, pointer.From(id)); err != nil { - return fmt.Errorf("deleting %s: %+v", pointer.From(id), err) + return fmt.Errorf("deleting %s: %+v", id, err) } - if err = waitForBackupPolicyDeletion(ctx, client, *id); err != nil { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) + if err = waitForBackupPolicyDeletion(ctx, client, pointer.From(id)); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) } return nil diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go index 6328b59c507c..87ce2bfa467b 100644 --- a/internal/services/netapp/netapp_backup_policy_test.go +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -6,15 +6,14 @@ package netapp_test import ( "context" "fmt" - "net/http" "testing" + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy" "github.com/hashicorp/terraform-plugin-testing/terraform" "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" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) type NetAppBackupPolicyResource struct{} @@ -28,13 +27,10 @@ func (t NetAppBackupPolicyResource) Exists(ctx context.Context, clients *clients resp, err := clients.NetApp.BackupPolicyClient.BackupPoliciesGet(ctx, *id) if err != nil { - if resp.HttpResponse.StatusCode == http.StatusNotFound { - return utils.Bool(false), nil - } return nil, fmt.Errorf("retrieving %s: %+v", id, err) } - return utils.Bool(true), nil + return pointer.To(resp.Model != nil), nil } func TestAccNetAppBackupPolicy_basic(t *testing.T) { @@ -54,6 +50,23 @@ func TestAccNetAppBackupPolicy_basic(t *testing.T) { }) } +func TestAccNetAppBackupPolicy_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_netapp_backup_policy", "test") + r := NetAppBackupPolicyResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), + ), + }, + data.ImportStep(), + }) +} + func TestAccNetAppBackupPolicy_update(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_backup_policy", "test") r := NetAppBackupPolicyResource{} @@ -90,6 +103,19 @@ func (r NetAppBackupPolicyResource) basic(data acceptance.TestData) string { return fmt.Sprintf(` %[1]s +resource "azurerm_netapp_backup_policy" "test" { + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name +} +`, r.template(data), data.RandomInteger) +} + +func (r NetAppBackupPolicyResource) complete(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s + resource "azurerm_netapp_backup_policy" "test" { name = "acctest-NetAppBackupPolicy-%[2]d" resource_group_name = azurerm_resource_group.test.name diff --git a/internal/services/netapp/netapp_backup_vault_data_source.go b/internal/services/netapp/netapp_backup_vault_data_source.go index b1237824866c..57d15ffc1ea8 100644 --- a/internal/services/netapp/netapp_backup_vault_data_source.go +++ b/internal/services/netapp/netapp_backup_vault_data_source.go @@ -6,10 +6,10 @@ package netapp import ( "context" "fmt" - "net/http" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" @@ -67,27 +67,24 @@ func (r NetAppBackupVaultDataSource) Read() sdk.ResourceFunc { var state netAppModels.NetAppBackupVaultModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } backupVaultID := backupvaults.NewBackupVaultID(metadata.Client.Account.SubscriptionId, state.ResourceGroupName, state.AccountName, state.Name) existing, err := client.Get(ctx, backupVaultID) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("%s was not found", backupVaultID) } return fmt.Errorf("retrieving %s: %v", backupVaultID, err) } - model := existing.Model - if model == nil { - return fmt.Errorf("retrieving %s: model was nil", backupVaultID) + if model := existing.Model; model != nil { + state.Location = location.Normalize(model.Location) + state.Tags = pointer.From(model.Tags) } - state.Location = location.NormalizeNilable(pointer.To(model.Location)) - state.Tags = pointer.From(model.Tags) - metadata.SetID(backupVaultID) return metadata.Encode(&state) diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 914bd2cd4b78..55afebba590d 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -6,7 +6,6 @@ package netapp import ( "context" "fmt" - "net/http" "strconv" "strings" "time" @@ -125,7 +124,7 @@ func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppBackupVaultModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } if metadata.ResourceData.HasChange("tags") { @@ -138,8 +137,6 @@ func (r NetAppBackupVaultResource) Update() sdk.ResourceFunc { if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - - metadata.SetID(id) } return nil @@ -162,27 +159,26 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppBackupVaultModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } existing, err := client.Get(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) } + state.AccountName = id.NetAppAccountName + state.Name = id.BackupVaultName + state.ResourceGroupName = id.ResourceGroupName + if model := existing.Model; model != nil { - state.Location = location.NormalizeNilable(pointer.To(model.Location)) + state.Location = location.Normalize(model.Location) state.Tags = pointer.From(model.Tags) - state.AccountName = id.NetAppAccountName - state.Name = id.BackupVaultName - state.ResourceGroupName = id.ResourceGroupName } - metadata.SetID(id) - return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_pool_resource.go b/internal/services/netapp/netapp_pool_resource.go index 3bcfda39801b..75395c5c7a4f 100644 --- a/internal/services/netapp/netapp_pool_resource.go +++ b/internal/services/netapp/netapp_pool_resource.go @@ -170,14 +170,11 @@ func resourceNetAppPoolUpdate(d *pluginsdk.ResourceData, meta interface{}) error return err } - shouldUpdate := false update := capacitypools.CapacityPoolPatch{ Properties: &capacitypools.PoolPatchProperties{}, } if d.HasChange("size_in_tb") { - shouldUpdate = true - sizeInTB := int64(d.Get("size_in_tb").(int)) sizeInMB := sizeInTB * 1024 * 1024 sizeInBytes := sizeInMB * 1024 * 1024 @@ -186,26 +183,22 @@ func resourceNetAppPoolUpdate(d *pluginsdk.ResourceData, meta interface{}) error } if d.HasChange("qos_type") { - shouldUpdate = true qosType := capacitypools.QosType(d.Get("qos_type").(string)) update.Properties.QosType = &qosType } if d.HasChange("tags") { - shouldUpdate = true tagsRaw := d.Get("tags").(map[string]interface{}) update.Tags = tags.Expand(tagsRaw) } - if shouldUpdate { - if err = client.PoolsUpdateThenPoll(ctx, *id, update); err != nil { - return fmt.Errorf("updating %s: %+v", id.ID(), err) - } + if err = client.PoolsUpdateThenPoll(ctx, *id, update); err != nil { + return fmt.Errorf("updating %s: %+v", id.ID(), err) + } - // Wait for pool to complete update - if err = waitForPoolCreateOrUpdate(ctx, client, *id); err != nil { - return err - } + // Wait for pool to complete update + if err = waitForPoolCreateOrUpdate(ctx, client, *id); err != nil { + return err } return resourceNetAppPoolRead(d, meta) diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go index 45f84465a7f4..4363c365e39c 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go @@ -255,7 +255,6 @@ func (r NetAppVolumeGroupSapHanaDataSource) Read() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %v", id, err) } - metadata.SetID(id) if model := resp.Model; model != nil { state.Location = location.Normalize(pointer.From(model.Location)) if props := model.Properties; props != nil { diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go index 0b8a41f77b0d..fd971da55496 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go @@ -427,7 +427,7 @@ func (r NetAppVolumeGroupSapHanaResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppVolumeGroupSapHanaModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } metadata.Logger.Infof("Updating %s", id) @@ -545,7 +545,7 @@ func (r NetAppVolumeGroupSapHanaResource) Read() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppVolumeGroupSapHanaModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } existing, err := client.Get(ctx, pointer.From(id)) @@ -556,8 +556,6 @@ func (r NetAppVolumeGroupSapHanaResource) Read() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %v", id, err) } - metadata.SetID(id) - model := netAppModels.NetAppVolumeGroupSapHanaModel{ Name: id.VolumeGroupName, AccountName: id.NetAppAccountName, diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 3e5f4d3e3297..4a9769bd2b1e 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -6,7 +6,6 @@ package netapp import ( "context" "fmt" - "net/http" "strconv" "strings" "time" @@ -495,7 +494,7 @@ func deleteVolume(ctx context.Context, metadata sdk.ResourceMetaData, volumeId s existing, err := client.Get(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) diff --git a/internal/services/netapp/netapp_volume_quota_rule_data_source.go b/internal/services/netapp/netapp_volume_quota_rule_data_source.go index 3e1b5bdc2dbd..bce8374e6d03 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_data_source.go +++ b/internal/services/netapp/netapp_volume_quota_rule_data_source.go @@ -109,8 +109,6 @@ func (r NetAppVolumeQuotaRuleDataSource) Read() sdk.ResourceFunc { state.QuotaTarget = pointer.From(model.Properties.QuotaTarget) state.QuotaType = string(pointer.From(model.Properties.QuotaType)) - metadata.SetID(id) - return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource.go b/internal/services/netapp/netapp_volume_quota_rule_resource.go index d3b7003fff98..814647884286 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource.go @@ -6,7 +6,6 @@ package netapp import ( "context" "fmt" - "net/http" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" @@ -155,7 +154,7 @@ func (r NetAppVolumeQuotaRuleResource) Update() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppVolumeQuotaRuleModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } if metadata.ResourceData.HasChange("quota_size_in_kib") { @@ -170,8 +169,6 @@ func (r NetAppVolumeQuotaRuleResource) Update() sdk.ResourceFunc { if err := client.UpdateThenPoll(ctx, pointer.From(id), update); err != nil { return fmt.Errorf("updating %s: %+v", id, err) } - - metadata.SetID(id) } return nil @@ -194,12 +191,12 @@ func (r NetAppVolumeQuotaRuleResource) Read() sdk.ResourceFunc { metadata.Logger.Infof("Decoding state for %s", id) var state netAppModels.NetAppVolumeQuotaRuleModel if err := metadata.Decode(&state); err != nil { - return err + return fmt.Errorf("decoding: %+v", err) } existing, err := client.Get(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) @@ -210,14 +207,12 @@ func (r NetAppVolumeQuotaRuleResource) Read() sdk.ResourceFunc { model := netAppModels.NetAppVolumeQuotaRuleModel{ Name: id.VolumeQuotaRuleName, VolumeID: volumeID.ID(), - Location: location.NormalizeNilable(pointer.To(existing.Model.Location)), + Location: location.Normalize(existing.Model.Location), QuotaTarget: pointer.From(existing.Model.Properties.QuotaTarget), QuotaSizeInKiB: pointer.From(existing.Model.Properties.QuotaSizeInKiBs), QuotaType: string(pointer.From(existing.Model.Properties.QuotaType)), } - metadata.SetID(id) - return metadata.Encode(&model) }, } @@ -237,7 +232,7 @@ func (r NetAppVolumeQuotaRuleResource) Delete() sdk.ResourceFunc { existing, err := client.Get(ctx, pointer.From(id)) if err != nil { - if existing.HttpResponse.StatusCode == http.StatusNotFound { + if response.WasNotFound(existing.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("retrieving %s: %v", id, err) diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 6a0600f21f50..54cf7c3373cb 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -15,7 +15,9 @@ 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/dataprotection/2024-04-01/backuppolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" @@ -333,7 +335,7 @@ func resourceNetAppVolume() *pluginsdk.Resource { "backup_policy_id": { Type: pluginsdk.TypeString, Required: true, - ValidateFunc: azure.ValidateResourceID, + ValidateFunc: backuppolicies.ValidateBackupPolicyID, Description: "The ID of the backup policy to associate with this volume.", }, @@ -347,7 +349,7 @@ func resourceNetAppVolume() *pluginsdk.Resource { "backup_vault_id": { Type: pluginsdk.TypeString, Required: true, - ValidateFunc: azure.ValidateResourceID, + ValidateFunc: backupvaults.ValidateBackupVaultID, Description: "The ID of the backup vault to associate with this volume.", }, }, @@ -655,7 +657,6 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err return err } - shouldUpdate := false update := volumes.VolumePatch{ Properties: &volumes.VolumePatchProperties{}, } @@ -665,19 +666,16 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err } if d.HasChange("snapshot_directory_visible") { - shouldUpdate = true snapshotDirectoryVisible := d.Get("snapshot_directory_visible").(bool) update.Properties.SnapshotDirectoryVisible = pointer.To(snapshotDirectoryVisible) } if d.HasChange("storage_quota_in_gb") { - shouldUpdate = true storageQuotaInBytes := int64(d.Get("storage_quota_in_gb").(int) * 1073741824) update.Properties.UsageThreshold = utils.Int64(storageQuotaInBytes) } if d.HasChange("export_policy_rule") { - shouldUpdate = true exportPolicyRuleRaw := d.Get("export_policy_rule").([]interface{}) exportPolicyRule := expandNetAppVolumeExportPolicyRulePatch(exportPolicyRuleRaw) update.Properties.ExportPolicy = exportPolicyRule @@ -692,7 +690,6 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, %s", id) } - shouldUpdate = true dataProtectionSnapshotPolicyRaw := d.Get("data_protection_snapshot_policy").([]interface{}) dataProtectionSnapshotPolicy := expandNetAppVolumeDataProtectionSnapshotPolicyPatch(dataProtectionSnapshotPolicyRaw) @@ -709,7 +706,6 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err return fmt.Errorf("snapshot policy cannot be enabled on a data protection volume, %s", id) } - shouldUpdate = true dataProtectionBackupPolicyRaw := d.Get("data_protection_backup_policy").([]interface{}) dataProtectionBackupPolicy := expandNetAppVolumeDataProtectionBackupPolicyPatch(dataProtectionBackupPolicyRaw) @@ -720,13 +716,11 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err } if d.HasChange("throughput_in_mibps") { - shouldUpdate = true throughputMibps := d.Get("throughput_in_mibps") update.Properties.ThroughputMibps = utils.Float(throughputMibps.(float64)) } if d.HasChange("smb_non_browsable_enabled") { - shouldUpdate = true smbNonBrowsable := volumes.SmbNonBrowsableDisabled update.Properties.SmbNonBrowsable = &smbNonBrowsable if d.Get("smb_non_browsable_enabled").(bool) { @@ -736,7 +730,6 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err } if d.HasChange("smb_access_based_enumeration_enabled") { - shouldUpdate = true smbAccessBasedEnumeration := volumes.SmbAccessBasedEnumerationDisabled update.Properties.SmbAccessBasedEnumeration = &smbAccessBasedEnumeration if d.Get("smb_access_based_enumeration_enabled").(bool) { @@ -746,20 +739,17 @@ func resourceNetAppVolumeUpdate(d *pluginsdk.ResourceData, meta interface{}) err } if d.HasChange("tags") { - shouldUpdate = true tagsRaw := d.Get("tags").(map[string]interface{}) update.Tags = tags.Expand(tagsRaw) } - if shouldUpdate { - if err = client.UpdateThenPoll(ctx, *id, update); err != nil { - return fmt.Errorf("updating %s: %+v", id, err) - } + if err = client.UpdateThenPoll(ctx, *id, update); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } - // Wait for volume to complete update - if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { - return err - } + // Wait for volume to complete update + if err := waitForVolumeCreateOrUpdate(ctx, client, *id); err != nil { + return err } return resourceNetAppVolumeRead(d, meta) From 42b5d34f774205a142e54f6ad45eeeade6584762 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 18 Oct 2024 23:20:10 +0000 Subject: [PATCH 18/32] fixing test --- internal/services/netapp/netapp_backup_policy_test.go | 6 +----- internal/services/netapp/netapp_volume_resource_test.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go index 87ce2bfa467b..57d221daf191 100644 --- a/internal/services/netapp/netapp_backup_policy_test.go +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -42,8 +42,6 @@ func TestAccNetAppBackupPolicy_basic(t *testing.T) { Config: r.basic(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), ), }, data.ImportStep(), @@ -59,8 +57,6 @@ func TestAccNetAppBackupPolicy_complete(t *testing.T) { Config: r.complete(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("tags.%").HasValue("1"), - check.That(data.ResourceName).Key("daily_backups_to_keep").HasValue("2"), ), }, data.ImportStep(), @@ -73,7 +69,7 @@ func TestAccNetAppBackupPolicy_update(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.basic(data), + Config: r.complete(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("tags.%").HasValue("1"), diff --git a/internal/services/netapp/netapp_volume_resource_test.go b/internal/services/netapp/netapp_volume_resource_test.go index aacbced5330a..01b05f92dd38 100644 --- a/internal/services/netapp/netapp_volume_resource_test.go +++ b/internal/services/netapp/netapp_volume_resource_test.go @@ -50,7 +50,7 @@ func TestAccNetAppVolume_backupPolicy(t *testing.T) { }) } -func TestAccNetAppVolume_updateBackupPolicy(t *testing.T) { +func TestAccNetAppVolume_backupPolicyUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_netapp_volume", "test") r := NetAppVolumeResource{} From c8e2b33053a25ee8007b1d2e3e8e74cc0f599e94 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 18 Oct 2024 23:26:30 +0000 Subject: [PATCH 19/32] rolling back id validations --- internal/services/netapp/netapp_volume_resource.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 54cf7c3373cb..372c3cfffc14 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -15,9 +15,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/dataprotection/2024-04-01/backuppolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups" - "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes" "github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication" @@ -335,7 +333,7 @@ func resourceNetAppVolume() *pluginsdk.Resource { "backup_policy_id": { Type: pluginsdk.TypeString, Required: true, - ValidateFunc: backuppolicies.ValidateBackupPolicyID, + ValidateFunc: azure.ValidateResourceID, Description: "The ID of the backup policy to associate with this volume.", }, @@ -349,7 +347,7 @@ func resourceNetAppVolume() *pluginsdk.Resource { "backup_vault_id": { Type: pluginsdk.TypeString, Required: true, - ValidateFunc: backupvaults.ValidateBackupVaultID, + ValidateFunc: azure.ValidateResourceID, Description: "The ID of the backup vault to associate with this volume.", }, }, From 68235ff77f72cbe28528faf3d0a7b9d635e0b5fa Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Mon, 21 Oct 2024 17:52:39 +0000 Subject: [PATCH 20/32] Fixing format issues --- internal/services/netapp/netapp_backup_policy_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go index 57d221daf191..85379c07c4b6 100644 --- a/internal/services/netapp/netapp_backup_policy_test.go +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -100,10 +100,10 @@ func (r NetAppBackupPolicyResource) basic(data acceptance.TestData) string { %[1]s resource "azurerm_netapp_backup_policy" "test" { - name = "acctest-NetAppBackupPolicy-%[2]d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_name = azurerm_netapp_account.test.name + name = "acctest-NetAppBackupPolicy-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_name = azurerm_netapp_account.test.name } `, r.template(data), data.RandomInteger) } From 00e9aa124572bcad5a0a29e3fc6a71fb79f3425c Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Wed, 30 Oct 2024 17:16:04 +0000 Subject: [PATCH 21/32] Updated _maintainers folder --- internal/services/netapp/_maintainers/README.md | 4 ++++ internal/services/netapp/_maintainers/maintained_by | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 internal/services/netapp/_maintainers/maintained_by diff --git a/internal/services/netapp/_maintainers/README.md b/internal/services/netapp/_maintainers/README.md index 38816a8b2bbf..81f4b4e5afdb 100644 --- a/internal/services/netapp/_maintainers/README.md +++ b/internal/services/netapp/_maintainers/README.md @@ -2,6 +2,10 @@ Main idea of this file is to give insights to the revewiwers (and authors) on the details of the service and a few whys or do or dont's so PR review process gets faster and don't potentially introduces issues. +## Mainteiners +- paulomarquesc +- Orexii + ## Acceptance Tests - There is lack of SMB-related acct tests, the reason for that is that it requires Active Directory Domain Controller infrastucture which is not available, SMB-related tests can only be added the PR author provides such infrastructure which is not that trivial, so we should not require SMB tests until it is implemented unless it comes with Domain Controller setup automation, otherwise, these acceptance tests will be failing and causing disruptions in CI or bulk testing. - New tests failing should not be accepted. diff --git a/internal/services/netapp/_maintainers/maintained_by b/internal/services/netapp/_maintainers/maintained_by deleted file mode 100644 index dda8160f7cdb..000000000000 --- a/internal/services/netapp/_maintainers/maintained_by +++ /dev/null @@ -1,2 +0,0 @@ -paulomarquesc -Orexii \ No newline at end of file From adda2cb5caea97c87bb1f054e7432150fd60a0b2 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Mon, 11 Nov 2024 23:14:22 +0000 Subject: [PATCH 22/32] Updating with new features block framework --- internal/provider/framework/config.go | 23 +++++++++++++++++++++++ internal/provider/framework/model.go | 12 ++++++++++++ internal/provider/framework/provider.go | 14 ++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/internal/provider/framework/config.go b/internal/provider/framework/config.go index c34676741127..cc625e0fa298 100644 --- a/internal/provider/framework/config.go +++ b/internal/provider/framework/config.go @@ -481,6 +481,29 @@ func (p *ProviderConfig) Load(ctx context.Context, data *ProviderModel, tfVersio f.RecoveryService.VMBackupStopProtectionAndRetainDataOnDestroy = false f.RecoveryService.PurgeProtectedItemsFromVaultOnDestroy = false } + + if !features.NetApp.IsNull() && !features.NetApp.IsUnknown() { + var feature []NetApp + d := features.NetApp.ElementsAs(ctx, &feature, true) + diags.Append(d...) + if diags.HasError() { + return + } + + f.NetApp.DeleteBackupsOnBackupVaultDestroy = false + if !feature[0].DeleteBackupsOnBackupVaultDestroy.IsNull() && !feature[0].DeleteBackupsOnBackupVaultDestroy.IsUnknown() { + f.NetApp.DeleteBackupsOnBackupVaultDestroy = feature[0].DeleteBackupsOnBackupVaultDestroy.ValueBool() + } + + f.NetApp.PreventVolumeDestruction = true + if !feature[0].PreventVolumeDestruction.IsNull() && !feature[0].PreventVolumeDestruction.IsUnknown() { + f.NetApp.PreventVolumeDestruction = feature[0].PreventVolumeDestruction.ValueBool() + } + + } else { + f.NetApp.DeleteBackupsOnBackupVaultDestroy = false + f.NetApp.PreventVolumeDestruction = true + } } p.clientBuilder.Features = f diff --git a/internal/provider/framework/model.go b/internal/provider/framework/model.go index 84388a4b5d57..082edef187c8 100644 --- a/internal/provider/framework/model.go +++ b/internal/provider/framework/model.go @@ -58,6 +58,7 @@ type Features struct { MachineLearning types.List `tfsdk:"machine_learning"` RecoveryService types.List `tfsdk:"recovery_service"` RecoveryServicesVaults types.List `tfsdk:"recovery_services_vaults"` + NetApp types.List `tfsdk:"netapp"` } // FeaturesAttributes and the other block attribute vars are required for unit testing on the Load func @@ -80,6 +81,7 @@ var FeaturesAttributes = map[string]attr.Type{ "machine_learning": types.ListType{}.WithElementType(types.ObjectType{}.WithAttributeTypes(MachineLearningAttributes)), "recovery_service": types.ListType{}.WithElementType(types.ObjectType{}.WithAttributeTypes(RecoveryServiceAttributes)), "recovery_services_vaults": types.ListType{}.WithElementType(types.ObjectType{}.WithAttributeTypes(RecoveryServiceVaultsAttributes)), + "netapp": types.ListType{}.WithElementType(types.ObjectType{}.WithAttributeTypes(NetAppAttributes)), } type APIManagement struct { @@ -255,3 +257,13 @@ type RecoveryServiceVaults struct { var RecoveryServiceVaultsAttributes = map[string]attr.Type{ "recover_soft_deleted_backup_protected_vm": types.BoolType, } + +type NetApp struct { + DeleteBackupsOnBackupVaultDestroy types.Bool `tfsdk:"delete_backups_on_backup_vault_destroy"` + PreventVolumeDestruction types.Bool `tfsdk:"prevent_volume_destruction"` +} + +var NetAppAttributes = map[string]attr.Type{ + "delete_backups_on_backup_vault_destroy": types.BoolType, + "prevent_volume_destruction": types.BoolType, +} diff --git a/internal/provider/framework/provider.go b/internal/provider/framework/provider.go index 66a6c596a0d9..f8a474b5170f 100644 --- a/internal/provider/framework/provider.go +++ b/internal/provider/framework/provider.go @@ -463,6 +463,20 @@ func (p *azureRmFrameworkProvider) Schema(_ context.Context, _ provider.SchemaRe }, }, }, + "neapp": schema.ListNestedBlock{ + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "delete_backups_on_backup_vault_destroy": schema.BoolAttribute{ + Optional: true, + Description: "When enabled, backups will be deleted when the `azurerm_netapp_backup_vault` resource is destroyed", + }, + "prevent_volume_destruction": schema.BoolAttribute{ + Description: "When enabled, the volume will not be destroyed, safeguarding from severe data loss", + Optional: true, + }, + }, + }, + }, }, }, }, From 3754d568e91aa1d975cec3c3411b4fad46dc987f Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Tue, 12 Nov 2024 22:54:16 +0000 Subject: [PATCH 23/32] fixing modules.txt issue --- vendor/modules.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/modules.txt b/vendor/modules.txt index 3bb51252b92c..41bfc53c87da 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -662,6 +662,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simp github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/mongoclusters +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30 github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators From 9213e05520895488c02386b626fb0f90d37ce7ee Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Wed, 13 Nov 2024 18:22:15 +0000 Subject: [PATCH 24/32] Applying suggestions from another PR review round --- .../nfsv3_volume_with_backup_policy/main.tf | 2 +- internal/provider/framework/config_test.go | 19 ++++++++ internal/provider/framework/provider.go | 2 +- .../services/netapp/_maintainers/README.md | 43 ++++++++++++++++--- .../netapp/netapp_backup_policy_resource.go | 8 ---- .../netapp/netapp_backup_vault_resource.go | 8 ++-- .../services/netapp/netapp_volume_helper.go | 20 ++++----- .../docs/r/netapp_backup_policy.html.markdown | 17 +++----- website/docs/r/netapp_volume.html.markdown | 2 +- 9 files changed, 79 insertions(+), 42 deletions(-) diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf index 03831be19f39..f4d131286a0e 100755 --- a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf +++ b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf @@ -3,7 +3,7 @@ provider "azurerm" { netapp { prevent_volume_destruction = false delete_backups_on_backup_vault_destroy = true - } + } } } diff --git a/internal/provider/framework/config_test.go b/internal/provider/framework/config_test.go index 485420b0a392..6f2fab30ccd8 100644 --- a/internal/provider/framework/config_test.go +++ b/internal/provider/framework/config_test.go @@ -200,6 +200,18 @@ func TestProviderConfig_LoadDefault(t *testing.T) { if features.RecoveryService.PurgeProtectedItemsFromVaultOnDestroy { t.Errorf("expected recovery_service.PurgeProtectedItemsFromVaultOnDestroy to be false") } + + if features.RecoveryService.PurgeProtectedItemsFromVaultOnDestroy { + t.Errorf("expected recovery_service.PurgeProtectedItemsFromVaultOnDestroy to be false") + } + + if features.NetApp.DeleteBackupsOnBackupVaultDestroy { + t.Errorf("expected netapp.DeleteBackupsOnBackupVaultDestroy to be false") + } + + if !features.NetApp.PreventVolumeDestruction { + t.Errorf("expected netapp.PreventVolumeDestruction to be true") + } } // TODO - helper functions to make setting up test date more easily so we can add more configuration coverage @@ -307,6 +319,12 @@ func defaultFeaturesList() types.List { }) recoveryServicesVaultsList, _ := basetypes.NewListValue(types.ObjectType{}.WithAttributeTypes(RecoveryServiceVaultsAttributes), []attr.Value{recoveryServicesVaults}) + netapp, _ := basetypes.NewObjectValueFrom(context.Background(), NetAppAttributes, map[string]attr.Value{ + "delete_backups_on_backup_vault_destroy": basetypes.NewBoolNull(), + "prevent_volume_destruction": basetypes.NewBoolNull(), + }) + netappList, _ := basetypes.NewListValue(types.ObjectType{}.WithAttributeTypes(NetAppAttributes), []attr.Value{netapp}) + fData, d := basetypes.NewObjectValue(FeaturesAttributes, map[string]attr.Value{ "api_management": apiManagementList, "app_configuration": appConfigurationList, @@ -325,6 +343,7 @@ func defaultFeaturesList() types.List { "machine_learning": machineLearningList, "recovery_service": recoveryServicesList, "recovery_services_vaults": recoveryServicesVaultsList, + "netapp": netappList, }) fmt.Printf("%+v", d) diff --git a/internal/provider/framework/provider.go b/internal/provider/framework/provider.go index 4aa76954851f..50c49d8ec858 100644 --- a/internal/provider/framework/provider.go +++ b/internal/provider/framework/provider.go @@ -468,7 +468,7 @@ func (p *azureRmFrameworkProvider) Schema(_ context.Context, _ provider.SchemaRe }, }, }, - "neapp": schema.ListNestedBlock{ + "netapp": schema.ListNestedBlock{ NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "delete_backups_on_backup_vault_destroy": schema.BoolAttribute{ diff --git a/internal/services/netapp/_maintainers/README.md b/internal/services/netapp/_maintainers/README.md index 81f4b4e5afdb..7234ae36e3f5 100644 --- a/internal/services/netapp/_maintainers/README.md +++ b/internal/services/netapp/_maintainers/README.md @@ -1,22 +1,53 @@ # This is a maintainer file for the Azure NetApp Files service. -Main idea of this file is to give insights to the revewiwers (and authors) on the details of the service and a few whys or do or dont's so PR review process gets faster and don't potentially introduces issues. +This document gives insights into who is maintaining this service and includes details for why certain decisions in this service package have been made. ## Mainteiners + - paulomarquesc -- Orexii +- orexii ## Acceptance Tests -- There is lack of SMB-related acct tests, the reason for that is that it requires Active Directory Domain Controller infrastucture which is not available, SMB-related tests can only be added the PR author provides such infrastructure which is not that trivial, so we should not require SMB tests until it is implemented unless it comes with Domain Controller setup automation, otherwise, these acceptance tests will be failing and causing disruptions in CI or bulk testing. + +- There is lack of SMB-related acceptance tests because it requires Active Directory Domain Controller infrastructure which is not easily automatable. SMB-related tests can only be tested if the infrastructure is setup beforehand which is not that trivial. We should not require SMB tests unless it comes with Domain Controller setup automation. Without automation, the SMB acceptance tests will fail and cause disruptions in CI/bulk testing. + - New tests failing should not be accepted. ## Polling functions -- Some Netapp resources requires an extra type of polling mechanism, usually named wait`whatever is the resource name and operation` for example: + +- Some Netapp resources requires an extra type of polling mechanism. For example: ```go // Waiting for volume be completely provisioned if err := waitForVolumeCreateOrUpdate(ctx, client, id); err != nil { return err } - ``` - This seems redundant but it is not, some operations return from regular SDK polling as completed but in fact due to several factors it is still in progress, so we need to wait for it to be really completed, for this reason, we should not ask PR authors to remove these type of wait functions. \ No newline at end of file + ``` + + This is because some operations return from regular SDK polling as completed but due to several factors it is still in progress (e.g. ARM caching, software and hardware layer sync delays, etc.). These wait functions are necessary and should not be removed. + +## Data loss prevention protection + +- Due to possibility of a volume to be deleted due to configuration changes on config file or changes made outside of Terraform, we have decided to not allow deletion of volumes by default. This is to prevent data loss. If you want to delete a volume, you need to set the feature block configuration `prevent_deletion_if_contains_resources` argument to `true`. + + In our tests we have added this block so the tests can delete the resources, but in production customers should not allow deletion of volumes by default. + + ```hcl + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } + ``` + +## Resource Group Deletion on Tests + +- A feature block configuration needs to be set to ensure tests conclude when Microsoft maintainers execute their testing. Due to some Microsoft subscription management policies, certain resources are created by default during the tests. This block allows the deletion of the resource group at the end of the tests. + +```hcl + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +``` diff --git a/internal/services/netapp/netapp_backup_policy_resource.go b/internal/services/netapp/netapp_backup_policy_resource.go index 1c7aa687eefa..7de17927101f 100644 --- a/internal/services/netapp/netapp_backup_policy_resource.go +++ b/internal/services/netapp/netapp_backup_policy_resource.go @@ -256,14 +256,6 @@ func (r NetAppBackupPolicyResource) Delete() sdk.ResourceFunc { return err } - existing, err := client.BackupPoliciesGet(ctx, pointer.From(id)) - if err != nil { - if response.WasNotFound(existing.HttpResponse) { - return metadata.MarkAsGone(id) - } - return fmt.Errorf("retrieving %s: %v", id, err) - } - if err = client.BackupPoliciesDeleteThenPoll(ctx, pointer.From(id)); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 55afebba590d..1d966b0dcfad 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -243,7 +243,7 @@ func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { return err } - // DeleteThenPoll cannot be used due to potential racing condition where backup actually started when volume got deleted but it takes time for it to show up within the vault + // DeleteThenPoll cannot be used due to potential race condition where the backup started when the volume got deleted but it takes time for it to show up within the vault // This will be handled by waitForBackupVaultDeletion and operation will be retried if needed if _, err := vaultClient.Delete(ctx, pointer.From(id)); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) @@ -256,7 +256,7 @@ func (r NetAppBackupVaultResource) Delete() sdk.ResourceFunc { } if strings.Contains(err.Error(), "backups found on vault") { - // Backup may not be showing up in the vault yet through a GET, wait for a bit before retrying + // Backup may not show up in the vault through a GET so we will wait for a bit before retrying time.Sleep(30 * time.Second) continue } @@ -302,8 +302,8 @@ func netappBackupVaultStateRefreshFunc(ctx context.Context, vaultClient *backupv return nil, "", fmt.Errorf("retrieving %s: %s", id, err) } - // Handling a race condition where backup actually started when volume got deleted but it takes time for it to show up within the vault - // vault deletion process will hang until the deadline is reached and never retry to delete the backup preventing vault to be deleted. + // Handling a race condition where the backup started but the volume got deleted and it takes time for it to show up within the vault. + // The vault deletion process will hang until the deadline is reached and never retry to delete the backup preventing vault to be deleted. // For this to work, need to scrub activity logs to see if there was a failed deletion operation due to backup just showing up in the vault // midway after the vault deletion process started. backupVaultID := backups.NewBackupVaultID(id.SubscriptionId, id.ResourceGroupName, id.NetAppAccountName, id.BackupVaultName) diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 8cf0fd7da5c3..91796d89384e 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -302,7 +302,7 @@ func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes. } func expandNetAppVolumeDataProtectionBackupPolicyPatch(input []interface{}) *volumes.VolumePatchPropertiesDataProtection { - if len(input) == 0 { + if len(input) == 0 || input[0] == nil { return &volumes.VolumePatchPropertiesDataProtection{} } @@ -310,18 +310,16 @@ func expandNetAppVolumeDataProtectionBackupPolicyPatch(input []interface{}) *vol backupRaw := input[0].(map[string]interface{}) - if backupRaw != nil { - if v, ok := backupRaw["backup_policy_id"]; ok { - backupPolicyObject.BackupPolicyId = utils.String(v.(string)) - } + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } - if v, ok := backupRaw["policy_enabled"]; ok { - backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) - } + if v, ok := backupRaw["policy_enabled"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } - if v, ok := backupRaw["backup_vault_id"]; ok { - backupPolicyObject.BackupVaultId = utils.String(v.(string)) - } + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) } return &volumes.VolumePatchPropertiesDataProtection{ diff --git a/website/docs/r/netapp_backup_policy.html.markdown b/website/docs/r/netapp_backup_policy.html.markdown index 88def825ea27..62baec2951e5 100644 --- a/website/docs/r/netapp_backup_policy.html.markdown +++ b/website/docs/r/netapp_backup_policy.html.markdown @@ -25,14 +25,11 @@ resource "azurerm_netapp_account" "example" { } resource "azurerm_netapp_backup_policy" "example" { - name = "example-netappbackuppolicy" - resource_group_name = azurerm_resource_group.example.name - location = azurerm_resource_group.example.location - account_name = azurerm_netapp_account.example.name - daily_backups_to_keep = 2 - weekly_backups_to_keep = 2 - monthly_backups_to_keep = 2 - enabled = true + name = "example-netappbackuppolicy" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_name = azurerm_netapp_account.example.name + enabled = true } ``` @@ -54,12 +51,12 @@ The following arguments are supported: * `monthly_backups_to_keep` - (Optional) Provides the number of monthly backups to keep, defaults to `1` which is the minimum, maximum is 1019. +~> **Note:** Currently, the combined (daily + weekly + monthy) retention counts cannot exceed 1019. + * `enabled` - (Optional) Whether the Backup Policy is enabled. Defaults to `true`. * `tags` - (Optional) A mapping of tags to assign to the resource. -~> **Note:** Currently, the combined (daily + weekly + monthy) retention counts cannot exceed 1019. - ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index 2d7c9df07fc6..68436260c99b 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -10,7 +10,7 @@ description: |- Manages a NetApp Volume. -!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion). With the latest version of this resource, we're also implementing another safeguard that by default will fail volume deletions if a newly introduced feature block for netapp, called `prevent_volume_destruction`, defaulting to `true`, is not intentionally set to `false`. The example in this page shows all possible protection options you can apply, it is using same values as the defaults. +!>**IMPORTANT:** This resource uses a feature to prevent deletion called `prevent_volume_destruction`, defaulting to `true`. It is intentionally set to `true` to prevent the possibility of accidental data loss. The example in this page shows all possible protection options you can apply, it is using same values as the defaults. ## NetApp Volume Usage From 52c43fb6e764c0db1ce37fe2418e50feb32500c9 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Wed, 13 Nov 2024 19:57:11 +0000 Subject: [PATCH 25/32] removing extra line --- internal/services/netapp/netapp_backup_vault_data_source.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/services/netapp/netapp_backup_vault_data_source.go b/internal/services/netapp/netapp_backup_vault_data_source.go index 57d15ffc1ea8..42721503d8fe 100644 --- a/internal/services/netapp/netapp_backup_vault_data_source.go +++ b/internal/services/netapp/netapp_backup_vault_data_source.go @@ -62,7 +62,6 @@ func (r NetAppBackupVaultDataSource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.BackupVaultsClient var state netAppModels.NetAppBackupVaultModel From 63505926e63c287f4c11f5e5e16e0f545c041e77 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Wed, 13 Nov 2024 20:03:00 +0000 Subject: [PATCH 26/32] Fixing golint issues --- internal/provider/framework/config.go | 1 - internal/services/netapp/netapp_backup_policy_data_source.go | 1 - internal/services/netapp/netapp_backup_policy_resource.go | 2 -- internal/services/netapp/netapp_backup_vault_resource.go | 1 - internal/services/netapp/netapp_volume_resource.go | 1 - 5 files changed, 6 deletions(-) diff --git a/internal/provider/framework/config.go b/internal/provider/framework/config.go index cc625e0fa298..e15a877224be 100644 --- a/internal/provider/framework/config.go +++ b/internal/provider/framework/config.go @@ -499,7 +499,6 @@ func (p *ProviderConfig) Load(ctx context.Context, data *ProviderModel, tfVersio if !feature[0].PreventVolumeDestruction.IsNull() && !feature[0].PreventVolumeDestruction.IsUnknown() { f.NetApp.PreventVolumeDestruction = feature[0].PreventVolumeDestruction.ValueBool() } - } else { f.NetApp.DeleteBackupsOnBackupVaultDestroy = false f.NetApp.PreventVolumeDestruction = true diff --git a/internal/services/netapp/netapp_backup_policy_data_source.go b/internal/services/netapp/netapp_backup_policy_data_source.go index c2281c9dec93..d9d4928b44b5 100644 --- a/internal/services/netapp/netapp_backup_policy_data_source.go +++ b/internal/services/netapp/netapp_backup_policy_data_source.go @@ -82,7 +82,6 @@ func (r NetAppBackupPolicyDataSource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.BackupPolicyClient var state netAppModels.NetAppBackupPolicyModel diff --git a/internal/services/netapp/netapp_backup_policy_resource.go b/internal/services/netapp/netapp_backup_policy_resource.go index 7de17927101f..6e2f495b599d 100644 --- a/internal/services/netapp/netapp_backup_policy_resource.go +++ b/internal/services/netapp/netapp_backup_policy_resource.go @@ -204,7 +204,6 @@ func (r NetAppBackupPolicyResource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.BackupPolicyClient id, err := backuppolicy.ParseBackupPolicyID(metadata.ResourceData.Id()) @@ -248,7 +247,6 @@ func (r NetAppBackupPolicyResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 120 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.BackupPolicyClient id, err := backuppolicy.ParseBackupPolicyID(metadata.ResourceData.Id()) diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 1d966b0dcfad..7f3721ea8c79 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -148,7 +148,6 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.NetApp.BackupVaultsClient id, err := backupvaults.ParseBackupVaultID(metadata.ResourceData.Id()) diff --git a/internal/services/netapp/netapp_volume_resource.go b/internal/services/netapp/netapp_volume_resource.go index 47c867565035..84a45eb5a9b1 100644 --- a/internal/services/netapp/netapp_volume_resource.go +++ b/internal/services/netapp/netapp_volume_resource.go @@ -866,7 +866,6 @@ func resourceNetAppVolumeDelete(d *pluginsdk.ResourceData, meta interface{}) err // Handling DataProtection if netApp.Model != nil && netApp.Model.Properties.DataProtection != nil { - // Handling Replication before volume deletion if netApp.Model.Properties.DataProtection.Replication != nil { dataProtectionReplication := netApp.Model.Properties.DataProtection From 7ed46e76332d82934e5378cb2422be8242f81dcf Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 14 Nov 2024 23:04:08 +0000 Subject: [PATCH 27/32] Fixing newfound issues --- .../netapp_account_encryption_data_source.go | 71 ++++++++++--------- ...app_account_encryption_data_source_test.go | 4 ++ .../netapp_account_encryption_resource.go | 2 + ...netapp_account_encryption_resource_test.go | 2 +- .../netapp/netapp_backup_policy_resource.go | 2 + .../netapp/netapp_backup_vault_resource.go | 2 + ...etapp_volume_group_sap_hana_data_source.go | 2 + .../netapp_volume_group_sap_hana_resource.go | 2 + .../netapp_volume_quota_rule_data_source.go | 2 + .../netapp_volume_quota_rule_resource.go | 2 + 10 files changed, 58 insertions(+), 33 deletions(-) diff --git a/internal/services/netapp/netapp_account_encryption_data_source.go b/internal/services/netapp/netapp_account_encryption_data_source.go index 68a0e2f8f4ae..cee92f5df528 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source.go +++ b/internal/services/netapp/netapp_account_encryption_data_source.go @@ -36,40 +36,34 @@ func (r NetAppAccountEncryptionDataSource) IDValidationFunc() pluginsdk.SchemaVa func (r NetAppAccountEncryptionDataSource) Arguments() map[string]*pluginsdk.Schema { return map[string]*pluginsdk.Schema{ - "netapp_account_id": { Type: pluginsdk.TypeString, Required: true, Description: "The ID of the NetApp Account where encryption will be set.", ValidateFunc: netAppValidate.ValidateNetAppAccountID, }, + } +} +func (r NetAppAccountEncryptionDataSource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ "user_assigned_identity_id": { - Type: pluginsdk.TypeString, - Optional: true, - Description: "The resource ID of the User Assigned Identity to use for encryption.", - ConflictsWith: []string{"system_assigned_identity_principal_id"}, + Type: pluginsdk.TypeString, + Computed: true, }, "system_assigned_identity_principal_id": { - Type: pluginsdk.TypeString, - Optional: true, - Description: "The Principal ID of the System Assigned Identity to use for encryption.", - ConflictsWith: []string{"user_assigned_identity_id"}, + Type: pluginsdk.TypeString, + Computed: true, }, "encryption_key": { - Type: pluginsdk.TypeString, - Optional: true, - Description: "The versionless encryption key url.", + Type: pluginsdk.TypeString, + Computed: true, }, } } -func (r NetAppAccountEncryptionDataSource) Attributes() map[string]*pluginsdk.Schema { - return map[string]*pluginsdk.Schema{} -} - func (r NetAppAccountEncryptionDataSource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, @@ -95,32 +89,45 @@ func (r NetAppAccountEncryptionDataSource) Read() sdk.ResourceFunc { } model := resp.Model - if model.Properties.Encryption == nil { - return fmt.Errorf("encryption information does not exist for %s", id) - } - - anfAccountIdentityFlattened, err := identity.FlattenLegacySystemAndUserAssignedMapToModel(model.Identity) - if err != nil { - return err + if model == nil { + return fmt.Errorf("model is nil for %s", id) } - state.EncryptionKey, err = flattenEncryption(model.Properties.Encryption) - if err != nil { - return err + if model.Properties == nil || model.Properties.Encryption == nil { + return fmt.Errorf("encryption information does not exist for %s", id) } - if len(anfAccountIdentityFlattened) > 0 { - if anfAccountIdentityFlattened[0].Type == identity.TypeSystemAssigned { - state.SystemAssignedIdentityPrincipalID = anfAccountIdentityFlattened[0].PrincipalId + if model.Identity != nil { + expanded, err := identity.FlattenLegacySystemAndUserAssignedMapToModel(model.Identity) + if err != nil { + return fmt.Errorf("flattening identity: %+v", err) } - if anfAccountIdentityFlattened[0].Type == identity.TypeUserAssigned { - if len(anfAccountIdentityFlattened[0].IdentityIds) > 0 { - state.UserAssignedIdentityID = anfAccountIdentityFlattened[0].IdentityIds[0] + for _, identityInfo := range expanded { + if identityInfo.Type == identity.TypeSystemAssigned { + if identityInfo.PrincipalId != "" { + state.SystemAssignedIdentityPrincipalID = identityInfo.PrincipalId + } + } + + if identityInfo.Type == identity.TypeUserAssigned { + if len(identityInfo.IdentityIds) > 0 { + state.UserAssignedIdentityID = identityInfo.IdentityIds[0] + } } } } + if model.Properties.Encryption != nil { + encryptionKey, err := flattenEncryption(model.Properties.Encryption) + if err != nil { + return fmt.Errorf("flattening encryption: %+v", err) + } + state.EncryptionKey = encryptionKey + } + + metadata.SetID(id) + return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_account_encryption_data_source_test.go b/internal/services/netapp/netapp_account_encryption_data_source_test.go index f67803894542..4e561e9b868d 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source_test.go +++ b/internal/services/netapp/netapp_account_encryption_data_source_test.go @@ -34,6 +34,10 @@ func TestAccNetAppAccountEncryptionDataSource_basic(t *testing.T) { func (d NetAppAccountEncryptionDataSource) basic(data acceptance.TestData, tenantID string) string { return fmt.Sprintf(` +// provider "azurerm" { +// features {} +// } + %s data "azurerm_netapp_account_encryption" "test" { diff --git a/internal/services/netapp/netapp_account_encryption_resource.go b/internal/services/netapp/netapp_account_encryption_resource.go index 86d1805c42a4..c860e9143648 100644 --- a/internal/services/netapp/netapp_account_encryption_resource.go +++ b/internal/services/netapp/netapp_account_encryption_resource.go @@ -240,6 +240,8 @@ func (r NetAppAccountEncryptionResource) Read() sdk.ResourceFunc { } } + metadata.SetID(id) + return metadata.Encode(&model) }, } diff --git a/internal/services/netapp/netapp_account_encryption_resource_test.go b/internal/services/netapp/netapp_account_encryption_resource_test.go index b224126f9790..3876639d0ce4 100644 --- a/internal/services/netapp/netapp_account_encryption_resource_test.go +++ b/internal/services/netapp/netapp_account_encryption_resource_test.go @@ -511,7 +511,7 @@ resource "azurerm_netapp_account_encryption" "test" { func (NetAppAccountEncryptionResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { - alias = "acccountEncryption" + // alias = "acccountEncryption" features { resource_group { prevent_deletion_if_contains_resources = false diff --git a/internal/services/netapp/netapp_backup_policy_resource.go b/internal/services/netapp/netapp_backup_policy_resource.go index 6e2f495b599d..3879a392464b 100644 --- a/internal/services/netapp/netapp_backup_policy_resource.go +++ b/internal/services/netapp/netapp_backup_policy_resource.go @@ -238,6 +238,8 @@ func (r NetAppBackupPolicyResource) Read() sdk.ResourceFunc { state.Enabled = pointer.From(model.Properties.Enabled) } + metadata.SetID(id) + return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_backup_vault_resource.go b/internal/services/netapp/netapp_backup_vault_resource.go index 7f3721ea8c79..9f5062641946 100644 --- a/internal/services/netapp/netapp_backup_vault_resource.go +++ b/internal/services/netapp/netapp_backup_vault_resource.go @@ -178,6 +178,8 @@ func (r NetAppBackupVaultResource) Read() sdk.ResourceFunc { state.Tags = pointer.From(model.Tags) } + metadata.SetID(id) + return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go index 0ca686fc6220..7aedf41ca471 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_data_source.go @@ -270,6 +270,8 @@ func (r NetAppVolumeGroupSapHanaDataSource) Read() sdk.ResourceFunc { } } + metadata.SetID(id) + return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go index 077bea433bb4..c8c5e76f1883 100644 --- a/internal/services/netapp/netapp_volume_group_sap_hana_resource.go +++ b/internal/services/netapp/netapp_volume_group_sap_hana_resource.go @@ -568,6 +568,8 @@ func (r NetAppVolumeGroupSapHanaResource) Read() sdk.ResourceFunc { model.Volumes = volumes } + metadata.SetID(id) + return metadata.Encode(&model) }, } diff --git a/internal/services/netapp/netapp_volume_quota_rule_data_source.go b/internal/services/netapp/netapp_volume_quota_rule_data_source.go index d041055a1339..d7084a0bfdc8 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_data_source.go +++ b/internal/services/netapp/netapp_volume_quota_rule_data_source.go @@ -108,6 +108,8 @@ func (r NetAppVolumeQuotaRuleDataSource) Read() sdk.ResourceFunc { state.QuotaTarget = pointer.From(model.Properties.QuotaTarget) state.QuotaType = string(pointer.From(model.Properties.QuotaType)) + metadata.SetID(id) + return metadata.Encode(&state) }, } diff --git a/internal/services/netapp/netapp_volume_quota_rule_resource.go b/internal/services/netapp/netapp_volume_quota_rule_resource.go index 6aa6ccc0bc5b..5dc39c9e63af 100644 --- a/internal/services/netapp/netapp_volume_quota_rule_resource.go +++ b/internal/services/netapp/netapp_volume_quota_rule_resource.go @@ -212,6 +212,8 @@ func (r NetAppVolumeQuotaRuleResource) Read() sdk.ResourceFunc { QuotaType: string(pointer.From(existing.Model.Properties.QuotaType)), } + metadata.SetID(id) + return metadata.Encode(&model) }, } From 92d67b456fa937b05131d680de171374e31136d2 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 14 Nov 2024 23:05:28 +0000 Subject: [PATCH 28/32] Removing comment --- .../netapp/netapp_account_encryption_data_source_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/services/netapp/netapp_account_encryption_data_source_test.go b/internal/services/netapp/netapp_account_encryption_data_source_test.go index 4e561e9b868d..f67803894542 100644 --- a/internal/services/netapp/netapp_account_encryption_data_source_test.go +++ b/internal/services/netapp/netapp_account_encryption_data_source_test.go @@ -34,10 +34,6 @@ func TestAccNetAppAccountEncryptionDataSource_basic(t *testing.T) { func (d NetAppAccountEncryptionDataSource) basic(data acceptance.TestData, tenantID string) string { return fmt.Sprintf(` -// provider "azurerm" { -// features {} -// } - %s data "azurerm_netapp_account_encryption" "test" { From 1b42331809026327451f784fb3fb82cb2de5ecd3 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 14 Nov 2024 23:05:58 +0000 Subject: [PATCH 29/32] Removing another comment --- .../services/netapp/netapp_account_encryption_resource_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/services/netapp/netapp_account_encryption_resource_test.go b/internal/services/netapp/netapp_account_encryption_resource_test.go index 3876639d0ce4..0fa754abc395 100644 --- a/internal/services/netapp/netapp_account_encryption_resource_test.go +++ b/internal/services/netapp/netapp_account_encryption_resource_test.go @@ -511,7 +511,6 @@ resource "azurerm_netapp_account_encryption" "test" { func (NetAppAccountEncryptionResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { - // alias = "acccountEncryption" features { resource_group { prevent_deletion_if_contains_resources = false From 16beb073b2dad80aeb68d514b7bc49119241b92c Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 14 Nov 2024 23:45:19 +0000 Subject: [PATCH 30/32] Updating null check and moving README.md to root of service --- .../netapp/{_maintainers => }/README.md | 0 .../services/netapp/netapp_volume_helper.go | 22 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) rename internal/services/netapp/{_maintainers => }/README.md (100%) diff --git a/internal/services/netapp/_maintainers/README.md b/internal/services/netapp/README.md similarity index 100% rename from internal/services/netapp/_maintainers/README.md rename to internal/services/netapp/README.md diff --git a/internal/services/netapp/netapp_volume_helper.go b/internal/services/netapp/netapp_volume_helper.go index 91796d89384e..67c93b7cfe42 100644 --- a/internal/services/netapp/netapp_volume_helper.go +++ b/internal/services/netapp/netapp_volume_helper.go @@ -274,7 +274,7 @@ func expandNetAppVolumeDataProtectionSnapshotPolicyPatch(input []interface{}) *v } func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes.VolumePropertiesDataProtection { - if len(input) == 0 { + if len(input) == 0 || input == nil { return &volumes.VolumePropertiesDataProtection{} } @@ -282,18 +282,16 @@ func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes. backupRaw := input[0].(map[string]interface{}) - if backupRaw != nil { - if v, ok := backupRaw["backup_policy_id"]; ok { - backupPolicyObject.BackupPolicyId = utils.String(v.(string)) - } + if v, ok := backupRaw["backup_policy_id"]; ok { + backupPolicyObject.BackupPolicyId = utils.String(v.(string)) + } - if v, ok := backupRaw["policy_enabled"]; ok { - backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) - } + if v, ok := backupRaw["policy_enabled"]; ok { + backupPolicyObject.PolicyEnforced = utils.Bool(v.(bool)) + } - if v, ok := backupRaw["backup_vault_id"]; ok { - backupPolicyObject.BackupVaultId = utils.String(v.(string)) - } + if v, ok := backupRaw["backup_vault_id"]; ok { + backupPolicyObject.BackupVaultId = utils.String(v.(string)) } return &volumes.VolumePropertiesDataProtection{ @@ -302,7 +300,7 @@ func expandNetAppVolumeDataProtectionBackupPolicy(input []interface{}) *volumes. } func expandNetAppVolumeDataProtectionBackupPolicyPatch(input []interface{}) *volumes.VolumePatchPropertiesDataProtection { - if len(input) == 0 || input[0] == nil { + if len(input) == 0 || input == nil { return &volumes.VolumePatchPropertiesDataProtection{} } From 54ed614e92554c05d339bd37f1679f1feb3ca996 Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Thu, 14 Nov 2024 15:48:19 -0800 Subject: [PATCH 31/32] Update README.md --- internal/services/netapp/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/services/netapp/README.md b/internal/services/netapp/README.md index 7234ae36e3f5..afdb8f6741bb 100644 --- a/internal/services/netapp/README.md +++ b/internal/services/netapp/README.md @@ -17,12 +17,12 @@ This document gives insights into who is maintaining this service and includes d - Some Netapp resources requires an extra type of polling mechanism. For example: - ```go - // Waiting for volume be completely provisioned - if err := waitForVolumeCreateOrUpdate(ctx, client, id); err != nil { - return err - } - ``` +```go +// Waiting for volume be completely provisioned +if err := waitForVolumeCreateOrUpdate(ctx, client, id); err != nil { + return err +} +``` This is because some operations return from regular SDK polling as completed but due to several factors it is still in progress (e.g. ARM caching, software and hardware layer sync delays, etc.). These wait functions are necessary and should not be removed. @@ -32,13 +32,13 @@ This document gives insights into who is maintaining this service and includes d In our tests we have added this block so the tests can delete the resources, but in production customers should not allow deletion of volumes by default. - ```hcl - features { - resource_group { - prevent_deletion_if_contains_resources = false - } +```hcl +features { + resource_group { + prevent_deletion_if_contains_resources = false } - ``` +} +``` ## Resource Group Deletion on Tests From de73bf9c89c91d299bbd1b0026d1dc2266975f98 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Thu, 14 Nov 2024 23:52:41 +0000 Subject: [PATCH 32/32] Fixing formatting issues --- internal/services/netapp/netapp_backup_policy_test.go | 1 - internal/services/netapp/netapp_backup_vault_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/internal/services/netapp/netapp_backup_policy_test.go b/internal/services/netapp/netapp_backup_policy_test.go index 85379c07c4b6..768662c5a34d 100644 --- a/internal/services/netapp/netapp_backup_policy_test.go +++ b/internal/services/netapp/netapp_backup_policy_test.go @@ -25,7 +25,6 @@ func (t NetAppBackupPolicyResource) Exists(ctx context.Context, clients *clients } resp, err := clients.NetApp.BackupPolicyClient.BackupPoliciesGet(ctx, *id) - if err != nil { return nil, fmt.Errorf("retrieving %s: %+v", id, err) } diff --git a/internal/services/netapp/netapp_backup_vault_test.go b/internal/services/netapp/netapp_backup_vault_test.go index 70516ed1a92f..0f4472577645 100644 --- a/internal/services/netapp/netapp_backup_vault_test.go +++ b/internal/services/netapp/netapp_backup_vault_test.go @@ -26,7 +26,6 @@ func (t NetAppBackupVaultResource) Exists(ctx context.Context, clients *clients. } resp, err := clients.NetApp.BackupVaultsClient.Get(ctx, *id) - if err != nil { if resp.HttpResponse.StatusCode == http.StatusNotFound { return utils.Bool(false), nil