You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
variable "vpc_id" {
description = "VPC id because we set false the create_vpc value"
type = string
default = "vpc-XXXXXXXXXXX"
}
variable "subnets" {
description = "The subnet ids to create EKS cluster in if create_vpc is false"
type = list(string)
default = ["subnet-XXXXXXXXXX", "subnet-XXXXXXXXXXX", "subnet-XXXXXXXXXXXXX"]
}
variable "nginx_chart_version" {
description = "required value of nginx helm chart"
type = string
default = "3.33.0"
}
Execute terraform init and terraform apply
Expected behavior
It is working :)
Actual behavior
Error: Reference to undeclared module
on .terraform/modules/eks-jx/modules/cluster/outputs.tf line 27, in output "eks_module":
27: value = module.cluster.eks
No module call named "cluster" is declared in module.eks-jx.module.cluster.
Summary
When you set "create_vpc = false" because you have an existing VPC the terraform plan stops with error
Error: Reference to undeclared module
on .terraform/modules/eks-jx/modules/cluster/outputs.tf line 27, in output "eks_module":
27: value = module.cluster.eks
No module call named "cluster" is declared in module.eks-jx.module.cluster.
Steps to reproduce the behavior
Generate a clone of repository "https://github.com/jx3-gitops-repositories/jx3-terraform-eks" for yourself
In clone repository change the main.tf looks like:
add these lines in variables.tf
Execute terraform init and terraform apply
Expected behavior
It is working :)
Actual behavior
Terraform version
The output of
terraform version
is:Module version
Operating system
The text was updated successfully, but these errors were encountered: