1
0
Fork 0

module output

This commit is contained in:
Cedric Girard 2020-05-13 11:49:50 +02:00
parent d5c8bb24a0
commit f3b0d73d14
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4
2 changed files with 9 additions and 0 deletions

View file

@ -13,3 +13,7 @@ resource "aws_instance" "instance1" {
} }
} }
output "instance1_public_ip" {
value = aws_instance.instance1.public_ip
}

View file

@ -2,3 +2,8 @@ module "my_module" {
source = "../module1" source = "../module1"
instance_name = "cedric-instance1" instance_name = "cedric-instance1"
} }
output "ip" {
description = "public IP of the instance"
value = module.my_module.instance1_public_ip
}