Add service account ID to config #8716
This commit is contained in:
parent
ff4674a49c
commit
38fe16e01f
|
@ -41,6 +41,8 @@ type Config struct {
|
|||
// is an alternative method to authenticate to Yandex.Cloud. Alternatively you may set environment variable
|
||||
// YC_SERVICE_ACCOUNT_KEY_FILE.
|
||||
ServiceAccountKeyFile string `mapstructure:"service_account_key_file" required:"false"`
|
||||
// Service account identifier to assign to instance
|
||||
ServiceAccountID string `mapstructure:"service_account_id" required:"false"`
|
||||
// OAuth token to use to authenticate to Yandex.Cloud. Alternatively you may set
|
||||
// value by environment variable YC_TOKEN.
|
||||
Token string `mapstructure:"token" required:"true"`
|
||||
|
|
|
@ -205,6 +205,10 @@ runcmd:
|
|||
},
|
||||
}
|
||||
|
||||
if config.ServiceAccountID != "" {
|
||||
req.ServiceAccountId = config.ServiceAccountID
|
||||
}
|
||||
|
||||
if config.UseIPv6 {
|
||||
req.NetworkInterfaceSpecs[0].PrimaryV6AddressSpec = &compute.PrimaryAddressSpec{}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue