forked from fly-apps/go-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
44 lines (38 loc) · 1.11 KB
/
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
40
41
42
43
44
output "instance_name" {
value = fly_app.exampleApp.name
}
output "instance_image" {
# value = fly_machine.exampleMachine.image
value = {
for machine in fly_machine.exampleMachine : machine.name => try(machine.image, null)
}
}
output "instance_availability" {
# value = fly_machine.exampleMachine.region
value = {
for machine in fly_machine.exampleMachine : machine.name => try(machine.region, null)
}
}
# ! NOTE: only "privateip" is available when using "for_each"
# output "instance_ip_v4" {
# # value = fly_ip.exampleIp.address
# }
output "instance_cpu" {
# value = fly_machine.exampleMachine.cpus
value = {
for machine in fly_machine.exampleMachine : machine.name => try(machine.cpus, null)
}
}
# * NOTE: "must be in 256 MiB increment"
output "instance_ram" {
# value = fly_machine.exampleMachine.memorymb
value = {
for machine in fly_machine.exampleMachine : machine.name => try(machine.memorymb, null)
}
}
output "instance_env" {
# value = fly_machine.exampleMachine.env
value = {
for machine in fly_machine.exampleMachine : machine.name => try(machine.env, null)
}
}