Create Variables File in Terraform with Visual Studio Code on Mac - VicPhanDevOps/mac GitHub Wiki
• Press the command key and spacebar to launch Spotlight Search, type “terminal” and select the “Terminal” application.
•
• Type cd < location of Terraform files >
and press the return key to change directory to the location of the Terraform files.
•
• Type touch variables.tf
and press the return key to create a blank variables.tf
file.
•
• Type open -a “Visual Studio Code.app” variables.tf
and press the return key to open the variables.tf
file in Visual Studio Code.
•
• Select “Open.”
•
• Type variable “< variable name >” {
and press the return key to declare the variable and open its scope.
•
• Type description < align the equal sign > = “< description >”
and press the return key set the description.
•
• Type type < align equal sign > = < type >
and press the return key to set the type.
•
• Type default < align equal sign > = “< default >”
and press the return key to set the default.
•
• Press the shift and tab keys to decrease the indent, type }
and press the return key to close scope of the variable.
•
• Press the command and S keys to save the variable.tf
file.
•