mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
image: use different replication regions for SNP and TDX
This commit is contained in:
parent
d205c15dff
commit
e2e3935896
@ -208,6 +208,7 @@ func awsParseAMIARN(arn string) (region string, amiID string, retErr error) {
|
||||
}
|
||||
|
||||
func extendAzureConfig(azureConfig map[string]any, version versionsapi.Version, attestationVariant string, timestamp time.Time) {
|
||||
azureConfig["replicationRegions"] = azureReplicationRegions(attestationVariant)
|
||||
azureConfig["attestationVariant"] = attestationVariant
|
||||
azureConfig["sharedImageGallery"] = azureGalleryName(version, attestationVariant)
|
||||
azureConfig["imageDefinitionName"] = azureImageOffer(version)
|
||||
@ -247,6 +248,16 @@ func azureImageOffer(version versionsapi.Version) string {
|
||||
return version.Ref() + "-" + version.Stream()
|
||||
}
|
||||
|
||||
func azureReplicationRegions(attestationVariant string) []string {
|
||||
switch attestationVariant {
|
||||
case "azure-tdx":
|
||||
return []string{"northeurope", "westeurope", "centralus", "eastus2"}
|
||||
case "azure-sev-snp":
|
||||
return []string{"northeurope", "westeurope", "germanywestcentral", "eastus", "westus", "southeastasia"}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func extendGCPConfig(gcpConfig map[string]any, version versionsapi.Version, attestationVariant string) {
|
||||
gcpConfig["imageFamily"] = gcpImageFamily(version)
|
||||
gcpConfig["imageName"] = gcpImageName(version, attestationVariant)
|
||||
|
Loading…
Reference in New Issue
Block a user