Skip to content

Push #2

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
push
  • Loading branch information
pavankumar636 committed Nov 9, 2021
commit 1dcb9892f32c0b915f930a3826a6bfd0a2028c3f
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ resource "aws_instance" "myec2vm" {
for_each = toset(keys({for az, details in data.aws_ec2_instance_type_offerings.my_ins_type:
az => details.instance_types if length(details.instance_types) != 0 }))
availability_zone = each.key # You can also use each.value because for list items each.key == each.value
# But for Map, only vlaue should be given.
tags = {
"Name" = "For-Each-Demo-${each.key}"
}
}