Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
To pass the value from the variable num_servers into a module with the input servers, you should use the syntax var.num_servers. The var namespace is used to reference input variables in Terraform. Therefore, the correct way to reference the variable is servers = var.num_servers.
D for sure
Yes I'm agree D
In Terraform, variables are referred to using the syntax var.<variable_name>. Here, var is a special namespace that contains all input variables. For example, if you have a variable named num_servers in your configuration and you want to pass it to a module, you would do it like this: variable "num_servers" { description = "The number of servers to create" default = 5 } module "server_module" { source = "app.terraform.io/example/server" version = "1.0.0" servers = var.num_servers } In the above example, the input variable num_servers is defined with a default value of 5. Then, the server_module is being called and the servers argument is being set to the value of var.num_servers, which is 5.
D to pass a value to a module the syntax is <child module variable name > = <value> Here child module variable name is servers to reference the value of a variable in main/root module var. <name_of _the varibale>
D, servers = var.num_servers
var.num_servers is correct and full answer
I also go with D
D correct
D - Who even marks the right answers at examtopics?
DDDDDDD
D is the answer
D for sure
D is correct
D is the one
Ans is D
D is the ans
D for Sure