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.β
β’
β’ Type cd < location of Terraform files >
and press the Enter key to change directory to the location of the Terraform files.
β’
β’ Type terraform init
and press the Enter key to initialize Terraform.
β’
β’ Type terraform apply
and press the Enter key to apply the configuration.
β’
β’ Type yes
and press the Enter key to confirm.
β’
β’ Type code outputs.tf
and press the Enter key create the outputs.tf the in Visual Studio Code.
β’
β’ Type output β< output 1 name >β {
and press the Enter key to define the output 1
block and open its scope.
β’
β’ Type description < align equal sign > = β< description >β
and press the Enter key to set the description.
β’
β’ Type value < align equal sign > = < value >
and press the Enter key to set the value.
β’
β’ 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.
β’
β’ Type output β< output 2 >β {
and press the Enter key to define the output 2
block and open its scope.
β’
β’ Type description < align equal sign > = β< description >β
and press the Enter key to set description.
β’
β’ Type value < align equal sign > = < value >
and press the Enter key to set the value.
β’
β’ 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.
β’
β’ Press the Ctrl and S keys to save the file.
β’
β’ Type terraform apply
and press the Enter key to apply configuration.
β’
β’ Type yes
and press the Enter key to confirm.
β’
β’ Type terraform output
and press the Enter key to get the outputs.
β’