From 080a1d51ffda06b91760a6ac5d9737016ee648a7 Mon Sep 17 00:00:00 2001 From: Aris van Ommeren Date: Wed, 6 Oct 2021 13:10:14 +0200 Subject: [PATCH] Fix linting --- internal/services/mssql/helper/database.go | 3 --- internal/services/mssql/mssql_database_resource.go | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/services/mssql/helper/database.go b/internal/services/mssql/helper/database.go index 1c732eaba56bb..574adfca5b6e9 100644 --- a/internal/services/mssql/helper/database.go +++ b/internal/services/mssql/helper/database.go @@ -79,9 +79,6 @@ func FindDatabaseReplicationPartners(ctx context.Context, databasesClient *sql.D } return nil, fmt.Errorf("reading Replication Links for Database %s (%s): %+v", *linkProps.PartnerDatabase, partnerServerId, err) } - if linksPossiblePartnerIterator.Value == nil { - return nil, fmt.Errorf("reading Replication Links for Database %s (%s): response was nil", *linkProps.PartnerDatabase, partnerServerId) - } linkPossiblePartner := linksPossiblePartnerIterator.Value() if linkPossiblePartner.ReplicationLinkProperties == nil { diff --git a/internal/services/mssql/mssql_database_resource.go b/internal/services/mssql/mssql_database_resource.go index e0fab81bf1aed..9c6ec4bb07cd5 100644 --- a/internal/services/mssql/mssql_database_resource.go +++ b/internal/services/mssql/mssql_database_resource.go @@ -470,8 +470,6 @@ func resourceMsSqlDatabaseCreateUpdate(d *pluginsdk.ResourceData, meta interface currentBackupStorageRedundancy := sql.CurrentBackupStorageRedundancyGeo if storageAccountType == "LRS" { currentBackupStorageRedundancy = sql.CurrentBackupStorageRedundancyLocal - } else if storageAccountType == "GRS" { - currentBackupStorageRedundancy = sql.CurrentBackupStorageRedundancyGeo } else if storageAccountType == "ZRS" { currentBackupStorageRedundancy = sql.CurrentBackupStorageRedundancyZone } @@ -706,10 +704,10 @@ func resourceMsSqlDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) erro d.Set("sku_name", skuName) if props.CurrentBackupStorageRedundancy == sql.CurrentBackupStorageRedundancyLocal { d.Set("storage_account_type", "LRS") - } else if props.CurrentBackupStorageRedundancy == sql.CurrentBackupStorageRedundancyGeo { - d.Set("storage_account_type", "GRS") } else if props.CurrentBackupStorageRedundancy == sql.CurrentBackupStorageRedundancyZone { d.Set("storage_account_type", "ZRS") + } else { + d.Set("storage_account_type", "GRS") } d.Set("zone_redundant", props.ZoneRedundant) }