mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-10 23:43:03 -04:00
Implement support for "latest" placeholders for Azure TDX
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
a34493caa6
commit
9159b60331
16 changed files with 410 additions and 267 deletions
|
@ -162,17 +162,18 @@ func (d *AttestationDataSource) Read(ctx context.Context, req datasource.ReadReq
|
|||
|
||||
insecureFetch := data.Insecure.ValueBool()
|
||||
|
||||
snpVersions := attestationconfigapi.VersionAPIEntry{}
|
||||
if attestationVariant.Equal(variant.AzureSEVSNP{}) ||
|
||||
attestationVariant.Equal(variant.AWSSEVSNP{}) ||
|
||||
latestVersions := attestationconfigapi.VersionAPIEntry{}
|
||||
if attestationVariant.Equal(variant.AWSSEVSNP{}) ||
|
||||
attestationVariant.Equal(variant.AzureSEVSNP{}) ||
|
||||
attestationVariant.Equal(variant.AzureTDX{}) ||
|
||||
attestationVariant.Equal(variant.GCPSEVSNP{}) {
|
||||
snpVersions, err = d.fetcher.FetchLatestVersion(ctx, attestationVariant)
|
||||
latestVersions, err = d.fetcher.FetchLatestVersion(ctx, attestationVariant)
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError("Fetching SNP Version numbers", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
tfAttestation, err := convertToTfAttestation(attestationVariant, snpVersions)
|
||||
tfAttestation, err := convertToTfAttestation(attestationVariant, latestVersions)
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError("Converting attestation", err.Error())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue