Posted On: Nov 17, 2022
Following are the steps which should be followed for making an object of one module to be available for the other module at a high level: First, an output variable to be defined in a resource configuration. Till you do not declare resource configuration details, the scope of local and to a module. Now, you have to declare the output variable of module_A to be used in another module's configuration. A brand new and latest key name should be created by you and the value should be kept equivalent to the module_A’s output variable.
Now, for module_B you have to create a file variable.tf. Establish an input variable inside this file having exactly the same name as was in the key defined by you in module_B. In a module, this particular variable enables the resource's dynamic configuration. For making this variable available to some other module also, replicate the process. This is because the particular variable established here has its scope restricted to module_B.
Never Miss an Articles from us.
Terraform is a tool of the DevOps toolchain which is used for development and change in the infrastructure with safety. It is an efficient tool for the versioning of the infrastructure. This tool has ...
There are a bunch of reasons for giving preference to Terraform to be used as one of the significant tools of DevOps. The main motive of DevOps is to bring efficiency and quality in software delivery....
Main key features of Terraform include :Graphing - Its features of graphing that are built-in are helpful in visualizing the infrastructure. Custom Syntax - It's custom syntax is very friendly wh...