Deprecated - GCP is no longer the cloud provider for Carto
Uses Terraform to generate the core infrastructure for the Carto Bot.
The following resources are required before this infrastructure can be created;
- Google Cloud Platform account
- A project to create the infratructure in (e.g.
carto-discord
) - (Optional) A billing account linked to the project
You also need to install Terraform locally.
The following resources are created by the terraform configurations;
Resource | Notes |
---|---|
App Engine App | Cannot be deleted once created, see the provider documentation for an explanation. Initialised with a CLOUD_FIRESTORE database. |
Terraform Service Account | Allows other projects to use a service account for automated deployments. A private key is output at the end of running terraform apply for use in future pipelines, so make sure this is kept secret. |
Project API Services | These APIs are activated from the start;
|
Storage Bucket | This bucket is reserved for automated deployment .tfstate file. The appropriate ACL is set on it such that only the Terraform Service Account can access it (and project owners of course). |
It's as simple as
terraform init # Initialise and download the providers (latest version)
terraform apply # Create the infrastructure. You must be logged into the gcloud cli