diff --git a/README.md b/README.md index 2c4a7fc..ff778c5 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,12 @@ An opinionated Terraform module to provision an application and database very ea | Name | Description | |------|-------------| -| [domain](#output\_domain) | Hostname to use to access the application (without https://) | -| [git\_url](#output\_git\_url) | Hostname to use to deploy code with Git + SSH | -| [region](#output\_region) | Region where the application is deployed | -| [url](#output\_url) | Base URL (https://*) to access the application | +| [domain](#output\_domain) | Hostname to use to access the application. Same as the `url` output but without the `https://`. | +| [git\_url](#output\_git\_url) | Hostname to use to deploy code with Git + SSH. | +| [log\_drain\_url](#output\_log\_drain\_url) | URL of the drain to use by Scalingo to send logs to your log management system. (Note: the username and password are included in the URL, be careful with the security of this URL.). It's already marked as sensitive to avoid leaking it in the Terraform state. | +| [origin\_domain](#output\_origin\_domain) | The FQDN of the Scalingo application (`..scalingo.io`). Same as the url output if you have not set a canonical domain. | +| [region](#output\_region) | Region where the application is deployed. | +| [url](#output\_url) | 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. | ## Generate documentation diff --git a/output.tf b/output.tf index 5435a0d..2a6d84e 100644 --- a/output.tf +++ b/output.tf @@ -1,19 +1,29 @@ output "url" { - description = "Base URL (https://*) to access the application" - value = scalingo_app.app.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.canonical_domain == "" ? scalingo_app.app.url : "https://${var.canonical_domain}") } output "domain" { - description = "Hostname to use to access the application (without https://)" + description = "Hostname to use to access the application. Same as the `url` output but without the `https://`." value = trim(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." + value = "${scalingo_app.app.name}.${local.current_region}.scalingo.io" +} + output "git_url" { - description = "Hostname to use to deploy code with Git + SSH" + description = "Hostname to use to deploy code with Git + SSH." value = scalingo_app.app.git_url } output "region" { - description = "Region where the application is deployed" + description = "Region where the application is deployed." value = local.current_region } + +output "log_drain_url" { + description = "URL of the drain to use by Scalingo to send logs to your log management system. (Note: the username and password are included in the URL, be careful with the security of this URL.). It's already marked as sensitive to avoid leaking it in the Terraform state." + value = sensitive(scalingo_app.log_drain.drain_url) +}