This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/examples/kubernetes-aws/main.cue
Andrea Luzzardi 324a1c2992 examples: kubernetes-aws: fix cuefmt
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-01 16:49:58 -07:00

30 lines
706 B
CUE

package main
import (
"dagger.io/aws"
"dagger.io/aws/eks"
)
// AWS account: credentials and region
awsConfig: aws.#Config & {
region: *"us-east-2" | string
}
// Auto-provision an EKS cluster:
// - VPC, Nat Gateways, Subnets, Security Group
// - EKS Cluster
// - Instance Node Group: auto-scaling-group, ec2 instances, etc...
// base config can be changed (number of EC2 instances, types, etc...)
infra: #Infrastructure & {
"awsConfig": awsConfig
namePrefix: "dagger-example-"
workerNodeCapacity: int | *1
workerNodeInstanceType: "t3.small"
}
// Client configuration for kubectl
kubeconfig: eks.#KubeConfig & {
config: awsConfig
clusterName: infra.clusterName
}