Call Variable in Terraform with Visual Studio Code on Mac - DevPops-Inc/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 open -a “Visual Studio Code.app” < main Terraform file >.tf and press the return key to launch the main Terraform file in Visual Studio Code.
•

• Scroll down and double-click where you want to call the variable.
•

• Type var.< variable name > to call the variable.
•

• Press the command and S keys to save the changes.
•

• Return to the Terminal, type terraform init and press the return key to initialize Terraform.
•

• Type terraform apply and press the return key to apply the configuration.
•

• Type yes and press the return key to confirm.
•
