terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
758 stars 1.88k forks source link

data aws_volumes with a for_each #274

Closed kalaibarak closed 2 years ago

kalaibarak commented 2 years ago

I would like to get a list of IDS based on data.aws_instances that then I can us in aws_ebs volume I tried data "aws_ebs_volumes" "volumes" for_each = toset(data.aws_instances.instances.ids) ids = each.value.ids but got Computed attributes cannot be set, but a value was set for "ids"

antonbabenko commented 2 years ago

Please ask general Terraform usage questions on https://discuss.hashicorp.com

github-actions[bot] commented 2 years ago

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.