From b838940db5d020f8b42eee63a0ff5f61acb62576 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Fri, 21 Oct 2022 17:52:58 -0400 Subject: [PATCH] log into az during azure setup --- pkg/server/provider.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/server/provider.go b/pkg/server/provider.go index 6382aa94..ec4bb3a3 100644 --- a/pkg/server/provider.go +++ b/pkg/server/provider.go @@ -83,6 +83,10 @@ func setupAzure(setup *SetupRequest) error { return fmt.Errorf("error writing azure env file: %w", err) } + if err := execCmd("az", "login", "--service-principal", "-u", az.ClientId, "-p", az.ClientSecret, "--tenant", az.TenantId); err != nil { + return fmt.Errorf("error logging into az cli: %w", err) + } + return nil }