2023-12-15 04:36:58 -05:00
|
|
|
# Outputs common to all CSPs
|
|
|
|
|
2023-10-19 04:03:22 -04:00
|
|
|
output "out_of_cluster_endpoint" {
|
2023-12-15 04:36:58 -05:00
|
|
|
value = module.node_group["control_plane_default"].instance_ips[0]
|
|
|
|
description = "External endpoint for the Kubernetes API server. Only varies from the `in_cluster_endpoint` when using an internal load balancer."
|
2023-10-19 04:03:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
output "in_cluster_endpoint" {
|
2023-12-15 04:36:58 -05:00
|
|
|
value = module.node_group["control_plane_default"].instance_ips[0]
|
|
|
|
description = "Internal endpoint for the Kubernetes API server."
|
2022-09-26 09:52:31 -04:00
|
|
|
}
|
2022-11-26 13:44:34 -05:00
|
|
|
|
2023-07-21 10:43:51 -04:00
|
|
|
output "api_server_cert_sans" {
|
2023-12-15 04:36:58 -05:00
|
|
|
value = sort(concat([module.node_group["control_plane_default"].instance_ips[0]], var.custom_endpoint == "" ? [] : [var.custom_endpoint]))
|
|
|
|
description = "List of Subject Alternative Names (SANs) for the API server certificate."
|
2023-07-21 10:43:51 -04:00
|
|
|
}
|
|
|
|
|
2023-01-25 08:42:52 -05:00
|
|
|
output "uid" {
|
2023-12-15 04:36:58 -05:00
|
|
|
value = "qemu" // placeholder
|
|
|
|
description = "Unique Identifier (UID) of the cluster."
|
|
|
|
}
|
|
|
|
|
|
|
|
output "init_secret" {
|
|
|
|
value = random_password.init_secret.result
|
|
|
|
sensitive = true
|
|
|
|
description = "Initialization secret to authenticate the bootstrapping node."
|
|
|
|
}
|
|
|
|
|
|
|
|
output "name" {
|
|
|
|
value = "${var.name}-qemu" // placeholder, as per "uid" output
|
|
|
|
description = "Unique name of the Constellation cluster, comprised by name and UID."
|
2023-01-25 08:42:52 -05:00
|
|
|
}
|
|
|
|
|
2023-12-15 04:36:58 -05:00
|
|
|
output "ip_cidr_node" {
|
|
|
|
value = local.cidr_vpc_subnet_nodes
|
|
|
|
description = "CIDR block of the node network."
|
2022-11-26 13:44:34 -05:00
|
|
|
}
|
2023-05-16 08:13:10 -04:00
|
|
|
|
2023-12-15 04:36:58 -05:00
|
|
|
# QEMU-specific outputs
|
|
|
|
|
2023-05-16 08:13:10 -04:00
|
|
|
output "validate_constellation_kernel" {
|
|
|
|
value = null
|
|
|
|
precondition {
|
|
|
|
condition = var.constellation_boot_mode != "direct-linux-boot" || length(var.constellation_kernel) > 0
|
|
|
|
error_message = "constellation_kernel must be set if constellation_boot_mode is 'direct-linux-boot'"
|
|
|
|
}
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Validation placeholder. Do not consume as output."
|
2023-05-16 08:13:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
output "validate_constellation_initrd" {
|
|
|
|
value = null
|
|
|
|
precondition {
|
|
|
|
condition = var.constellation_boot_mode != "direct-linux-boot" || length(var.constellation_initrd) > 0
|
|
|
|
error_message = "constellation_initrd must be set if constellation_boot_mode is 'direct-linux-boot'"
|
|
|
|
}
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Validation placeholder. Do not consume as output."
|
2023-05-16 08:13:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
output "validate_constellation_cmdline" {
|
|
|
|
value = null
|
|
|
|
precondition {
|
|
|
|
condition = var.constellation_boot_mode != "direct-linux-boot" || length(var.constellation_cmdline) > 0
|
|
|
|
error_message = "constellation_cmdline must be set if constellation_boot_mode is 'direct-linux-boot'"
|
|
|
|
}
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Validation placeholder. Do not consume as output."
|
2023-10-23 09:06:48 -04:00
|
|
|
}
|