From 8bbe4e6aaae478540a596195267053ed0f362b89 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Tue, 28 Nov 2023 18:50:56 +0000 Subject: [PATCH 1/2] docs: remove german cloud references --- website/docs/guides/azure_cli.html.markdown | 4 ++-- .../docs/guides/service_principal_client_secret.html.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/guides/azure_cli.html.markdown b/website/docs/guides/azure_cli.html.markdown index 1875971f06aa..3ab83c2aa876 100644 --- a/website/docs/guides/azure_cli.html.markdown +++ b/website/docs/guides/azure_cli.html.markdown @@ -30,10 +30,10 @@ We recommend using either a Service Principal or Managed Service Identity when r ## Logging into the Azure CLI -~> **Note**: If you're using the **China**, **German** or **Government** Azure Clouds - you'll need to first configure the Azure CLI to work with that Cloud. You can do this by running: +~> **Note**: If you're using the **China** or **Government** Azure Clouds - you'll need to first configure the Azure CLI to work with that Cloud. You can do this by running: ```shell -az cloud set --name AzureChinaCloud|AzureGermanCloud|AzureUSGovernment +az cloud set --name AzureChinaCloud|AzureUSGovernment ``` --- diff --git a/website/docs/guides/service_principal_client_secret.html.markdown b/website/docs/guides/service_principal_client_secret.html.markdown index 2a99c8fb8c30..69a6c321965b 100644 --- a/website/docs/guides/service_principal_client_secret.html.markdown +++ b/website/docs/guides/service_principal_client_secret.html.markdown @@ -111,7 +111,7 @@ Once logged in as the Service Principal - we should be able to list the VM sizes az vm list-sizes --location westus ``` -~> **Note**: If you're using the **China**, **German** or **Government** Azure Clouds - you will need to switch `westus` out for another region. You can find which regions are available by running: +~> **Note**: If you're using the **China** or **Government** Azure Clouds - you will need to switch `westus` out for another region. You can find which regions are available by running: ```shell az account list-locations From da00dc3836bbcea7267bf31d43b4ede270833dde Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Tue, 28 Nov 2023 18:52:06 +0000 Subject: [PATCH 2/2] bugfix: resolve issue with no-deadline context when listing RPs --- internal/clients/builder.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/clients/builder.go b/internal/clients/builder.go index 5cf35020fa58..d336b0a03f0e 100644 --- a/internal/clients/builder.go +++ b/internal/clients/builder.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "log" + "time" "github.com/hashicorp/go-azure-helpers/authentication" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -167,8 +168,11 @@ func Build(ctx context.Context, builder ClientBuilder) (*Client, error) { if features.EnhancedValidationEnabled() { subscriptionId := commonids.NewSubscriptionID(client.Account.SubscriptionId) - location.CacheSupportedLocations(ctx, *resourceManagerEndpoint) - if err := resourceproviders.CacheSupportedProviders(ctx, client.Resource.ResourceProvidersClient, subscriptionId); err != nil { + ctx2, cancel := context.WithTimeout(ctx, 10*time.Minute) + defer cancel() + + location.CacheSupportedLocations(ctx2, *resourceManagerEndpoint) + if err := resourceproviders.CacheSupportedProviders(ctx2, client.Resource.ResourceProvidersClient, subscriptionId); err != nil { log.Printf("[DEBUG] error retrieving providers: %s. Enhanced validation will be unavailable", err) } }