This repository manages infrastructure using Terraform to provision Google Cloud Platform resources including Cloud Run, Cloud SQL, Artifact Registry, and more.
Infrastructure as Code (IaC) enables you to safely, consistently, and repeatably manage your infrastructure through version-controlled configuration files.
This infrastructure repository provisions:
- Cloud Run - Serverless container deployment
- Cloud SQL - Managed PostgreSQL database
- Artifact Registry - Docker container storage
- Cloud Storage - Static and media file storage
- Secret Manager - Secure credential management
- Cloud Build - Continuous deployment automation
-
Configure Google Cloud CLI:
gcloud auth login gcloud config set project production-466308 -
Initialize Terraform:
cd terraform terraform init -
Create terraform.tfvars:
project_id = "production-466308" region = "europe-west1" environment = "prod" domain_name = "api.aksio.app"
-
Apply infrastructure:
terraform plan terraform apply
- Terraform Setup - Detailed setup instructions
- Continuous Deployment - Automated deployment configuration
- Terraform Documentation - Full Terraform reference
- Google Provider Documentation - Google Cloud-specific configurations
Terraform state is stored remotely in Google Cloud Storage for team collaboration and state locking. The backend configuration is in terraform/backend.tf.
- All secrets are stored in Google Secret Manager
- Service accounts use minimal required permissions
- State files are encrypted at rest in GCS
- Never commit sensitive values to this repository