Which of the follow...
 
Notifications
Clear all

Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?

1 Posts
1 Users
0 Likes
110 Views
(@woodliffrueben)
Posts: 735
Noble Member
Topic starter
 

Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?

  • A . servers = num_servers
    B. servers = variable.num_servers
    C. servers = var(num_servers)
    D. servers = var.num_servers

Show Answer Hide Answer

Suggested Answer: D

Explanation:

"Within the module that declared a variable, its value can be accessed from within expressions as var.<NAME>, where <NAME> matches the label given in the declaration block:

Note: Input variables are created by a variable block, but you reference them as attributes on an object named var."

https://www.terraform.io/language/values/variables#using-input-variable-values
 
Posted : 21/12/2022 12:06 pm

Latest TA-002-P V1 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: