From bdfc59136c34685a85ecbd2cf8f3b4d8907fbe05 Mon Sep 17 00:00:00 2001 From: Joseph Page Date: Tue, 22 Aug 2023 17:15:43 +0200 Subject: [PATCH] docs: update README --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ff778c5..8b94b6e 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ An opinionated Terraform module to provision an application and database very ea | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.3.9, < 2.0.0 | +| [terraform](#requirement\_terraform) | >= 1.3.0, < 2.0.0 | | [environment](#requirement\_environment) | ~> 1.3 | -| [scalingo](#requirement\_scalingo) | ~> 2.0 | +| [scalingo](#requirement\_scalingo) | ~> 2.2 | ## Resources @@ -31,25 +31,29 @@ An opinionated Terraform module to provision an application and database very ea |------|-------------|------|---------|:--------:| | [additionnal\_collaborators](#input\_additionnal\_collaborators) | List of emails of collaborators that have admin rights for the application | `list(string)` | `[]` | no | | [addons](#input\_addons) | List of addons to add to the application |
list(object({
provider = string
plan = string
database_features = optional(list(string))
}))
| `[]` | no | -| [authorize\_unsecure\_http](#input\_authorize\_unsecure\_http) | When true, Scalingo does not automatically redirect HTTP traffic to HTTPS | `bool` | `false` | no | +| [authorize\_unsecure\_http](#input\_authorize\_unsecure\_http) | When true, Scalingo does not automatically redirect HTTP traffic to HTTPS. The default behavior is to redirect HTTP traffic to HTTPS (when value is `false`) | `bool` | `false` | no | | [containers](#input\_containers) | Configuration of the containers of the application. |
map(object({
size = optional(string, "S")
amount = optional(number, 1)
autoscaler = optional(object({
min_containers = optional(number, 2)
max_containers = optional(number, 10)
metric = optional(string, "cpu")
target = optional(number, 0.8)
}))
}))
|
{
"web": {
"amount": 0,
"size": "S"
}
}
| no | | [domain](#input\_domain) | Main domain name of the application, known as "canonical domain" in Scalingo's dashboard. Note that SSL configuration must be completed through the dashboard. | `string` | `null` | no | | [domain\_aliases](#input\_domain\_aliases) | List of others domain names for the application | `list(string)` | `[]` | no | -| [environment](#input\_environment) | Map of environment variables to set on the application | `map(string)` | `{}` | no | -| [github\_integration](#input\_github\_integration) | n/a |
object({
repo_url = string
integration_uuid = optional(string)
branch = optional(string, "main")
auto_deploy_enabled = optional(bool, true)
deploy_review_apps_enabled = optional(bool, false)
delete_on_close_enabled = optional(bool, true)
delete_stale_enabled = optional(bool, true)
hours_before_delete_on_close = optional(string, "0")
hours_before_delete_stale = optional(string, "72")
automatic_creation_from_forks_allowed = optional(bool, false)
})
| `null` | no | -| [gitlab\_integration](#input\_gitlab\_integration) | n/a |
object({
repo_url = string
integration_uuid = optional(string)
branch = optional(string, "main")
auto_deploy_enabled = optional(bool, true)
deploy_review_apps_enabled = optional(bool, false)
delete_on_close_enabled = optional(bool, true)
delete_stale_enabled = optional(bool, true)
hours_before_delete_on_close = optional(string, "0")
hours_before_delete_stale = optional(string, "72")
automatic_creation_from_forks_allowed = optional(bool, false)
})
| `null` | no | +| [environment](#input\_environment) | Map of environment variables to set on the application. Note that value of environment variables can be null or empty. | `map(string)` | `null` | no | +| [github\_integration](#input\_github\_integration) | Configuration of the GitHub integration of the application. Only one of github\_integration or gitlab\_integration can be set. |
object({
repo_url = string
integration_uuid = optional(string)
branch = optional(string, "main")
auto_deploy_enabled = optional(bool, true)
})
| `null` | no | +| [gitlab\_integration](#input\_gitlab\_integration) | Configuration of the GitLab integration of the application. Only one of github\_integration or gitlab\_integration can be set. |
object({
repo_url = string
integration_uuid = optional(string)
branch = optional(string, "main")
auto_deploy_enabled = optional(bool, true)
})
| `null` | no | | [log\_drains](#input\_log\_drains) | n/a |
list(object({
type = string
url = optional(string, "")
}))
| `[]` | no | | [name](#input\_name) | n/a | `string` | n/a | yes | +| [review\_apps](#input\_review\_apps) | Configuration of the review apps of the application. |
object({
enabled = optional(bool, false)

# By default: delete review apps 0 hours after closing the PR
delete_on_close_enabled = optional(bool, true)
hours_before_delete_on_close = optional(string, "0")

# By default: delete review apps after 5 days of inactivity (= no new deployment)
delete_stale_enabled = optional(bool, true)
hours_before_delete_stale = optional(string, "168")

# By default: do not create review apps for PRs from forks
automatic_creation_from_forks_allowed = optional(bool, false)
})
| `{}` | no | +| [router\_logs](#input\_router\_logs) | When true, the router logs are included in the application logs. (default: `false`) | `bool` | `false` | no | | [stack](#input\_stack) | The stack to use for the app (default: "scalingo-22"). | `string` | `"scalingo-22"` | no | +| [sticky\_session](#input\_sticky\_session) | When true, sticky sessions are enabled. (default: `false`) | `bool` | `false` | no | ## Outputs | Name | Description | |------|-------------| +| [all\_environment\_variables](#output\_all\_environment\_variables) | All environment variables of the Scalingo application (ones added by the terraform module and ones added by Scalingo add-ons). | +| [app\_id](#output\_app\_id) | ID of the Scalingo 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. | +| [origin\_domain](#output\_origin\_domain) | The FQDN of the Scalingo application (`..scalingo.io`). Same as the `domain` 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. |