From cc15a2eb6d770fc80c538fd53dc43de40ea37655 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Wed, 15 Nov 2023 18:48:36 +0300 Subject: [PATCH] ResourceGroup.azure example manifest now uses a randomized name Signed-off-by: Alper Rifat Ulucinar --- examples/azure/resourcegroup.yaml | 2 +- internal/clients/azure.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/azure/resourcegroup.yaml b/examples/azure/resourcegroup.yaml index 98b1d9951..7a048275e 100644 --- a/examples/azure/resourcegroup.yaml +++ b/examples/azure/resourcegroup.yaml @@ -1,7 +1,7 @@ apiVersion: azure.upbound.io/v1beta1 kind: ResourceGroup metadata: - name: example-resources + name: example-resources-${Rand.RFC1123Subdomain} spec: forProvider: location: "West Europe" diff --git a/internal/clients/azure.go b/internal/clients/azure.go index a143f8f2b..96c4a8122 100644 --- a/internal/clients/azure.go +++ b/internal/clients/azure.go @@ -120,7 +120,11 @@ func TerraformSetupBuilder(version, providerSource, providerVersion string, sche func configureNoForkAzureClient(ctx context.Context, pc *v1beta1.ProviderConfig, ps *terraform.Setup) error { cb := xpprovider.AzureClientBuilder{} switch pc.Spec.Credentials.Source { //nolint:exhaustive - case xpv1.CredentialsSourceSecret: + // TODO: we need to add support for the other schemes + case credentialsSourceSystemAssignedManagedIdentity, credentialsSourceUserAssignedManagedIdentity: + case credentialsSourceOIDCTokenFile: + case credentialsSourceUpbound: + default: cb.SubscriptionID = ps.Configuration[keySubscriptionID].(string) cb.AuthConfig = &auth.Credentials{ ClientID: ps.Configuration[keyClientID].(string),