Call Variable in Terraform with Visual Studio Code on Windows - DevPops-Inc/windows GitHub Wiki

• Press the Windows key, type “git bash” and select “Open.”
image

• Type code < main Terraform file >.tf and press the Enter 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 Ctrl and S keys to save changes.
image

• Return to Git Bash, type terraform init and press the Enter key to initialize Terraform.
image

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

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

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