Skip to content

Create EKS cluster and associated resources wrapper module on top of terraform-aws-modules#12

Open
marcelovilla wants to merge 52 commits intomainfrom
feature/wrapper
Open

Create EKS cluster and associated resources wrapper module on top of terraform-aws-modules#12
marcelovilla wants to merge 52 commits intomainfrom
feature/wrapper

Conversation

@marcelovilla
Copy link
Member

@marcelovilla marcelovilla commented Jan 2, 2026

Reference Issues or PRs

Closes #8
Closes #9
Closes #11

What does this implement/fix?

This PR implements a Terraform wrapper module built on top of the terraform-aws-modules/terraform-aws-eks and terraform-aws-modules/terraform-aws-vpc modules to deploy an EKS cluster and optionally, all networking resources associated (VPC, VPC endpoints, public and private subnets, NAT Gateways, Internet Gateway, and security group) as well as the creation of necessary IAM roles and an EFS filesystem.

This PR includes an examples folder with two different examples: one using the module to create the cluster and all its associated resources, and another using independent Terraform resources to represent existing infrastructure and then passing those to the module to only create the EKS cluster.

Testing

To test this PR locally, make sure you have OpenTofu installed and AWS credentials configured. Then, run:

make test

This PR includes a GHA workflow that will run the same tests. Results of the latest run can be found here: https://github.com/nebari-dev/terraform-aws-eks-cluster/actions/runs/20991759225/job/60338743785?pr=12

Any other comments?

This is the initial implementation of the wrapper module and we'll likely need to adjust several things as we start using it with different inputs. The tests are very basic now, testing only deploy and destroy functionality. I'll add a new issue to add meaningful checks to the integration tests. Furthermore, documentation is not great yet, and although one of the examples is a good starting point, we should add some notes on what requirements we have for users bringing their own networking resources and IAM roles.

…t the module can be used along other resources created in the same terraform configuration
…ndpoints are created and whether an existing security group is provided
@marcelovilla marcelovilla marked this pull request as ready for review January 14, 2026 10:57
@marcelovilla marcelovilla marked this pull request as draft January 14, 2026 11:01
@marcelovilla marcelovilla marked this pull request as ready for review January 14, 2026 11:01
@marcelovilla marcelovilla requested a review from dcmcand January 14, 2026 11:47
This was referenced Jan 14, 2026
on:
workflow_dispatch:
pull_request:
types: [ready_for_review]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcmcand curious about what you think of this strategy? Maybe we can also add labels to trigger the tests after the PR has been marked for review. What I found annoying is that if the tests fail, one would need to convert it back to a draft PR, work on the tests and then mark it ready for review again. But once this is merged, one could always run it manually using workflow dispatch.

Copy link
Contributor

@dcmcand dcmcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, both the IAM module and vpc-endpoints module should have version constraints.

Make sure we are documenting the requirements for a vpc if they bring their own and for iam if they bring their own. This can be in a follow on pr, but it should at least have an issue if it doesn't.

Have you tested efs with them supplying their own vpc?

@marcelovilla
Copy link
Member Author

Make sure we are documenting the requirements for a vpc if they bring their own and for iam if they bring their own. This can be in a follow on pr, but it should at least have an issue if it doesn't.

@dcmcand I'll address this on a separate PR. I opened the following issue to track it: #13

@marcelovilla marcelovilla marked this pull request as draft January 27, 2026 14:24
@marcelovilla marcelovilla marked this pull request as ready for review January 27, 2026 14:24
@marcelovilla marcelovilla marked this pull request as draft January 27, 2026 16:52
@marcelovilla marcelovilla marked this pull request as ready for review January 27, 2026 16:52
@marcelovilla marcelovilla requested a review from dcmcand January 27, 2026 18:05
@marcelovilla
Copy link
Member Author

marcelovilla commented Jan 27, 2026

Have you tested efs with them supplying their own vpc?

@dcmcand I had not but I modified the examples to enable EFS when bringing their own resources and added an extra ingress rule to the security group which users should have when using their own. Passing integration tests for the updated examples can be found here: https://github.com/nebari-dev/terraform-aws-eks-cluster/actions/runs/21406140439/job/61632379633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants