module output
This commit is contained in:
parent
d5c8bb24a0
commit
f3b0d73d14
2 changed files with 9 additions and 0 deletions
|
@ -13,3 +13,7 @@ resource "aws_instance" "instance1" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "instance1_public_ip" {
|
||||||
|
value = aws_instance.instance1.public_ip
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue