mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-19 19:54:22 -04:00
config: fix aws instance type validation (#2171)
This commit is contained in:
parent
15bb9588d7
commit
4564017b13
1 changed files with 9 additions and 1 deletions
|
@ -782,7 +782,15 @@ func (c *Config) validateNodeGroupZoneField(fl validator.FieldLevel) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Config) validateInstanceType(fl validator.FieldLevel) bool {
|
func (c *Config) validateInstanceType(fl validator.FieldLevel) bool {
|
||||||
acceptNonCVM := c.GetAttestationConfig().GetVariant().Equal(variant.AzureTrustedLaunch{})
|
acceptNonCVM := false
|
||||||
|
|
||||||
|
if c.GetAttestationConfig().GetVariant().Equal(variant.AzureTrustedLaunch{}) {
|
||||||
|
acceptNonCVM = true
|
||||||
|
}
|
||||||
|
if c.GetAttestationConfig().GetVariant().Equal(variant.AWSNitroTPM{}) {
|
||||||
|
acceptNonCVM = true
|
||||||
|
}
|
||||||
|
|
||||||
return validInstanceTypeForProvider(fl.Field().String(), acceptNonCVM, c.GetProvider())
|
return validInstanceTypeForProvider(fl.Field().String(), acceptNonCVM, c.GetProvider())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue