diff --git a/examples/cluster/index.ts b/examples/cluster/index.ts index 118282f2..093c8f05 100644 --- a/examples/cluster/index.ts +++ b/examples/cluster/index.ts @@ -18,6 +18,8 @@ const cluster1 = new eks.Cluster(`${projectName}-1`, { nodeAmiId: "ami-066e69f6f03b5383e", }); +export const defaultAsgArn = cluster1.defaultNodeGroup.apply(ng => ng?.autoScalingGroup.arn ?? ""); + const cluster2 = new eks.Cluster(`${projectName}-2`, { vpcId: vpc.vpcId, publicSubnetIds: vpc.publicSubnetIds, diff --git a/examples/examples_nodejs_test.go b/examples/examples_nodejs_test.go index 83e75fa9..e7028947 100644 --- a/examples/examples_nodejs_test.go +++ b/examples/examples_nodejs_test.go @@ -56,6 +56,8 @@ func TestAccCluster(t *testing.T) { info.Outputs["kubeconfig4"], ) + assert.NotEmpty(t, info.Outputs["defaultAsgArn"], "should have a default ASG") + // let's test there's a iamRoleArn specified for the cluster assert.NotEmpty(t, info.Outputs["iamRoleArn"])