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

AMI lookup in self-managed-node-group module should only be required if creating a launch template #2385

Closed
demolitionmode opened this issue Jan 5, 2023 · 1 comment · Fixed by #2386

Comments

@demolitionmode
Copy link
Contributor

Is your request related to a problem? Please describe.

I'm using an instance of the self-managed-node-group module to create only an IAM role (as a workaround for #1753), yet I am required to pass a cluster version for the purpose of looking up an AMI for which I will not use.

I am using the following to call the module

module "self_managed_node_group_iam_role" {
  source  = "terraform-aws-modules/eks/aws//modules/self-managed-node-group"
  version = "~> 19.0"

  for_each = local.self_managed_node_groups

  create_autoscaling_group = false
  create_launch_template   = false
  create_schedule          = false

  cluster_version = each.value.version
}

I want to be able to omit cluster_version from the above config, as it is unrelated to creating the IAM Role.

Describe the solution you'd like.

Given that the data.aws_ami.eks_default is only used in the aws_launch_template.this resource, which has a conditional var.create_launch_template, the data block should be updated to have the same conditional.

@github-actions
Copy link

github-actions bot commented Feb 5, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant