-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
39 lines (32 loc) · 1015 Bytes
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
output "eip_ip" {
value = try(aws_eip.this[0].public_ip, null)
description = "public ip of instance"
}
output "private_ip" {
value = try(module.ec2_instance[0].private_ip, null)
description = "private ip of instance"
}
output "ami_id" {
value = data.aws_ami.ami.id
description = "ami id"
}
output "instance_role" {
value = var.instance_profile == null ? aws_iam_role.instance_role[0].name : null
description = "ec2_instance_profile"
}
output "ec2_instance_profile" {
value = var.instance_profile == null ? aws_iam_instance_profile.ec2_instance_profile[0].name : null
description = "ec2_instance_profile"
}
output "instance_id" {
value = try(module.ec2_instance[0].id, null)
description = "instance id"
}
output "private_dns_name" {
value = try(module.ec2_instance.private_dns, null)
description = "private dns name"
}
output "public_dns_name" {
value = try(module.ec2_instance.public_dns, null)
description = "public dns name"
}