Skip to content

Commit

Permalink
feat: add app_id and all_environment_variables outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
josephpage committed Jun 6, 2023
1 parent 142079e commit 052064c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions output.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@

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)
}

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 (`<your_app_name>.<region>.scalingo.io`). Same as the url output if you have not set a canonical domain."
description = "The FQDN of the Scalingo application (`<your_app_name>.<region>.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"
}

Expand Down

0 comments on commit 052064c

Please sign in to comment.