We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Loops with for_each expression
When I run Terraform plan or apply for the the code under the for_each expreseion,
I get the error:
An input variable with the name "user_names" has not been declared. Did you mean "user_name"?
I have cross -referenced with the exact code on the repository and it is the same thing.
See my module for excerpts form my live/global/iam-user:
module "users" { source = "../../../modules/landing-zone/iam-user"
for_each = toset(var.user_names) user_name = each.value
}
See excerpts from my modele:
terraform { required_version = ">= 1.0.0, < 2.0.0"
required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } }
resource "aws_iam_user" "example" { name = var.user_name }
Please assist.
The text was updated successfully, but these errors were encountered:
Which example are you looking at? Is it this one? If so, user_names is declared right here.
user_names
Sorry, something went wrong.
No branches or pull requests
Loops with for_each expression
When I run Terraform plan or apply for the the code under the for_each expreseion,
I get the error:
An input variable with the name "user_names" has not been declared. Did you mean "user_name"?
I have cross -referenced with the exact code on the repository and it is the same thing.
See my module for excerpts form my live/global/iam-user:
module "users" {
source = "../../../modules/landing-zone/iam-user"
}
See excerpts from my modele:
terraform {
required_version = ">= 1.0.0, < 2.0.0"
}
resource "aws_iam_user" "example" {
name = var.user_name
}
Please assist.
The text was updated successfully, but these errors were encountered: