Terraform module for deploying Serverpod to Google Cloud Engine.
The module will set up a complete Serverpod infrastructure with auto-scaling Cloud Engine instances and a Postgres database. It will also configure all necessary certificates and load balancing. You can opt into using Redis and Google Cloud Storage buckets.
Complete step-by-step instructions are available in the official Serverpod documentation here. See below for all the additional options you can use with this module.
Name | Version |
---|---|
terraform | >= 1.3.9 |
>= 4.51.0 |
Name | Version |
---|---|
4.51.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
autoscaling_cpu_utilization | The CPU utilization to use for the autoscaling group. Defaults to 0.6. | number |
0.6 |
no |
autoscaling_max_size | The maximum number of instances to run in the autoscaling group. Defaults to 2. | number |
2 |
no |
autoscaling_min_size | The minimum number of instances to run in the autoscaling group. Defaults to 1. | number |
1 |
no |
database_availability_type | The availability type of the database to use. Defaults to 'ZONAL', which represents a single zone. | string |
"ZONAL" |
no |
database_backup_enabled | Whether to enable backups for the database. Defaults to true. | bool |
true |
no |
database_backup_point_in_time_recovery_enabled | Whether to enable point in time recovery for the database. Defaults to false. | bool |
false |
no |
database_deletion_protection | Whether to enable deletion protection for the database. Defaults to true. | bool |
true |
no |
database_password | The password to use for the database. You can find the password in your 'config/passwords.yaml' file. | string |
n/a | yes |
database_tier | The tier of the database to use. Defaults to 'db-f1-micro'. | string |
"db-f1-micro" |
no |
database_version | The version of the database to use. Defaults to 'POSTGRES_16'. Note that only PostgreSQL is supported. | string |
"POSTGRES_16" |
no |
redis_version | The version of Redis to use. Defaults to 'REDIS_7_2'. | string |
"REDIS_7_2" |
no |
dns_managed_zone | The name of the DNS managed zone to use for the Serverpod infrastructure. If this is not set, a new managed zone will be created. | string |
"" |
no |
enable_redis | Whether to enable Redis. Defaults to false. | bool |
false |
no |
enable_ssh | Whether to enable SSH access to instances in the autoscaling group. Defaults to true. | bool |
true |
no |
enable_storage | Whether to enable storage. Defaults to true. | bool |
true |
no |
machine_type | The machine type to use for the autoscaling group. Defaults to 'e2-micro'. | string |
"e2-micro" |
no |
project | The GCP project ID to deploy your Serverpod infrastructure to. | string |
n/a | yes |
redis_memory_size_gb | The memory size of the Redis instance to use in gigabytes, if it is enabled. Defaults to 1. | number |
1 |
no |
redis_tier | The tier of the Redis instance to use, if it is enabled. Defaults to 'BASIC'. | string |
"BASIC" |
no |
region | The GCP region to deploy your Serverpod infrastructure to. Defaults to 'us-central1'. | string |
"us-central1" |
no |
runmode | The runmode to deploy your Serverpod infrastructure in. This can be 'production' or 'development'. | string |
"production" |
no |
service_account_email | The email address of the service account to use for the Serverpod infrastructure. | string |
"" |
no |
storage_bucket_class | The class of the storage buckets. Defaults to 'STANDARD'. | string |
"STANDARD" |
no |
storage_bucket_location | The location of the storage buckets. Defaults to 'US'. | string |
"US" |
no |
subdomain_prefix | The subdomain prefix to use for the Serverpod infrastructure. This is useful to set for your staging environment, in which case all sub domains will be prefixed with this value. | string |
"" |
no |
subdomain_web | The subdomain to use for the web server. Defaults to 'app', but you may want to change it to 'www' if you have set 'use_top_domain_for_web' to true. | string |
"app" |
no |
top_domain | The top domain to deploy your Serverpod infrastructure to. E.g. 'example.com'. | string |
n/a | yes |
use_top_domain_for_web | Whether to use the top domain for the web server. Defaults to false. | bool |
false |
no |
zone | The GCP zone to deploy your Serverpod infrastructure to. Defaults to 'us-central1-c'. | string |
"us-central1-c" |
no |
Name | Description |
---|---|
network | The name of Serverpod's private network. |