mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-06 08:15:48 -04:00
terraform: aws node groups
This commit is contained in:
parent
6dd8a571ec
commit
22ebdace43
12 changed files with 304 additions and 170 deletions
|
@ -130,16 +130,27 @@ func (c *Creator) Create(ctx context.Context, opts CreateOptions) (clusterid.Fil
|
|||
|
||||
func (c *Creator) createAWS(ctx context.Context, cl terraformClient, opts CreateOptions) (idFile clusterid.File, retErr error) {
|
||||
vars := terraform.AWSClusterVariables{
|
||||
CommonVariables: terraform.CommonVariables{
|
||||
Name: opts.Config.Name,
|
||||
CountControlPlanes: opts.ControlPlaneCount,
|
||||
CountWorkers: opts.WorkerCount,
|
||||
StateDiskSizeGB: opts.Config.StateDiskSizeGB,
|
||||
Name: opts.Config.Name,
|
||||
NodeGroups: map[string]terraform.AWSNodeGroup{
|
||||
"control_plane_default": {
|
||||
Role: role.ControlPlane.TFString(),
|
||||
StateDiskSizeGB: opts.Config.StateDiskSizeGB,
|
||||
InitialCount: opts.ControlPlaneCount,
|
||||
Zone: opts.Config.Provider.AWS.Zone,
|
||||
InstanceType: opts.InsType,
|
||||
DiskType: opts.Config.Provider.AWS.StateDiskType,
|
||||
},
|
||||
"worker_default": {
|
||||
Role: role.Worker.TFString(),
|
||||
StateDiskSizeGB: opts.Config.StateDiskSizeGB,
|
||||
InitialCount: opts.WorkerCount,
|
||||
Zone: opts.Config.Provider.AWS.Zone,
|
||||
InstanceType: opts.InsType,
|
||||
DiskType: opts.Config.Provider.AWS.StateDiskType,
|
||||
},
|
||||
},
|
||||
StateDiskType: opts.Config.Provider.AWS.StateDiskType,
|
||||
Region: opts.Config.Provider.AWS.Region,
|
||||
Zone: opts.Config.Provider.AWS.Zone,
|
||||
InstanceType: opts.InsType,
|
||||
AMIImageID: opts.image,
|
||||
IAMProfileControlPlane: opts.Config.Provider.AWS.IAMProfileControlPlane,
|
||||
IAMProfileWorkerNodes: opts.Config.Provider.AWS.IAMProfileWorkerNodes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue