join-service: add AWS attestation

This commit is contained in:
Leonard Cohnen 2022-10-30 03:36:58 +01:00 committed by 3u13r
parent b69d19c3d6
commit 3aa0177333
2 changed files with 11 additions and 0 deletions

View file

@ -16,6 +16,7 @@ import (
"time"
"github.com/edgelesssys/constellation/v2/internal/atls"
awscloud "github.com/edgelesssys/constellation/v2/internal/cloud/aws"
azurecloud "github.com/edgelesssys/constellation/v2/internal/cloud/azure"
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
gcpcloud "github.com/edgelesssys/constellation/v2/internal/cloud/gcp"
@ -118,6 +119,11 @@ func getVPCIP(ctx context.Context, provider string) (string, error) {
var err error
switch cloudprovider.FromString(provider) {
case cloudprovider.AWS:
metadata, err = awscloud.New(ctx)
if err != nil {
return "", err
}
case cloudprovider.Azure:
metadata, err = azurecloud.NewMetadata(ctx)
if err != nil {