Skip to content

Commit

Permalink
pin eks k8s version (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsinger-klotho authored Jan 10, 2024
1 parent 4d488ed commit 6557f1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/engine2/testdata/k8s_api.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ resources:
Subnets:
- aws:subnet:vpc-0:subnet-0
- aws:subnet:vpc-0:subnet-1
Version: "1.28"
Vpc: aws:vpc:vpc-0
aws:iam_role:ClusterRole-eks_cluster-0:
AssumeRolePolicyDoc:
Expand Down
2 changes: 2 additions & 0 deletions pkg/infra/iac3/templates/aws/eks_cluster/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ interface Args {
Subnets: aws.ec2.Subnet[]
SecurityGroups: aws.ec2.SecurityGroup[]
ClusterRole: aws.iam.Role
Version: string
}

// noinspection JSUnusedLocalSymbols
function create(args: Args): aws.eks.Cluster {
return new aws.eks.Cluster(args.Name, {
version: args.Version,
vpcConfig: {
subnetIds: args.Subnets.map((subnet) => subnet.id),
//TMPL {{- if .SecurityGroups }}
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/aws/resources/eks_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ qualified_type_name: aws:eks_cluster
display_name: EKS Cluster

properties:
Version:
type: string
default_value: "1.28"
description: The Kubernetes version to use for the EKS cluster
ClusterRole:
type: resource(aws:iam_role)
operational_rule:
Expand Down

0 comments on commit 6557f1e

Please sign in to comment.