It's been suggested earlier that we could export Terraform configuration (https://github.com/weaveworks/eksctl/issues/181), but it's not very clear what's the outcome of that would be. We should explore more specific use-cases, for example, it maybe of interest to crate an Terraform provider that exposes high-level features of eksctl and calls out to our library (#813).
++
@errordeveloper - i like the idea of a terraform provider. Guessing there would be the option to pass in a ClusterConfig file as a terraform data source to the "eks cluster" resource as well as providing the parameters via terraform vars etc. It would be interesting to see how much simpler this would be than https://learn.hashicorp.com/terraform/aws/eks-intro
Just to give an example, in #1075 there is this example:
resource "eksctl_cluster" "cluster-1" {
vpc {
securityGroup = "${aws_security_group.eks_cluster.id}"
}
nodeGroups = [{
name = "ng-1"
attachPolicyARNs = [ "${aws_iam_policy.eks_nodegroup.arn}" ]
}]
}
I was also thinking along these lines when i mentioned passing ClusterConfig in:
data "template_file" "cluster-config-2" {
template = "${
file("${path.module}/examples/01-simple-cluster.yaml")
}"
vars = {
nodegroup_instance_type = "${var.nodegroup_instance_type}"
nodegroup_capacity = "${var.nodegroup_capacity}"
}
}
resource "eksctl_cluster" "cluster-2" {
name = "eks-cluster-${var.environment}"
clusterConfig = "${
data.template_file.cluster-config-2.rendered
}"
}
I'd be happy to work on this after #813 is completed to explore the options further.
@richardcase I believe we are going to make some inroads towards #813 fairly soon, as we have a few other related use-cases.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Most helpful comment
I'd be happy to work on this after #813 is completed to explore the options further.