Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior when utilizing create_eks = false for worker_groups module #6

Open
aspring opened this issue Jun 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@aspring
Copy link

aspring commented Jun 23, 2020

Describe the bug
Im utilizing the worker_groups module independently of the control_plane module and when doing some testing of the module when setting create_eks to false I am receiving the following error.

Error: name must not be empty, got 

  on .terraform/modules/<REDACTED>.worker-nodes/modules/worker_groups/data.tf line 10, in data "aws_eks_cluster" "this":
  10: data "aws_eks_cluster" "this" {

In my current setup the resources already exist for the cluster and this is part of a teardown test but I suspect this would occur without resources in place as the data lookup will attempt to happen regardless of the state of the create_eks flag.

To Reproduce
Steps to reproduce the behavior:

  1. Create a instance of the worker_group module(v10.2.3) with create_eks set to true
  2. Standup supporting infrastructure and validate its setup correctly.
  3. Update configuration such that create_eks is set to false
  4. Generate a plan to observe the error above.

Expected behavior
I would expect the module to be able to properly handle the setting of create_eks to false without generating an error.

Additional context
While not a direct solution this scenario is mentioned explicitly in the original upstream documentation here: https://github.com/terraform-aws-modules/terraform-aws-eks#conditional-creation
and I assume because the data block in question resides inside the module a similar construct would need to be put in place.

It also looks like the aws_auth module is suffering from the same.

@aspring aspring added the bug Something isn't working label Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant