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/aws-eks/main.cue
Sam Alba abdcb7e093 added kubeconfig code in the example + updated readme
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-18 15:53:55 -07:00

32 lines
765 B
CUE

package main
import (
"dagger.io/aws"
"dagger.io/aws/eks"
)
// Fill using:
// --input-string awsConfig.accessKey=XXX
// --input-string awsConfig.secretKey=XXX
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-"
// Cluster size is 1 for the example purpose
workerNodeCapacity: 1
workerNodeInstanceType: "t3.small"
}
kubeconfig: eks.#KubeConfig & {
config: awsConfig
clusterName: infra.clusterName
}