Create Outputs File 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 cd < location of Terraform files > and press the Enter key to change directory to the location of the Terraform files.
β€’ image

β€’ 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

β€’ Type code outputs.tf and press the Enter key create the outputs.tf the in Visual Studio Code.
β€’ image

β€’ Type output β€œ< output 1 name >” { and press the Enter key to define the output 1 block and open its scope.
β€’ image

β€’ Type description < align equal sign > = β€œ< description >” and press the Enter key to set the description.
β€’ image

β€’ Type value < align equal sign > = < value > and press the Enter key to set the value.
β€’ image

β€’ Press the Shift and Tab keys to decrease the indent, type } and press the Enter key twice to close scope of the output β€œ< output 1 >” { block.
β€’ image

β€’ Type output β€œ< output 2 >” { and press the Enter key to define the output 2 block and open its scope.
β€’ image

β€’ Type description < align equal sign > = β€œ< description >” and press the Enter key to set description.
β€’ image

β€’ Type value < align equal sign > = < value > and press the Enter key to set the value.
β€’ image

β€’ Press the Shift and Tab keys to decrease the indent, type } and press the Enter key to close scope of the output β€œ< output 2 >" { block.
β€’ image

β€’ Press the Ctrl and S keys to save the file.
β€’ image

β€’ Type terraform apply and press the Enter key to apply configuration.
β€’ image

β€’ Type yes and press the Enter key to confirm.
β€’ image

β€’ Type terraform output and press the Enter key to get the outputs.
β€’ image

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