in Education by
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)

1 Answer

0 votes
by
How can i use cluster_id from ecs.tf in CHILD\app.tf ? You can't access it directly. Your parent module must pass cluster_id as an input argument to your module, e.g.: 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" } } module "child" { source = "./CHILD" cluster_id = aws_ecs_cluster.first_cluster.id }

Related questions

0 votes
    What is a Subjob and how can you pass data from parent Job to child Job?...
asked Mar 18, 2021 in Technology by JackTerrance
0 votes
    Setting up the NS record for a child zone in a parent zone is called ____________. A. Domain delegation B. Registrar C. Domain management D. DNS resolution...
asked Nov 21, 2022 in Education by JackTerrance
0 votes
    I've got a menu with multiple child elements, the problem I'm having is that the child menu is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    I've got a menu with multiple child elements, the problem I'm having is that the child menu is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I've got a menu with multiple child elements, the problem I'm having is that the child menu is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 23, 2022 in Education by JackTerrance
0 votes
    What is it called where child object gets killed if parent object is killed? (a) Aggregation (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is it called where object has its own lifecycle and child object cannot belong to another parent object? ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    We can pass data from the parent component to the child component by using - 1. Input 2. @Input() 3. Output 4. @Output()...
asked Jun 29, 2021 in Technology by JackTerrance
0 votes
    What happens to detail record when a master record is deleted? What happens to child record when a parent record is deleted?...
asked Nov 11, 2020 in Technology by JackTerrance
0 votes
    I am trying to install apache spark to run locally on my windows machine. I have followed all instructions ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I'm confused as to how I should use terraform to connect Athena to my Glue Catalog database. I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I'm creating a list of IAM policy, which is stored in .json format. I have only 1 resource block ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I'm attempting to call my sql stored procedure which takes RaceDate as an input and returns Location as an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I'm attempting to call my sql stored procedure which takes RaceDate as an input and returns Location as an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    When you call serialize() on an R object, the output will be ____ coded in hexadecimal format. (a) raw ... Operations of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
...