mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-13 01:05:31 -04:00
config: add SEV-SNP config options for GCP
This commit is contained in:
parent
3a349b1a15
commit
b9a982d1d3
8 changed files with 247 additions and 33 deletions
|
@ -202,6 +202,9 @@ func validateAttestation(sl validator.StructLevel) {
|
|||
if attestation.GCPSEVES != nil {
|
||||
attestationCount++
|
||||
}
|
||||
if attestation.GCPSEVSNP != nil {
|
||||
attestationCount++
|
||||
}
|
||||
if attestation.QEMUVTPM != nil {
|
||||
attestationCount++
|
||||
}
|
||||
|
@ -364,6 +367,9 @@ func (c *Config) translateMoreThanOneAttestationError(ut ut.Translator, fe valid
|
|||
if c.Attestation.GCPSEVES != nil {
|
||||
definedAttestations = append(definedAttestations, "GCPSEVES")
|
||||
}
|
||||
if c.Attestation.GCPSEVSNP != nil {
|
||||
definedAttestations = append(definedAttestations, "GCPSEVSNP")
|
||||
}
|
||||
if c.Attestation.QEMUVTPM != nil {
|
||||
definedAttestations = append(definedAttestations, "QEMUVTPM")
|
||||
}
|
||||
|
@ -536,7 +542,7 @@ func validInstanceTypeForProvider(insType string, attestation variant.Variant) b
|
|||
return true
|
||||
}
|
||||
}
|
||||
case variant.GCPSEVES{}:
|
||||
case variant.GCPSEVES{}, variant.GCPSEVSNP{}:
|
||||
for _, instanceType := range instancetypes.GCPInstanceTypes {
|
||||
if insType == instanceType {
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue