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

Version 5.0.0 Error: Incorrect attribute value type #401

Closed
1 of 4 tasks
tokiwong opened this issue Jun 19, 2019 · 5 comments
Closed
1 of 4 tasks

Version 5.0.0 Error: Incorrect attribute value type #401

tokiwong opened this issue Jun 19, 2019 · 5 comments

Comments

@tokiwong
Copy link

I have issues

I'm submitting a...

  • bug report
  • feature request
  • support request
  • kudos, thank you, warm fuzzy

What is the current behavior?

Error: Incorrect attribute value type

  on .terraform/modules/application-eks/terraform-aws-modules-terraform-aws-eks-9c3d222/workers.tf line 37, in resource "aws_autoscaling_group" "workers":
  37:   vpc_zone_identifier = lookup(
Inappropriate value for attribute "vpc_zone_identifier": set of string
required.

If this is a bug, how to reproduce? Please include a code sample if relevant.

What's the expected behavior?

Subnets passed into the module should be picked up by the worker groups.
Adding

subnets              = data.terraform_remote_state.vpc.outputs.private_subnets

to the worker_group_defaults also throws the same error

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version: 5.0.0
  • OS: High Sierra, 10.13.4
  • Terraform version: 0.12.2

Any other relevant info

@helenes-r7
Copy link

Hey @tokiwong I ran into this same issue myself tonight and I found this: #394

After setting my worker_groups.subnets value to a list of subnets, I was able to get passed this error. I previously had my subnets defined as a string and was getting that same error you're experiencing.

@andelhie
Copy link

I have my code looking up all the Subnets that I am using. I checked in the console and the output of the value is in a list format but I am still getting the same error.

module "eks" {
  source       = "terraform-aws-modules/eks/aws"
  version      = "5.0.0"                        # As of this writting this is the lastes version
  cluster_name = "${var.aws_cluster_name}-eks"  # the name to give the EKS cluster
  subnets      = data.aws_subnet.private.*.id # the list of subnets to use
  vpc_id       = var.vpc_id                     # the VPC that will be used

With the data output being this in the console.

> data.aws_subnet.private.*.id
[
  "subnet-0647e",
  "subnet-03cc3",
  "subnet-064c2",
]

From what I can tell I am pass a list.

@andelhie
Copy link

I was able to fix my problem by adding the subnets to the worker_groups values.

@tokiwong
Copy link
Author

@helenes-r7 Thanks for the tip, I was able to fix my problem. One of my worker groups had their subnets set to:
subnets = data.terraform_remote_state.vpc.outputs.private_subnets[0]
which was of type string, and it was fixed by changing it to:
subnets = [data.terraform_remote_state.vpc.outputs.private_subnets[0]]

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

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 Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants