infrastructure/modules/infrastructure/output.tf

66 lines
1.8 KiB
HCL

output "hosts" {
value = {
for key, host in var.hosts :
key => {
"hostname" = host.hostname
"fqdn" = "${host.hostname}.serguzim.net"
"fqdn_vpn" = "${host.hostname}.vpn.serguzim.net"
"ipv4_address" = try(
local.server_addresses_separated["${key}:ipv4"].address,
null
)
"ipv6_address" = try(
local.server_addresses_separated["${key}:ipv6"].address,
null
)
ipv4_address_vpn = try(
local.tailscale_host_addresses_separated["${key}:ipv4"].address,
null
)
ipv6_address_vpn = try(
local.tailscale_host_addresses_separated["${key}:ipv6"].address,
null
)
}
}
}
output "healthchecksio" {
value = {
backup = {
for key, check in healthchecksio_check.backup : key => {
"id" = check.id
"ping_url" = check.ping_url
}
}
healthcheck = {
for key, check in healthchecksio_check.healthcheck : key => {
"id" = check.id
"ping_url" = check.ping_url
}
}
}
}
output "scaleway_data" {
value = {
for key in keys(scaleway_iam_application.service_applications) : key => {
"access_key" = scaleway_iam_api_key.service_keys[key].access_key
"secret_key" = scaleway_iam_api_key.service_keys[key].secret_key
"name" = scaleway_object_bucket.service_buckets[key].name
"region" = scaleway_object_bucket.service_buckets[key].region
"endpoint" = scaleway_object_bucket.service_buckets[key].endpoint
"api_endpoint" = scaleway_object_bucket.service_buckets[key].api_endpoint
}
}
sensitive = true
}
output "scaleway_registry_endpoint_public" {
value = scaleway_registry_namespace.public.endpoint
}
output "scaleway_registry_endpoint_private" {
value = scaleway_registry_namespace.private.endpoint
}