linux_wiki:terraform

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
linux_wiki:terraform [2018/06/14 22:42]
billdozor [Terraform]
linux_wiki:terraform [2018/06/19 22:34]
billdozor [File Contents: Site Module Files]
Line 510: Line 510:
 <code bash outputs.tf># Title: outputs.tf <code bash outputs.tf># Title: outputs.tf
 # Description: Outputs from resources saved as variables # Description: Outputs from resources saved as variables
 +#              Accessible via "${module.site.variable_name}"
  
-# Store the VPC ID - pulled from here in main's output.tf+# Set output variable from resource format                                                                            
 +# output "variable_name"
 +#   value = "${aws_resource.name.attribute}" 
 +# } 
 + 
 +# Store the VPC ID
 output "vpc_id" { output "vpc_id" {
   value = "${aws_vpc.myvpc.id}"   value = "${aws_vpc.myvpc.id}"
 +}
 +
 +# Store the Public Subnet ID
 +output "subnet01_public_id" {
 +  value = "${aws_subnet.subnet01-public.id}"
 +}
 +
 +# Store the Public Security Group ID
 +output "sg_public_default_id" {
 +  value = "${aws_security_group.sg_public_default.id}"
 }</code> }</code>
  
 ---- ----
  
  • linux_wiki/terraform.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)