Call Variable 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.
image

• Type cd < location of Terraform files > and press the return key to change directory to the location of the Terraform files.
image

• 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.
image

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

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

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

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

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

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

⚠️ **GitHub.com Fallback** ⚠️