Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Latest commit

 

History

History
35 lines (23 loc) · 2.32 KB

README.md

File metadata and controls

35 lines (23 loc) · 2.32 KB

Carto - Core Infrastructure

Deprecated - GCP is no longer the cloud provider for Carto

Uses Terraform to generate the core infrastructure for the Carto Bot.

Prerequisites

The following resources are required before this infrastructure can be created;

  1. Google Cloud Platform account
  2. A project to create the infratructure in (e.g. carto-discord)
  3. (Optional) A billing account linked to the project

You also need to install Terraform locally.

What is created

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;
  • Cloud Build
  • Cloud Functions
  • >
  • Cloud Run
  • Cloud Storage
  • Compute Engine
  • IAM Service
  • Firestore
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).

Creation

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