From 2181f10e79b1fdcf7abfd3da462b30930007c57e Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 6 Feb 2020 16:54:07 -0800 Subject: [PATCH] fix statebag setup; simplify conditional --- builder/azure/arm/builder.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go index 55e889fe6..c891d3fe1 100644 --- a/builder/azure/arm/builder.go +++ b/builder/azure/arm/builder.go @@ -403,14 +403,14 @@ func (b *Builder) configureStateBag(stateBag multistep.StateBag) { stateBag.Put(constants.ArmKeyVaultDeploymentName, fmt.Sprintf("kv%s", b.config.tmpDeploymentName)) } + stateBag.Put(constants.ArmKeyVaultName, b.config.tmpKeyVaultName) + stateBag.Put(constants.ArmIsExistingKeyVault, false) if b.config.BuildKeyVaultName != "" { stateBag.Put(constants.ArmKeyVaultName, b.config.BuildKeyVaultName) b.config.tmpKeyVaultName = b.config.BuildKeyVaultName - stateBag.Put(constants.ArmIsExistingKeyVault, false) - } else { - stateBag.Put(constants.ArmKeyVaultName, b.config.tmpKeyVaultName) stateBag.Put(constants.ArmIsExistingKeyVault, true) } + stateBag.Put(constants.ArmNicName, b.config.tmpNicName) stateBag.Put(constants.ArmPublicIPAddressName, b.config.tmpPublicIPAddressName) stateBag.Put(constants.ArmResourceGroupName, b.config.BuildResourceGroupName)