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)
|
||||
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()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -254,6 +254,8 @@ func (c Config) GetServicePrincipalTokens(
|
|||
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 {
|
||||
if c.authType == "" {
|
||||
if c.useDeviceLogin() {
|
||||
|
|
Loading…
Reference in New Issue