From 1ec6578c02187ef039ec380a08472862f8ff3401 Mon Sep 17 00:00:00 2001 From: Thomas Conte Date: Fri, 27 Jan 2017 12:26:28 +0100 Subject: [PATCH 1/2] Add two new variables to Azure builder config --- builder/azure/arm/config.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index c1594f510..e2a097a5c 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -72,6 +72,8 @@ type Config struct { AzureTags map[string]*string `mapstructure:"azure_tags"` ResourceGroupName string `mapstructure:"resource_group_name"` StorageAccount string `mapstructure:"storage_account"` + TempComputeName string `mapstructure:"temp_compute_name"` + TempResourceGroupName string `mapstructure:"temp_resource_group_name"` storageAccountBlobEndpoint string CloudEnvironmentName string `mapstructure:"cloud_environment_name"` cloudEnvironment *azure.Environment @@ -288,9 +290,17 @@ func setRuntimeValues(c *Config) { c.tmpAdminPassword = tempName.AdminPassword c.tmpCertificatePassword = tempName.CertificatePassword - c.tmpComputeName = tempName.ComputeName + if c.TempComputeName == "" { + c.tmpComputeName = tempName.ComputeName + } else { + c.tmpComputeName = c.TempComputeName + } c.tmpDeploymentName = tempName.DeploymentName - c.tmpResourceGroupName = tempName.ResourceGroupName + if c.TempResourceGroupName == "" { + c.tmpResourceGroupName = tempName.ResourceGroupName + } else { + c.tmpResourceGroupName = c.TempResourceGroupName + } c.tmpOSDiskName = tempName.OSDiskName c.tmpKeyVaultName = tempName.KeyVaultName } From d294d2c576d17e74e53c590445c970c6d41800da Mon Sep 17 00:00:00 2001 From: Thomas Conte Date: Sat, 28 Jan 2017 10:29:35 +0100 Subject: [PATCH 2/2] gofmt --- builder/azure/arm/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index e2a097a5c..0b5b158fa 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -73,7 +73,7 @@ type Config struct { ResourceGroupName string `mapstructure:"resource_group_name"` StorageAccount string `mapstructure:"storage_account"` TempComputeName string `mapstructure:"temp_compute_name"` - TempResourceGroupName string `mapstructure:"temp_resource_group_name"` + TempResourceGroupName string `mapstructure:"temp_resource_group_name"` storageAccountBlobEndpoint string CloudEnvironmentName string `mapstructure:"cloud_environment_name"` cloudEnvironment *azure.Environment