Merge pull request #4468 from tomconte/master

Azure builder: add two new config variables for temp_compute_name and temp_resource_group_name
This commit is contained in:
Christopher Boumenot 2017-01-28 09:27:10 -08:00 committed by GitHub
commit 60a0d21d37
1 changed files with 12 additions and 2 deletions

View File

@ -72,6 +72,8 @@ type Config struct {
AzureTags map[string]*string `mapstructure:"azure_tags"` AzureTags map[string]*string `mapstructure:"azure_tags"`
ResourceGroupName string `mapstructure:"resource_group_name"` ResourceGroupName string `mapstructure:"resource_group_name"`
StorageAccount string `mapstructure:"storage_account"` StorageAccount string `mapstructure:"storage_account"`
TempComputeName string `mapstructure:"temp_compute_name"`
TempResourceGroupName string `mapstructure:"temp_resource_group_name"`
storageAccountBlobEndpoint string storageAccountBlobEndpoint string
CloudEnvironmentName string `mapstructure:"cloud_environment_name"` CloudEnvironmentName string `mapstructure:"cloud_environment_name"`
cloudEnvironment *azure.Environment cloudEnvironment *azure.Environment
@ -288,9 +290,17 @@ func setRuntimeValues(c *Config) {
c.tmpAdminPassword = tempName.AdminPassword c.tmpAdminPassword = tempName.AdminPassword
c.tmpCertificatePassword = tempName.CertificatePassword 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.tmpDeploymentName = tempName.DeploymentName
c.tmpResourceGroupName = tempName.ResourceGroupName if c.TempResourceGroupName == "" {
c.tmpResourceGroupName = tempName.ResourceGroupName
} else {
c.tmpResourceGroupName = c.TempResourceGroupName
}
c.tmpOSDiskName = tempName.OSDiskName c.tmpOSDiskName = tempName.OSDiskName
c.tmpKeyVaultName = tempName.KeyVaultName c.tmpKeyVaultName = tempName.KeyVaultName
} }