A-Team Security — Infrastructure & Security Agent Engineer v1.1
This commit is contained in:
56
terraform/outputs.tf
Normal file
56
terraform/outputs.tf
Normal file
@@ -0,0 +1,56 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Outputs
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
output "load_balancer_ip" {
|
||||
description = "Public IP address of the load balancer"
|
||||
value = oci_load_balancer_load_balancer.main.ip_address_details[0].ip_address
|
||||
}
|
||||
|
||||
output "app_url" {
|
||||
description = "Application URL"
|
||||
value = var.domain_name != "" ? "https://${var.domain_name}" : "https://${oci_load_balancer_load_balancer.main.ip_address_details[0].ip_address}"
|
||||
}
|
||||
|
||||
output "instance_private_ip" {
|
||||
description = "Private IP of the compute instance"
|
||||
value = oci_core_instance.app.private_ip
|
||||
}
|
||||
|
||||
output "instance_ocid" {
|
||||
description = "OCID of the compute instance"
|
||||
value = oci_core_instance.app.id
|
||||
}
|
||||
|
||||
output "ocir_backend_url" {
|
||||
description = "OCIR URL for the backend image"
|
||||
value = "${local.ocir_endpoint}/${var.ocir_namespace}/${var.ocir_repo_prefix}/backend"
|
||||
}
|
||||
|
||||
output "ocir_frontend_url" {
|
||||
description = "OCIR URL for the frontend image"
|
||||
value = "${local.ocir_endpoint}/${var.ocir_namespace}/${var.ocir_repo_prefix}/frontend"
|
||||
}
|
||||
|
||||
output "ssh_command" {
|
||||
description = "SSH command to connect to the instance (requires bastion or VPN)"
|
||||
value = "ssh opc@${oci_core_instance.app.private_ip}"
|
||||
}
|
||||
|
||||
output "docker_login_command" {
|
||||
description = "Docker login command for OCIR"
|
||||
value = "docker login ${local.ocir_endpoint} -u '${var.ocir_namespace}/${var.ocir_username}'"
|
||||
sensitive = false
|
||||
}
|
||||
|
||||
output "dns_nameservers" {
|
||||
description = "DNS nameservers for the zone (only when domain_name is set)"
|
||||
value = var.domain_name != "" ? oci_dns_zone.main[0].nameservers[*].hostname : []
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Locals
|
||||
# -----------------------------------------------------------------------------
|
||||
locals {
|
||||
ocir_endpoint = "${var.region}.ocir.io"
|
||||
}
|
||||
Reference in New Issue
Block a user