I am creating a below
ABC -- ecs.tf (gives me cluster id)
Content of ecs.tf:
resource "aws_ecs_cluster" "first_cluster" {
name = "firstCluster"
capacity_providers = ["FARGATE"]
default_capacity_provider_strategy {
capacity_provider = "FARGATE"
base = 0
weight = 1
}
setting {
name = "containerInsights"
value = "enabled"
}
}
output "cluster_id" {
value = aws_ecs_cluster.first_cluster.id
}
Now under ABC folder which is root folder, i have another folder with CHILD folder which has app.tf
Question: How can i use cluster_id from ecs.tf in CHILD\app.tf ?
app.tf:
module in this file is already calling different module and one of the input is cluster_id.
This is the challenge, i need to get the cluster_id value from ecs.tf output value from parent folder
My app.tf file contains something like below
module "xyz" {
source = "some modudle which needs cluster_id as input"
cluster_id = ??
}
Help me with what i need to put for cluster_id
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)