diff --git a/output.tf b/output.tf index 8414620..bb51fb5 100644 --- a/output.tf +++ b/output.tf @@ -1,3 +1,15 @@ + +output "app_id" { + description = "ID of the Scalingo application." + value = scalingo_app.app.id +} + +output "all_environment_variables" { + description = "All environment variables of the Scalingo application (ones added by the terraform module and ones added by Scalingo add-ons)." + value = scalingo_app.app.all_environment + sensitive = true # Environment variables can contain sensitive information +} + output "url" { description = "Base URL to access the application (`https://*`). If you have set a canonical domain, this will be the URL with the canonical domain, otherwise it will be the default URL of the Scalingo application." value = (var.domain != null ? "https://${var.domain}" : scalingo_app.app.url) @@ -5,11 +17,11 @@ output "url" { output "domain" { description = "Hostname to use to access the application. Same as the `url` output but without the `https://`." - value = trim(scalingo_app.app.url, "https://") + value = trim((var.domain != null ? "https://${var.domain}" : scalingo_app.app.url), "https://") } output "origin_domain" { - description = "The FQDN of the Scalingo application (`..scalingo.io`). Same as the url output if you have not set a canonical domain." + description = "The FQDN of the Scalingo application (`..scalingo.io`). Same as the `domain` output if you have not set a canonical domain." value = "${scalingo_app.app.name}.${local.current_region}.scalingo.io" }