Skip to content

Commit 4fb3db0

Browse files
committed
add ids in output
1 parent 70c1eba commit 4fb3db0

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

examples/simple/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
output "network_id" {
2+
value = "${module.network.network_id}"
3+
description = "The id of the Network being created"
4+
}
5+
6+
output "subnet_ids" {
7+
value = "${module.network.subnet_ids}"
8+
description = "The id of all subnets being created"
9+
}
10+
111
output "network" {
212
value = "${module.network.network}"
313
description = "The name of the Network being created"

outputs.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
output "network_id" {
2+
value = "${openstack_networking_network_v2.this.id}"
3+
description = "The Network id being created"
4+
}
5+
6+
output "subnet_ids" {
7+
value = "${data.openstack_networking_subnet_v2.created_subnets.*.id}"
8+
description = "Subnets ids being created"
9+
}
10+
111
output "network" {
212
value = "${format("%s [id= %s]",openstack_networking_network_v2.this.name, openstack_networking_network_v2.this.id)}"
313
description = "The Network being created"
414
}
5-
615
output "subnets" {
716
value = "${formatlist("%s with CIRD %s [id= %s]",data.openstack_networking_subnet_v2.created_subnets.*.name,data.openstack_networking_subnet_v2.created_subnets.*.cidr, data.openstack_networking_subnet_v2.created_subnets.*.id)}"
817
description = "The name of all subnets being created"

0 commit comments

Comments
 (0)