Skip to content

Terraform module to install several add-ons on an existing EKS cluster

License

Notifications You must be signed in to change notification settings

vistaprint/terraform-aws-simple-eks-addons

Repository files navigation

Simple EKS Add-Ons Module

This module manages several add-ons that might be needed in an EKS cluster. It currently supports the following add-ons:

Ideally this module should not be necessary, and all these add-ons could be installed from the simple-eks module itself. But, the Terraform provider for Kubernetes has some limitations that prevented us from doing so. In short, the Kubernetes provider cannot be initialized with credentials obtained in the same terraform apply execution where the cluster is created. (See the warning box in https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#stacking-with-managed-kubernetes-cluster-resources for more details).

Development

Testing

We use Terratest to run integration tests.

Before running the tests the following environment variables must be set:

  • AWS_PROFILE: the AWS profile to use for the test
  • AWS_DEFAULT_REGION: region where the test cluster will be created (try to use a region other than eu-west-1, ie eu-west-2)
  • SIMPLE_EKS_TEST_VPC_NAME: VPC to be used by the test cluster

Then, go into test folder and run:

go test -v -timeout 30m

References