config: define lists of valid disk types

This commit is contained in:
Malte Poll 2023-08-02 10:23:51 +02:00 committed by Malte Poll
parent 15bb3b31fd
commit 2246c31b7b
4 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,12 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "disktypes",
srcs = [
"aws.go",
"azure.go",
"gcp.go",
],
importpath = "github.com/edgelesssys/constellation/v2/internal/config/disktypes",
visibility = ["//:__subpackages__"],
)

View File

@ -0,0 +1,17 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package disktypes
// AWSDiskTypes is derived from:
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html (Last updated: August 1st, 2023).
var AWSDiskTypes = []string{
"gp2",
"gp3",
"st1",
"sc1",
"io1",
}

View File

@ -0,0 +1,16 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package disktypes
// AzureDiskTypes are valid Azure disk types.
var AzureDiskTypes = []string{
"Premium_LRS",
"Premium_ZRS",
"Standard_LRS",
"StandardSSD_LRS",
"StandardSSD_ZRS",
}

View File

@ -0,0 +1,14 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package disktypes
// GCPDiskTypes are valid GCP disk types.
var GCPDiskTypes = []string{
"pd-standard",
"pd-balanced",
"pd-ssd",
}