0
votes

I want to run Windows on eks, but I need to enable Windows support per this doc: https://docs.aws.amazon.com/eks/latest/userguide/windows-support.html#enable-windows-support

It says I need to run this command: eksctl utils install-vpc-controllers --cluster cluster_name --approve

I'm looking at the Terraform aws_eks_cluster resource: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster

I can't find any params that look like install-vpc-controllers.

How do I enable Windows support on the aws_eks_cluster resource?

1

1 Answers

0
votes

You can use the "null_resouce" with provisioner "local_exec".

Example:

resource "null_resource" "install_vpc_controller" {
   provisioner "local-exec" {
      command = eksctl utils install-vpc-controllers --cluster ${aws_eks_cluster.main.name} --approve

   }
}

It's assumed that eks cluster defined like this:

resource "aws_eks_cluster" "main" {
  ...
}

Tool - eksctl should be installed on host where this terraform script executed.