-
Notifications
You must be signed in to change notification settings - Fork 9
/
eks.go
25 lines (21 loc) · 973 Bytes
/
eks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2022 Namespace Labs Inc; All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
package prepare
import (
"context"
"namespacelabs.dev/foundation/internal/compute"
"namespacelabs.dev/foundation/internal/parsing/devhost"
"namespacelabs.dev/foundation/schema"
"namespacelabs.dev/foundation/std/tasks"
"namespacelabs.dev/foundation/universe/aws/configuration/eks"
)
func PrepareEksCluster(clusterName string) compute.Computable[*schema.DevHost_ConfigureEnvironment] {
return compute.Map(
tasks.Action("prepare.eks-cluster-config").HumanReadablef("Prepare the EKS cluster configuration"),
compute.Inputs().Str("clusterName", clusterName),
compute.Output{NotCacheable: true},
func(ctx context.Context, _ compute.Resolved) (*schema.DevHost_ConfigureEnvironment, error) {
return devhost.MakeConfiguration(&eks.Cluster{Name: clusterName})
})
}