mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 14:54:53 -04:00
AB#2436: Initial support for create/terminate AWS NitroTPM instances
* Add .DS_Store to .gitignore * Add AWS to config / supported instance types * Move AWS terraform skeleton to cli/internal/terraform * Move currently unused IAM to hack/terraform/aws * Print supported AWS instance types when AWS dev flag is set * Block everything aTLS related (e.g. init, verify) until AWS attestation is available * Create/Terminate AWS dev cluster when dev flag is set * Restrict Nitro instances to NitroTPM supported specifically * Pin zone for subnets This is not great for HA, but for now we need to avoid the two subnets ending up in different zones, causing the load balancer to not be able to connect to the targets. Should be replaced later with a better implementation that just uses multiple subnets within the same region dynamically based on # of nodes or similar. * Add AWS/GCP to Terraform TestLoader unit test * Add uid tag and create log group Co-authored-by: Daniel Weiße <dw@edgeless.systems> Co-authored-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
07f02a442c
commit
04c4cff9f6
31 changed files with 940 additions and 314 deletions
|
@ -39,6 +39,28 @@ func (v *CommonVariables) String() string {
|
|||
return b.String()
|
||||
}
|
||||
|
||||
// GCPVariables is user configuration for creating a cluster with Terraform on GCP.
|
||||
type AWSVariables struct {
|
||||
// CommonVariables contains common variables.
|
||||
CommonVariables
|
||||
// Region is the AWS region to use.
|
||||
Region string
|
||||
// Zone is the AWS zone to use in the given region.
|
||||
Zone string
|
||||
// AMIImageID is the ID of the AMI image to use.
|
||||
AMIImageID string
|
||||
// InstanceType is the type of the EC2 instance to use.
|
||||
InstanceType string
|
||||
// StateDiskType is the EBS disk type to use for the state disk.
|
||||
StateDiskType string
|
||||
// IAMGroupControlPlane is the IAM group to use for the control-plane nodes.
|
||||
IAMProfileControlPlane string
|
||||
// IAMGroupWorkerNodes is the IAM group to use for the worker nodes.
|
||||
IAMProfileWorkerNodes string
|
||||
// Debug is true if debug mode is enabled.
|
||||
Debug bool
|
||||
}
|
||||
|
||||
// GCPVariables is user configuration for creating a cluster with Terraform on GCP.
|
||||
type GCPVariables struct {
|
||||
// CommonVariables contains common variables.
|
||||
|
@ -62,6 +84,21 @@ type GCPVariables struct {
|
|||
Debug bool
|
||||
}
|
||||
|
||||
func (v *AWSVariables) String() string {
|
||||
b := &strings.Builder{}
|
||||
b.WriteString(v.CommonVariables.String())
|
||||
writeLinef(b, "region = %q", v.Region)
|
||||
writeLinef(b, "zone = %q", v.Zone)
|
||||
writeLinef(b, "ami = %q", v.AMIImageID)
|
||||
writeLinef(b, "instance_type = %q", v.InstanceType)
|
||||
writeLinef(b, "state_disk_type = %q", v.StateDiskType)
|
||||
writeLinef(b, "iam_instance_profile_control_plane = %q", v.IAMProfileControlPlane)
|
||||
writeLinef(b, "iam_instance_profile_worker_nodes = %q", v.IAMProfileWorkerNodes)
|
||||
writeLinef(b, "debug = %t", v.Debug)
|
||||
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// String returns a string representation of the variables, formatted as Terraform variables.
|
||||
func (v *GCPVariables) String() string {
|
||||
b := &strings.Builder{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue