mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
config: fix aws instance type validation (#2171)
This commit is contained in:
parent
15bb9588d7
commit
4564017b13
@ -782,7 +782,15 @@ func (c *Config) validateNodeGroupZoneField(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())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user