From 392ad7fe45bb71ae2ad701ee0f3891c6c60b37a0 Mon Sep 17 00:00:00 2001 From: Fabian Kammel Date: Wed, 15 Jun 2022 12:19:41 +0200 Subject: [PATCH] Create Application Insights early so they are ready when VM needs them. (#213) --- cli/internal/cloudcmd/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/internal/cloudcmd/create.go b/cli/internal/cloudcmd/create.go index e78d570e6..2054ee07c 100644 --- a/cli/internal/cloudcmd/create.go +++ b/cli/internal/cloudcmd/create.go @@ -142,6 +142,9 @@ func (c *Creator) createAzure(ctx context.Context, cl azureclient, config *confi if err := cl.CreateResourceGroup(ctx); err != nil { return state.ConstellationState{}, err } + if err := cl.CreateApplicationInsight(ctx); err != nil { + return state.ConstellationState{}, err + } if err := cl.CreateExternalLoadBalancer(ctx); err != nil { return state.ConstellationState{}, err } @@ -166,9 +169,6 @@ func (c *Creator) createAzure(ctx context.Context, cl azureclient, config *confi if err := cl.CreateInstances(ctx, createInput); err != nil { return state.ConstellationState{}, err } - if err := cl.CreateApplicationInsight(ctx); err != nil { - return state.ConstellationState{}, err - } return cl.GetState() }