From 42d9259aa655f01a6babf65ed09e3c175965ad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= Date: Mon, 10 Jan 2022 18:40:28 +0400 Subject: [PATCH] Merge pull request #1308 from snyk/update-azure-deps Update Azure dependencies --- go.mod | 18 +++---- go.sum | 47 ++++++++++--------- pkg/remote/azurerm/init.go | 16 +++---- pkg/remote/azurerm/repository/compute.go | 7 +-- .../azurerm/repository/containerregistry.go | 7 +-- .../repository/containerregistry_test.go | 2 +- .../mock_ContainerRegistryRepository.go | 2 +- .../repository/mock_NetworkRepository.go | 2 +- .../repository/mock_PostgresqlRespository.go | 2 +- .../repository/mock_ResourcesRepository.go | 2 +- .../repository/mock_StorageRespository.go | 2 +- .../repository/mock_blobContainerClient.go | 2 +- .../repository/mock_blobContainerListPager.go | 2 +- .../repository/mock_firewallsClient.go | 2 +- .../repository/mock_firewallsListAllPager.go | 2 +- .../mock_loadBalancerRulesClient.go | 2 +- .../mock_loadBalancerRulesListAllPager.go | 2 +- .../repository/mock_loadBalancersClient.go | 2 +- .../mock_loadBalancersListAllPager.go | 2 +- .../mock_networkSecurityGroupsClient.go | 2 +- .../mock_networkSecurityGroupsListAllPager.go | 2 +- .../mock_postgresqlDatabaseClient.go | 2 +- .../mock_postgresqlServersClient.go | 2 +- .../mock_publicIPAddressesClient.go | 2 +- .../mock_publicIPAddressesListAllPager.go | 2 +- .../azurerm/repository/mock_registryClient.go | 2 +- .../repository/mock_registryListAllPager.go | 2 +- .../repository/mock_resourcesClient.go | 2 +- .../repository/mock_resourcesListPager.go | 2 +- .../repository/mock_routeTablesClient.go | 2 +- .../mock_routeTablesListAllPager.go | 2 +- .../repository/mock_storageAccountClient.go | 2 +- .../mock_storageAccountListPager.go | 2 +- .../azurerm/repository/mock_subnetsClient.go | 2 +- .../repository/mock_subnetsListPager.go | 2 +- .../repository/mock_virtualNetworkClient.go | 2 +- .../mock_virtualNetworksListAllPager.go | 2 +- pkg/remote/azurerm/repository/network.go | 21 +++++---- pkg/remote/azurerm/repository/network_test.go | 2 +- pkg/remote/azurerm/repository/postgresql.go | 9 ++-- .../azurerm/repository/postgresql_test.go | 2 +- pkg/remote/azurerm/repository/privatedns.go | 7 +-- pkg/remote/azurerm/repository/resources.go | 7 +-- .../azurerm/repository/resources_test.go | 2 +- pkg/remote/azurerm/repository/storage.go | 9 ++-- pkg/remote/azurerm/repository/storage_test.go | 2 +- pkg/remote/azurerm_compute_scanner_test.go | 4 +- .../azurerm_containerregistry_scanner_test.go | 2 +- pkg/remote/azurerm_network_scanner_test.go | 10 ++-- pkg/remote/azurerm_postgresql_scanner_test.go | 2 +- pkg/remote/azurerm_privatedns_scanner_test.go | 32 ++++++------- pkg/remote/azurerm_resources_scanner_test.go | 2 +- pkg/remote/azurerm_storage_scanner_test.go | 2 +- .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ .../.terraform.lock.hcl | 21 +++++++++ 61 files changed, 309 insertions(+), 133 deletions(-) create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_a_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_aaaa_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_cname_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_mx_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_ptr_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_srv_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_txt_record/.terraform.lock.hcl create mode 100644 pkg/resource/azurerm/testdata/acc/azurerm_private_dns_zone/.terraform.lock.hcl diff --git a/go.mod b/go.mod index c6733a761..2ec2c5392 100644 --- a/go.mod +++ b/go.mod @@ -5,15 +5,15 @@ go 1.16 require ( cloud.google.com/go/asset v0.1.0 cloud.google.com/go/storage v1.10.0 - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0 - github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry v0.2.0 - github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork v0.3.0 - github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql v0.2.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.1.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.1.0 - github.com/Azure/azure-sdk-for-go/sdk/resources/armresources v0.3.0 - github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.2.0 github.com/Azure/go-autorest/autorest v0.11.3 github.com/aws/aws-sdk-go v1.38.68 github.com/bmatcuk/doublestar/v4 v4.0.1 diff --git a/go.sum b/go.sum index fda3b7405..d7d5bf3e9 100644 --- a/go.sum +++ b/go.sum @@ -48,32 +48,31 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v57.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v57.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v57.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v58.0.0+incompatible h1:Cw16jiP4dI+CK761aq44ol4RV5dUiIIXky1+EKpoiVM= -github.com/Azure/azure-sdk-for-go v58.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 h1:lhSJz9RMbJcTgxifR1hUNJnn6CNYtbgEDtQV22/9RBA= +github.com/Azure/azure-sdk-for-go v59.0.0+incompatible h1:I1ULJqny1qQhUBFy11yDXHhW3pLvbhwV0PTn7mjp9V0= +github.com/Azure/azure-sdk-for-go v59.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0 h1:OYa9vmRX2XC5GXRAzeggG12sF/z5D9Ahtdm9EJ00WN4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0 h1:KQgdWmEOmaJKxaUUZwHAYh12t+b+ZJf8q3friycK1kA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0/go.mod h1:ZPW/Z0kLCTdDZaDbYTetxc9Cxl/2lNqxYHYNOF2bti0= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry v0.2.0 h1:+m3oFDUMWB/WsZiKj4dAcRSJ1muXAxgsDAXcZHYf0pk= -github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry v0.2.0/go.mod h1:NLX6U3EAoo6ZyZeCeBK9r6rwcUrj63yRKWeyzzTsKDg= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0 h1:v9p9TfTbf7AwNb5NYQt7hI41IfPoLFiFkLtb+bmGjT0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0 h1:VBvHGLJbaY0+c66NZHdS9cgjHVYSH6DDa0XJMyrblsI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0/go.mod h1:GJzjM4SR9T0KyX5gKCVyz1ytD8FeWeUPCwtFCt1AyfE= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork v0.3.0 h1:3ICM5L/XRaknp4DUNqdcNtiOzs6Mc3VKeyQp81+JS2Y= -github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork v0.3.0/go.mod h1:YSO+0IW+22kuLybFl2GAYaTDh1VWxNid83hqY/DkpGQ= -github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql v0.2.0 h1:EZ1NQo84rR8CmjynKcKXdTsRa1Th+Lc1HGn91eiSvOg= -github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql v0.2.0/go.mod h1:sbAG2tkFoaiR112qwra1mWRtY82eu+5R1fq2/tylwmE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.1.0 h1:4l29w21L0FDUs7P9u79Uf+qrOzP9pCr+fZ9S2MJqyoc= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.1.0/go.mod h1:F+cuKUGdmO75mkaZjeDE99f9AyZ2BU5CTJAkH+V/QfM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.1.0 h1:UORx/HjbzVZKVYHxkLPxct99ASG3jGhGotwK0el/Jdk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.1.0/go.mod h1:J1kqqAcDlSkUsBEubT3lQzq73nVwQdHxcsdnttwu2i0= -github.com/Azure/azure-sdk-for-go/sdk/resources/armresources v0.3.0 h1:I1cONUC2nKiGU3JXm2jRB4+QIs06lGqkplVpwy4ie9o= -github.com/Azure/azure-sdk-for-go/sdk/resources/armresources v0.3.0/go.mod h1:LdmyxRi5+2XPnbuv0X9c6ymGle+UkoNvqsBvG+oG53M= -github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage v0.2.0 h1:LOq4ZG6rMgTAZTyGbYHyxL1EVfZdngpUDRY/KvBToMs= -github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage v0.2.0/go.mod h1:mIFJgQ93RCQPBsN2jBDzDOfwJpLacGwXIxmirNQMiq4= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1 h1:BUYIbDf/mMZ8945v3QkG3OuqGVyS4Iek0AOLwdRAYoc= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.2.0 h1:BHTEy92f31e5CRnjn35IjRCQagwmPzfpomInzX1m7Jw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v0.2.0/go.mod h1:gqSH+t+W3CJGVmabhRgUav5l9jBv5VkMmpmboVtYqoI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v0.2.0 h1:zwWanmIYlLi/xrWWmEziISG+/hb2DVFgwc/0J/cijYk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v0.2.0/go.mod h1:nFJEiraPCmdn0tKe4BW988/6P6CYHhlYXTYFAe1Lygw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v0.2.0 h1:CyjRCNWYbJ5auOsvNvqikFagdigTjEO3TP7+OZc20fk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v0.2.0/go.mod h1:4h3E+JM3CxvgkL6OSJ0ac60aC1OH7nDVozji5bkyhJw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v0.2.0 h1:Vv19nEh1EmNxCdGQqlZyw894ELzOpkn8vhopYXFuWoY= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v0.2.0/go.mod h1:83YIXMettj3oKIpF9ZXSegEwDCqdjsCZgBoQIQslQUc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.2.0 h1:CNib9McHOQLbZHvQKX/JVcEGSQcmk/8BsN+VpvUcmCA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v0.2.0/go.mod h1:hXSmxO57VDkrEamlKEX5tC8z+AEySZ3cSbIRpn7Dpqo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.2.0 h1:SdyLrG1OreJ3X8CoPgQnKU847+61sJ9TVfvtrdjX6rI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.2.0/go.mod h1:aSuRFfpDntiZkIh+XmoL9EV4FS4ViptLBwFRytECG/8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.2.0 h1:CGIYpRDCMotOj1a/1OZOPAwKq0xFKV+/8lHo9GB6Lw4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.2.0/go.mod h1:6OekxBFJ2ICBhqajYGgX4dY58H9x3J5FXikPo43nKYI= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.3 h1:fyYnmYujkIXUgv88D9/Wo2ybE4Zwd/TmQd5sSI5u2Ws= @@ -205,6 +204,7 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -921,6 +921,7 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= diff --git a/pkg/remote/azurerm/init.go b/pkg/remote/azurerm/init.go index b6d78b110..560935837 100644 --- a/pkg/remote/azurerm/init.go +++ b/pkg/remote/azurerm/init.go @@ -37,17 +37,17 @@ func Init( if err != nil { return err } - con := arm.NewDefaultConnection(cred, nil) + clientOptions := &arm.ClientOptions{} c := cache.New(100) - storageAccountRepo := repository.NewStorageRepository(con, providerConfig, c) - networkRepo := repository.NewNetworkRepository(con, providerConfig, c) - resourcesRepo := repository.NewResourcesRepository(con, providerConfig, c) - containerRegistryRepo := repository.NewContainerRegistryRepository(con, providerConfig, c) - postgresqlRepo := repository.NewPostgresqlRepository(con, providerConfig, c) - privateDNSRepo := repository.NewPrivateDNSRepository(con, providerConfig, c) - computeRepo := repository.NewComputeRepository(con, providerConfig, c) + storageAccountRepo := repository.NewStorageRepository(cred, clientOptions, providerConfig, c) + networkRepo := repository.NewNetworkRepository(cred, clientOptions, providerConfig, c) + resourcesRepo := repository.NewResourcesRepository(cred, clientOptions, providerConfig, c) + containerRegistryRepo := repository.NewContainerRegistryRepository(cred, clientOptions, providerConfig, c) + postgresqlRepo := repository.NewPostgresqlRepository(cred, clientOptions, providerConfig, c) + privateDNSRepo := repository.NewPrivateDNSRepository(cred, clientOptions, providerConfig, c) + computeRepo := repository.NewComputeRepository(cred, clientOptions, providerConfig, c) providerLibrary.AddProvider(terraform.AZURE, provider) deserializer := resource.NewDeserializer(factory) diff --git a/pkg/remote/azurerm/repository/compute.go b/pkg/remote/azurerm/repository/compute.go index b74411665..31aa65447 100644 --- a/pkg/remote/azurerm/repository/compute.go +++ b/pkg/remote/azurerm/repository/compute.go @@ -3,6 +3,7 @@ package repository import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/snyk/driftctl/pkg/remote/azurerm/common" @@ -54,10 +55,10 @@ type computeRepository struct { cache cache.Cache } -func NewComputeRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *computeRepository { +func NewComputeRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *computeRepository { return &computeRepository{ - &imagesClientImpl{armcompute.NewImagesClient(con, config.SubscriptionID)}, - &sshPublicKeyClientImpl{armcompute.NewSSHPublicKeysClient(con, config.SubscriptionID)}, + &imagesClientImpl{armcompute.NewImagesClient(config.SubscriptionID, cred, options)}, + &sshPublicKeyClientImpl{armcompute.NewSSHPublicKeysClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/containerregistry.go b/pkg/remote/azurerm/repository/containerregistry.go index 5a8f10c60..fd1b35b5b 100644 --- a/pkg/remote/azurerm/repository/containerregistry.go +++ b/pkg/remote/azurerm/repository/containerregistry.go @@ -3,8 +3,9 @@ package repository import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/snyk/driftctl/pkg/remote/azurerm/common" "github.com/snyk/driftctl/pkg/remote/cache" ) @@ -35,9 +36,9 @@ type containerRegistryRepository struct { cache cache.Cache } -func NewContainerRegistryRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *containerRegistryRepository { +func NewContainerRegistryRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *containerRegistryRepository { return &containerRegistryRepository{ - ®istryClientImpl{client: armcontainerregistry.NewRegistriesClient(con, config.SubscriptionID)}, + ®istryClientImpl{client: armcontainerregistry.NewRegistriesClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/containerregistry_test.go b/pkg/remote/azurerm/repository/containerregistry_test.go index 5506fffdd..5df8159df 100644 --- a/pkg/remote/azurerm/repository/containerregistry_test.go +++ b/pkg/remote/azurerm/repository/containerregistry_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/pkg/errors" "github.com/snyk/driftctl/pkg/remote/cache" "github.com/stretchr/testify/assert" diff --git a/pkg/remote/azurerm/repository/mock_ContainerRegistryRepository.go b/pkg/remote/azurerm/repository/mock_ContainerRegistryRepository.go index d96f50979..c5bd8bcd3 100644 --- a/pkg/remote/azurerm/repository/mock_ContainerRegistryRepository.go +++ b/pkg/remote/azurerm/repository/mock_ContainerRegistryRepository.go @@ -3,7 +3,7 @@ package repository import ( - armcontainerregistry "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_NetworkRepository.go b/pkg/remote/azurerm/repository/mock_NetworkRepository.go index 87882c390..009058d47 100644 --- a/pkg/remote/azurerm/repository/mock_NetworkRepository.go +++ b/pkg/remote/azurerm/repository/mock_NetworkRepository.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_PostgresqlRespository.go b/pkg/remote/azurerm/repository/mock_PostgresqlRespository.go index 272de18b3..9c69e5da3 100644 --- a/pkg/remote/azurerm/repository/mock_PostgresqlRespository.go +++ b/pkg/remote/azurerm/repository/mock_PostgresqlRespository.go @@ -3,7 +3,7 @@ package repository import ( - armpostgresql "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_ResourcesRepository.go b/pkg/remote/azurerm/repository/mock_ResourcesRepository.go index 154c5ad3e..bc4cf0233 100644 --- a/pkg/remote/azurerm/repository/mock_ResourcesRepository.go +++ b/pkg/remote/azurerm/repository/mock_ResourcesRepository.go @@ -3,7 +3,7 @@ package repository import ( - armresources "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_StorageRespository.go b/pkg/remote/azurerm/repository/mock_StorageRespository.go index 17e394193..4af38c8d1 100644 --- a/pkg/remote/azurerm/repository/mock_StorageRespository.go +++ b/pkg/remote/azurerm/repository/mock_StorageRespository.go @@ -3,7 +3,7 @@ package repository import ( - armstorage "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_blobContainerClient.go b/pkg/remote/azurerm/repository/mock_blobContainerClient.go index 90f0e682b..a3335bf2f 100644 --- a/pkg/remote/azurerm/repository/mock_blobContainerClient.go +++ b/pkg/remote/azurerm/repository/mock_blobContainerClient.go @@ -3,7 +3,7 @@ package repository import ( - armstorage "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_blobContainerListPager.go b/pkg/remote/azurerm/repository/mock_blobContainerListPager.go index 5ef312766..5314dee7b 100644 --- a/pkg/remote/azurerm/repository/mock_blobContainerListPager.go +++ b/pkg/remote/azurerm/repository/mock_blobContainerListPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armstorage "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_firewallsClient.go b/pkg/remote/azurerm/repository/mock_firewallsClient.go index 118d0e6ae..be75f3707 100644 --- a/pkg/remote/azurerm/repository/mock_firewallsClient.go +++ b/pkg/remote/azurerm/repository/mock_firewallsClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_firewallsListAllPager.go b/pkg/remote/azurerm/repository/mock_firewallsListAllPager.go index 07ea7b93e..3f41bcb69 100644 --- a/pkg/remote/azurerm/repository/mock_firewallsListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_firewallsListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_loadBalancerRulesClient.go b/pkg/remote/azurerm/repository/mock_loadBalancerRulesClient.go index 2d1bfd88a..4dd2fc9aa 100644 --- a/pkg/remote/azurerm/repository/mock_loadBalancerRulesClient.go +++ b/pkg/remote/azurerm/repository/mock_loadBalancerRulesClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_loadBalancerRulesListAllPager.go b/pkg/remote/azurerm/repository/mock_loadBalancerRulesListAllPager.go index 73b68b8c4..751f1f98d 100644 --- a/pkg/remote/azurerm/repository/mock_loadBalancerRulesListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_loadBalancerRulesListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_loadBalancersClient.go b/pkg/remote/azurerm/repository/mock_loadBalancersClient.go index 15a942977..8ece65731 100644 --- a/pkg/remote/azurerm/repository/mock_loadBalancersClient.go +++ b/pkg/remote/azurerm/repository/mock_loadBalancersClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_loadBalancersListAllPager.go b/pkg/remote/azurerm/repository/mock_loadBalancersListAllPager.go index 12c9bb5ca..29b8aed04 100644 --- a/pkg/remote/azurerm/repository/mock_loadBalancersListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_loadBalancersListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_networkSecurityGroupsClient.go b/pkg/remote/azurerm/repository/mock_networkSecurityGroupsClient.go index 8a39d4c17..410e85608 100644 --- a/pkg/remote/azurerm/repository/mock_networkSecurityGroupsClient.go +++ b/pkg/remote/azurerm/repository/mock_networkSecurityGroupsClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_networkSecurityGroupsListAllPager.go b/pkg/remote/azurerm/repository/mock_networkSecurityGroupsListAllPager.go index b9d148c71..3629335ce 100644 --- a/pkg/remote/azurerm/repository/mock_networkSecurityGroupsListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_networkSecurityGroupsListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_postgresqlDatabaseClient.go b/pkg/remote/azurerm/repository/mock_postgresqlDatabaseClient.go index 924b73b7e..e18380dda 100644 --- a/pkg/remote/azurerm/repository/mock_postgresqlDatabaseClient.go +++ b/pkg/remote/azurerm/repository/mock_postgresqlDatabaseClient.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armpostgresql "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_postgresqlServersClient.go b/pkg/remote/azurerm/repository/mock_postgresqlServersClient.go index bcbb1d4ee..9aa16c0f3 100644 --- a/pkg/remote/azurerm/repository/mock_postgresqlServersClient.go +++ b/pkg/remote/azurerm/repository/mock_postgresqlServersClient.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armpostgresql "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_publicIPAddressesClient.go b/pkg/remote/azurerm/repository/mock_publicIPAddressesClient.go index 0b3b3a2bf..64f11a56d 100644 --- a/pkg/remote/azurerm/repository/mock_publicIPAddressesClient.go +++ b/pkg/remote/azurerm/repository/mock_publicIPAddressesClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_publicIPAddressesListAllPager.go b/pkg/remote/azurerm/repository/mock_publicIPAddressesListAllPager.go index dbf64e5e6..915513471 100644 --- a/pkg/remote/azurerm/repository/mock_publicIPAddressesListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_publicIPAddressesListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_registryClient.go b/pkg/remote/azurerm/repository/mock_registryClient.go index 314f3a125..81a27070c 100644 --- a/pkg/remote/azurerm/repository/mock_registryClient.go +++ b/pkg/remote/azurerm/repository/mock_registryClient.go @@ -3,7 +3,7 @@ package repository import ( - armcontainerregistry "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_registryListAllPager.go b/pkg/remote/azurerm/repository/mock_registryListAllPager.go index ec4bad5ce..485b0d5a5 100644 --- a/pkg/remote/azurerm/repository/mock_registryListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_registryListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armcontainerregistry "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_resourcesClient.go b/pkg/remote/azurerm/repository/mock_resourcesClient.go index 0681eefa8..89199d4e0 100644 --- a/pkg/remote/azurerm/repository/mock_resourcesClient.go +++ b/pkg/remote/azurerm/repository/mock_resourcesClient.go @@ -3,7 +3,7 @@ package repository import ( - armresources "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_resourcesListPager.go b/pkg/remote/azurerm/repository/mock_resourcesListPager.go index 2e31f32a0..40b9b27d5 100644 --- a/pkg/remote/azurerm/repository/mock_resourcesListPager.go +++ b/pkg/remote/azurerm/repository/mock_resourcesListPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armresources "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_routeTablesClient.go b/pkg/remote/azurerm/repository/mock_routeTablesClient.go index 70df302aa..dc15ae395 100644 --- a/pkg/remote/azurerm/repository/mock_routeTablesClient.go +++ b/pkg/remote/azurerm/repository/mock_routeTablesClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_routeTablesListAllPager.go b/pkg/remote/azurerm/repository/mock_routeTablesListAllPager.go index 20760aec2..053857154 100644 --- a/pkg/remote/azurerm/repository/mock_routeTablesListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_routeTablesListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_storageAccountClient.go b/pkg/remote/azurerm/repository/mock_storageAccountClient.go index 353a41993..e2fcda65f 100644 --- a/pkg/remote/azurerm/repository/mock_storageAccountClient.go +++ b/pkg/remote/azurerm/repository/mock_storageAccountClient.go @@ -3,7 +3,7 @@ package repository import ( - armstorage "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_storageAccountListPager.go b/pkg/remote/azurerm/repository/mock_storageAccountListPager.go index 3735cb35d..7ebbd30c7 100644 --- a/pkg/remote/azurerm/repository/mock_storageAccountListPager.go +++ b/pkg/remote/azurerm/repository/mock_storageAccountListPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armstorage "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_subnetsClient.go b/pkg/remote/azurerm/repository/mock_subnetsClient.go index 150f2e598..8e9c7c253 100644 --- a/pkg/remote/azurerm/repository/mock_subnetsClient.go +++ b/pkg/remote/azurerm/repository/mock_subnetsClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_subnetsListPager.go b/pkg/remote/azurerm/repository/mock_subnetsListPager.go index 997d76984..15a1340f1 100644 --- a/pkg/remote/azurerm/repository/mock_subnetsListPager.go +++ b/pkg/remote/azurerm/repository/mock_subnetsListPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_virtualNetworkClient.go b/pkg/remote/azurerm/repository/mock_virtualNetworkClient.go index e1e199155..fc41e657b 100644 --- a/pkg/remote/azurerm/repository/mock_virtualNetworkClient.go +++ b/pkg/remote/azurerm/repository/mock_virtualNetworkClient.go @@ -3,7 +3,7 @@ package repository import ( - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/mock_virtualNetworksListAllPager.go b/pkg/remote/azurerm/repository/mock_virtualNetworksListAllPager.go index 4c7dd4f6a..6c978ad8f 100644 --- a/pkg/remote/azurerm/repository/mock_virtualNetworksListAllPager.go +++ b/pkg/remote/azurerm/repository/mock_virtualNetworksListAllPager.go @@ -5,7 +5,7 @@ package repository import ( context "context" - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/remote/azurerm/repository/network.go b/pkg/remote/azurerm/repository/network.go index 9ff5a2aab..da9c131e0 100644 --- a/pkg/remote/azurerm/repository/network.go +++ b/pkg/remote/azurerm/repository/network.go @@ -4,8 +4,9 @@ import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/Azure/go-autorest/autorest/azure" "github.com/snyk/driftctl/pkg/remote/azurerm/common" "github.com/snyk/driftctl/pkg/remote/cache" @@ -170,16 +171,16 @@ type networkRepository struct { cache cache.Cache } -func NewNetworkRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *networkRepository { +func NewNetworkRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *networkRepository { return &networkRepository{ - &virtualNetworksClientImpl{client: armnetwork.NewVirtualNetworksClient(con, config.SubscriptionID)}, - &routeTablesClientImpl{client: armnetwork.NewRouteTablesClient(con, config.SubscriptionID)}, - &subnetsClientImpl{client: armnetwork.NewSubnetsClient(con, config.SubscriptionID)}, - &firewallsClientImpl{client: armnetwork.NewAzureFirewallsClient(con, config.SubscriptionID)}, - &publicIPAddressesClientImpl{client: armnetwork.NewPublicIPAddressesClient(con, config.SubscriptionID)}, - &networkSecurityGroupsClientImpl{client: armnetwork.NewNetworkSecurityGroupsClient(con, config.SubscriptionID)}, - &loadBalancersClientImpl{client: armnetwork.NewLoadBalancersClient(con, config.SubscriptionID)}, - &loadBalancerRulesClientImpl{armnetwork.NewLoadBalancerLoadBalancingRulesClient(con, config.SubscriptionID)}, + &virtualNetworksClientImpl{client: armnetwork.NewVirtualNetworksClient(config.SubscriptionID, cred, options)}, + &routeTablesClientImpl{client: armnetwork.NewRouteTablesClient(config.SubscriptionID, cred, options)}, + &subnetsClientImpl{client: armnetwork.NewSubnetsClient(config.SubscriptionID, cred, options)}, + &firewallsClientImpl{client: armnetwork.NewAzureFirewallsClient(config.SubscriptionID, cred, options)}, + &publicIPAddressesClientImpl{client: armnetwork.NewPublicIPAddressesClient(config.SubscriptionID, cred, options)}, + &networkSecurityGroupsClientImpl{client: armnetwork.NewNetworkSecurityGroupsClient(config.SubscriptionID, cred, options)}, + &loadBalancersClientImpl{client: armnetwork.NewLoadBalancersClient(config.SubscriptionID, cred, options)}, + &loadBalancerRulesClientImpl{armnetwork.NewLoadBalancerLoadBalancingRulesClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/network_test.go b/pkg/remote/azurerm/repository/network_test.go index 9d75dbb41..fa42fdfab 100644 --- a/pkg/remote/azurerm/repository/network_test.go +++ b/pkg/remote/azurerm/repository/network_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/pkg/errors" "github.com/snyk/driftctl/pkg/remote/cache" "github.com/stretchr/testify/assert" diff --git a/pkg/remote/azurerm/repository/postgresql.go b/pkg/remote/azurerm/repository/postgresql.go index 9820a811a..644704ecf 100644 --- a/pkg/remote/azurerm/repository/postgresql.go +++ b/pkg/remote/azurerm/repository/postgresql.go @@ -4,8 +4,9 @@ import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/Azure/go-autorest/autorest/azure" "github.com/snyk/driftctl/pkg/remote/azurerm/common" "github.com/snyk/driftctl/pkg/remote/cache" @@ -46,10 +47,10 @@ type postgresqlRepository struct { cache cache.Cache } -func NewPostgresqlRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *postgresqlRepository { +func NewPostgresqlRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *postgresqlRepository { return &postgresqlRepository{ - postgresqlServersClientImpl{client: armpostgresql.NewServersClient(con, config.SubscriptionID)}, - postgresqlDatabaseClientImpl{client: armpostgresql.NewDatabasesClient(con, config.SubscriptionID)}, + postgresqlServersClientImpl{client: armpostgresql.NewServersClient(config.SubscriptionID, cred, options)}, + postgresqlDatabaseClientImpl{client: armpostgresql.NewDatabasesClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/postgresql_test.go b/pkg/remote/azurerm/repository/postgresql_test.go index 8a88693e6..d88e09348 100644 --- a/pkg/remote/azurerm/repository/postgresql_test.go +++ b/pkg/remote/azurerm/repository/postgresql_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/pkg/errors" "github.com/snyk/driftctl/pkg/remote/cache" "github.com/stretchr/testify/assert" diff --git a/pkg/remote/azurerm/repository/privatedns.go b/pkg/remote/azurerm/repository/privatedns.go index 04e15cc00..a2a1fa4a7 100644 --- a/pkg/remote/azurerm/repository/privatedns.go +++ b/pkg/remote/azurerm/repository/privatedns.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns" "github.com/Azure/go-autorest/autorest/azure" @@ -62,10 +63,10 @@ type privateDNSRepository struct { cache cache.Cache } -func NewPrivateDNSRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *privateDNSRepository { +func NewPrivateDNSRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *privateDNSRepository { return &privateDNSRepository{ - &privateZonesClientImpl{armprivatedns.NewPrivateZonesClient(con, config.SubscriptionID)}, - &privateRecordSetClientImpl{armprivatedns.NewRecordSetsClient(con, config.SubscriptionID)}, + &privateZonesClientImpl{armprivatedns.NewPrivateZonesClient(config.SubscriptionID, cred, options)}, + &privateRecordSetClientImpl{armprivatedns.NewRecordSetsClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/resources.go b/pkg/remote/azurerm/repository/resources.go index f81ce07d9..c7ba9bd09 100644 --- a/pkg/remote/azurerm/repository/resources.go +++ b/pkg/remote/azurerm/repository/resources.go @@ -3,8 +3,9 @@ package repository import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/snyk/driftctl/pkg/remote/azurerm/common" "github.com/snyk/driftctl/pkg/remote/cache" ) @@ -35,9 +36,9 @@ type resourcesRepository struct { cache cache.Cache } -func NewResourcesRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *resourcesRepository { +func NewResourcesRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *resourcesRepository { return &resourcesRepository{ - &resourcesClientImpl{armresources.NewResourceGroupsClient(con, config.SubscriptionID)}, + &resourcesClientImpl{armresources.NewResourceGroupsClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/resources_test.go b/pkg/remote/azurerm/repository/resources_test.go index 6a93c549a..841ee8398 100644 --- a/pkg/remote/azurerm/repository/resources_test.go +++ b/pkg/remote/azurerm/repository/resources_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/pkg/errors" "github.com/snyk/driftctl/pkg/remote/cache" "github.com/stretchr/testify/assert" diff --git a/pkg/remote/azurerm/repository/storage.go b/pkg/remote/azurerm/repository/storage.go index da4f539f0..11791ff62 100644 --- a/pkg/remote/azurerm/repository/storage.go +++ b/pkg/remote/azurerm/repository/storage.go @@ -4,8 +4,9 @@ import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/Azure/go-autorest/autorest/azure" "github.com/snyk/driftctl/pkg/remote/azurerm/common" "github.com/snyk/driftctl/pkg/remote/cache" @@ -57,10 +58,10 @@ type storageRepository struct { cache cache.Cache } -func NewStorageRepository(con *arm.Connection, config common.AzureProviderConfig, cache cache.Cache) *storageRepository { +func NewStorageRepository(cred azcore.TokenCredential, options *arm.ClientOptions, config common.AzureProviderConfig, cache cache.Cache) *storageRepository { return &storageRepository{ - storageAccountClientImpl{client: armstorage.NewStorageAccountsClient(con, config.SubscriptionID)}, - blobContainerClientImpl{client: armstorage.NewBlobContainersClient(con, config.SubscriptionID)}, + storageAccountClientImpl{client: armstorage.NewStorageAccountsClient(config.SubscriptionID, cred, options)}, + blobContainerClientImpl{client: armstorage.NewBlobContainersClient(config.SubscriptionID, cred, options)}, cache, } } diff --git a/pkg/remote/azurerm/repository/storage_test.go b/pkg/remote/azurerm/repository/storage_test.go index 430054f40..b9dc424c1 100644 --- a/pkg/remote/azurerm/repository/storage_test.go +++ b/pkg/remote/azurerm/repository/storage_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/pkg/errors" "github.com/snyk/driftctl/pkg/remote/cache" "github.com/stretchr/testify/assert" diff --git a/pkg/remote/azurerm_compute_scanner_test.go b/pkg/remote/azurerm_compute_scanner_test.go index 792de0c86..1aa86a723 100644 --- a/pkg/remote/azurerm_compute_scanner_test.go +++ b/pkg/remote/azurerm_compute_scanner_test.go @@ -208,8 +208,8 @@ func TestAzurermCompute_SSHPublicKey(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewComputeRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewComputeRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermSSHPublicKeyEnumerator(repo, factory)) diff --git a/pkg/remote/azurerm_containerregistry_scanner_test.go b/pkg/remote/azurerm_containerregistry_scanner_test.go index 6b936fb55..718b12824 100644 --- a/pkg/remote/azurerm_containerregistry_scanner_test.go +++ b/pkg/remote/azurerm_containerregistry_scanner_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/containerregistry/armcontainerregistry" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/pkg/errors" "github.com/snyk/driftctl/mocks" "github.com/snyk/driftctl/pkg/filter" diff --git a/pkg/remote/azurerm_network_scanner_test.go b/pkg/remote/azurerm_network_scanner_test.go index 5b3a84fc0..fddf72677 100644 --- a/pkg/remote/azurerm_network_scanner_test.go +++ b/pkg/remote/azurerm_network_scanner_test.go @@ -6,7 +6,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/pkg/errors" "github.com/snyk/driftctl/mocks" "github.com/snyk/driftctl/pkg/filter" @@ -766,8 +766,8 @@ func TestAzurermSecurityGroups(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewNetworkRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewNetworkRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermNetworkSecurityGroupEnumerator(repo, factory)) @@ -987,8 +987,8 @@ func TestAzurermLoadBalancerRules(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewNetworkRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewNetworkRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermLoadBalancerRuleEnumerator(repo, factory)) diff --git a/pkg/remote/azurerm_postgresql_scanner_test.go b/pkg/remote/azurerm_postgresql_scanner_test.go index 007aff363..0ba882b80 100644 --- a/pkg/remote/azurerm_postgresql_scanner_test.go +++ b/pkg/remote/azurerm_postgresql_scanner_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/postgresql/armpostgresql" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/pkg/errors" "github.com/snyk/driftctl/mocks" "github.com/snyk/driftctl/pkg/filter" diff --git a/pkg/remote/azurerm_privatedns_scanner_test.go b/pkg/remote/azurerm_privatedns_scanner_test.go index b1f94893c..a76bc30f9 100644 --- a/pkg/remote/azurerm_privatedns_scanner_test.go +++ b/pkg/remote/azurerm_privatedns_scanner_test.go @@ -124,8 +124,8 @@ func TestAzurermPrivateDNSZone(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSZoneEnumerator(repo, factory)) @@ -278,8 +278,8 @@ func TestAzurermPrivateDNSARecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSARecordEnumerator(repo, factory)) @@ -433,8 +433,8 @@ func TestAzurermPrivateDNSAAAARecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSAAAARecordEnumerator(repo, factory)) @@ -576,8 +576,8 @@ func TestAzurermPrivateDNSCNAMERecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSCNameRecordEnumerator(repo, factory)) @@ -730,8 +730,8 @@ func TestAzurermPrivateDNSPTRRecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSPTRRecordEnumerator(repo, factory)) @@ -885,8 +885,8 @@ func TestAzurermPrivateDNSMXRecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSMXRecordEnumerator(repo, factory)) @@ -1039,8 +1039,8 @@ func TestAzurermPrivateDNSSRVRecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSSRVRecordEnumerator(repo, factory)) @@ -1193,8 +1193,8 @@ func TestAzurermPrivateDNSTXTRecord(t *testing.T) { if err != nil { t.Fatal(err) } - con := arm.NewDefaultConnection(cred, nil) - repo = repository.NewPrivateDNSRepository(con, realProvider.GetConfig(), cache.New(0)) + clientOptions := &arm.ClientOptions{} + repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0)) } remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSTXTRecordEnumerator(repo, factory)) diff --git a/pkg/remote/azurerm_resources_scanner_test.go b/pkg/remote/azurerm_resources_scanner_test.go index 1464be55e..44fca9085 100644 --- a/pkg/remote/azurerm_resources_scanner_test.go +++ b/pkg/remote/azurerm_resources_scanner_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resources/armresources" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/pkg/errors" "github.com/snyk/driftctl/mocks" "github.com/snyk/driftctl/pkg/filter" diff --git a/pkg/remote/azurerm_storage_scanner_test.go b/pkg/remote/azurerm_storage_scanner_test.go index f6ac9cf52..548046409 100644 --- a/pkg/remote/azurerm_storage_scanner_test.go +++ b/pkg/remote/azurerm_storage_scanner_test.go @@ -3,7 +3,7 @@ package remote import ( "testing" - "github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/pkg/errors" "github.com/snyk/driftctl/mocks" "github.com/snyk/driftctl/pkg/filter" diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_a_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_a_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_a_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_aaaa_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_aaaa_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_aaaa_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_cname_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_cname_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_cname_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_mx_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_mx_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_mx_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_ptr_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_ptr_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_ptr_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_srv_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_srv_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_srv_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_txt_record/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_txt_record/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_txt_record/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +} diff --git a/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_zone/.terraform.lock.hcl b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_zone/.terraform.lock.hcl new file mode 100644 index 000000000..67ef8eaf0 --- /dev/null +++ b/pkg/resource/azurerm/testdata/acc/azurerm_private_dns_zone/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "2.71.0" + constraints = "~> 2.71.0" + hashes = [ + "h1:RiFIxNI4Yr9CqleqEdgg1ydLAZ5JiYiz6l5iTD3WcuU=", + "zh:2b9d8a703a0222f72cbceb8d2bdb580066afdcd7f28b6ad65d5ed935319b5433", + "zh:332988f4c1747bcc8ebd32734bf8de2bea4c13a6fbd08d7eb97d0c43d335b15e", + "zh:3a902470276ba48e23ad4dd6baff16a9ce3b60b29c0b07064dbe96ce4640a31c", + "zh:5eaa0d0c2c6554913421be10fbf4bb6a9ef98fbbd750d3d1f02c99798aae2c22", + "zh:67859f40ed2f770f33ace9d3911e8b9c9be505947b38a0578e6d097f5db1d4bf", + "zh:7cd9bf4899fe383fc7eeede03cad138d637244878cd295a7a1044ca20ca0652c", + "zh:afcb82c1382a1a9d63a41137321e077144aad768e4e46057a7ea604d067b4181", + "zh:c6e358759ed00a628dcfe7adb0906b2c98576ac3056fdd70930786d404e1da66", + "zh:cb3390c34f6790ad656929d0268ab3bc082678e8cbe2add0a177cf7896068844", + "zh:cc213dbf59cf41506e86b83492ccfef6ef5f34d4d00d9e49fc8a01fee253f4ee", + "zh:d1e8c9b507e2d187ea2447ae156028ba3f76db2164674761987c14217d04fee5", + ] +}