Improve comments for FillParameters
This commit is contained in:
parent
feeae1514e
commit
094a8840d8
|
@ -57,7 +57,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
|
||||||
ctx, cancel := context.WithCancel(ctx)
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
// FillParameters function will set the authType from supplied parameters set the subscription and tenant id.
|
// FillParameters function captures authType and sets defaults.
|
||||||
err := b.config.ClientConfig.FillParameters()
|
err := b.config.ClientConfig.FillParameters()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -254,6 +254,8 @@ func (c Config) GetServicePrincipalTokens(
|
||||||
return servicePrincipalToken, servicePrincipalTokenVault, nil
|
return servicePrincipalToken, servicePrincipalTokenVault, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FillParameters capture the user intent from the supplied parameter set in authType, retrieves the TenantID and CloudEnvironment if not specified.
|
||||||
|
// The SubscriptionID is also retrieved in case MSI auth is requested.
|
||||||
func (c *Config) FillParameters() error {
|
func (c *Config) FillParameters() error {
|
||||||
if c.authType == "" {
|
if c.authType == "" {
|
||||||
if c.useDeviceLogin() {
|
if c.useDeviceLogin() {
|
||||||
|
|
Loading…
Reference in New Issue