I’m Getting this:
Missing required argument
on main.tf line 6, in module "GO-ALB":
6: module "GO-ALB" {
The argument "Name" is required, but no definition was found.
here is my root files
ALB.tf
resource "aws_lb" "go" {
name = var.Name
internal = false
load_balancer_type = "application"
subnets = [for s in data.aws_subnet.allsubnets : s.id] #
["${data.aws_subnet.allsubnets.*.ids}"]
security_groups = ["${data.aws_security_group.allsg.id}"]
tags = {
Name = var.Name
}
}
variables.tf
variable "name" {}
variable "Name" {}
My module files
main.tf (relevant section)
provider "aws" {
region = "us-east-1"
}
module "GO-ALB" {
source = "../../../aws/ec2/ALB/ALB"
name = "${var.Nane}-ALB"
}
and variables.tf
variable "name" {} for another module
variable "Name" {}
I’m running terraform version v0.12.24
and aws provider v2.58.0
In the other modules i pass the variable name and it works (name=var.name)
but any other variable doesn’t work