Skip to content

Commit 9a2e258

Browse files
committed
docs: Provide example Terraform variables
1 parent 0e9968e commit 9a2e258

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# AWS Deployment Configuration
2+
# Copy to terraform.tfvars and customize
3+
4+
# REQUIRED PARAMETERS
5+
# -------------------------
6+
7+
# SSH key for EC2 access (create in AWS Console or CLI)
8+
ssh_key_name = "your-key-name"
9+
10+
# Grafana password (minimum 8 characters)
11+
grafana_password = "YourSecurePassword123!"
12+
13+
14+
# AWS SETTINGS
15+
# -------------------------
16+
17+
# AWS region
18+
aws_region = "us-east-1"
19+
20+
# Environment
21+
environment = "production"
22+
23+
# EC2 instance type
24+
# t3.medium - 2 vCPU, 4 GiB - for 1-3 databases
25+
# t3.large - 2 vCPU, 8 GiB - for 3-10 databases (recommended)
26+
# t3.xlarge - 4 vCPU, 16 GiB - for 10+ databases
27+
instance_type = "t3.large"
28+
29+
# EBS volume size for data (GiB)
30+
data_volume_size = 100
31+
32+
33+
# SECURITY
34+
# -------------------------
35+
36+
# CIDR blocks for SSH access (restrict to your IP in production)
37+
allowed_ssh_cidr = [
38+
"0.0.0.0/0" # WARNING: Allows access from anywhere
39+
# "203.0.113.0/24" # Replace with your office/VPN IP
40+
]
41+
42+
# CIDR blocks for Grafana access (restrict to your IP in production)
43+
allowed_cidr_blocks = [
44+
"0.0.0.0/0" # WARNING: Allows access from anywhere
45+
# "203.0.113.0/24" # Replace with your office/VPN IP
46+
]
47+
48+
# Allocate Elastic IP for stable address
49+
use_elastic_ip = true
50+
51+
52+
# POSTGRESQL MONITORING
53+
# -------------------------
54+
55+
# PostgreSQL instances to monitor
56+
monitoring_instances = [
57+
{
58+
name = "production-db"
59+
conn_str = "postgresql://monitor:password@db.example.com:5432/postgres"
60+
environment = "production"
61+
cluster = "main"
62+
node_name = "primary"
63+
},
64+
# {
65+
# name = "production-replica"
66+
# conn_str = "postgresql://monitor:password@replica.example.com:5432/postgres"
67+
# environment = "production"
68+
# cluster = "main"
69+
# node_name = "replica-1"
70+
# }
71+
]
72+
73+
74+
# OPTIONAL PARAMETERS
75+
# -------------------------
76+
77+
# PostgresAI API key (for uploading reports to cloud)
78+
#
79+
# How to get API key:
80+
# 1. Register at https://console.postgres.ai
81+
# 2. Go to: Your Organization → Manage → Access Tokens
82+
# 3. Create new token and copy it here
83+
#
84+
# If not set, reports will be generated locally without upload
85+
# postgres_ai_api_key = "your-api-key-here"
86+
87+
# Enable demo database (for testing)
88+
# enable_demo_db = false
89+
90+
91+
# CONFIGURATION EXAMPLES
92+
# -------------------------
93+
94+
# Minimal configuration (for testing):
95+
# ------------------------------------
96+
# instance_type = "t3.medium"
97+
# data_volume_size = 50
98+
# enable_demo_db = true
99+
# monitoring_instances = []
100+
101+
# Production configuration:
102+
# -------------------------
103+
# instance_type = "t3.xlarge"
104+
# data_volume_size = 200
105+
# allowed_ssh_cidr = ["10.0.0.0/8"]
106+
# allowed_cidr_blocks = ["10.0.0.0/8"]
107+
# use_elastic_ip = true
108+
109+
# Minimal configuration (dev/test):
110+
# ----------------------------------
111+
# instance_type = "t3.small" # WARNING: May be slow for production use
112+
# data_volume_size = 30
113+
# use_elastic_ip = false

0 commit comments

Comments
 (0)