Create Outputs File 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 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.
•

• Type touch outputs.tf and press the return key to create the blank outputs.tf file.
•

• Type open -a “Visual Studio Code.app” outputs.tf and press the return key to launch the outputs.tf file in Visual Studio Code.
•

• Type output “< output 1 >” { and press the return key to define the output 1 block and open its scope.
•

• Type description < align equal sign > = “< description >” and press the return key to set the description.
•

• Type value < align equal sign > = < value > and press the return key to set the value.
•

• Press the shift and tab keys to decrease the indent, type } and press the return key twice to close scope of the output “< output 1 >” { block.
•

• Type output “< output 2 >” { and press the return key to define the output 2 block and open its scope.
•

• Type description < align equal sign > = “< description >” and press the return key to set the description.
•

• Type value < align equal sign > = < value > and press the return key to set the value.
•

• Press the shift and tab keys to decrease the indent, type } and press the return key to close the scope of the output “< output 2 >” block.
•

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

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

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

• Type terraform output and press the return key to get the outputs.
•
