-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
109 lines (90 loc) · 2.65 KB
/
Copy pathvariables.tf
File metadata and controls
109 lines (90 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
############################################
# Compute (DigitalOcean defaults)
############################################
variable "server_name" {
description = "Name of the server / droplet"
type = string
default = "db-router"
}
variable "region" {
description = "AWS region (configures the provider)"
type = string
default = "us-east-1"
}
variable "instance_size" {
description = "EC2 instance type"
type = string
default = "t3.small"
}
variable "image" {
description = "AMI id; empty = latest Debian 12 AMI (data source)"
type = string
default = ""
}
variable "tags" {
description = "Tags applied to the droplet"
type = list(string)
default = ["terraform", "db-router", "grpc"]
}
############################################
# SSH
############################################
variable "ssh_public_key" {
description = "Public SSH key uploaded to the server (set by the deployer; required for manual use)"
type = string
default = ""
}
############################################
# DNS (Cloudflare)
############################################
variable "domain" {
description = "Base domain for the db-router record (e.g. 0.xeze.org)"
type = string
default = "0.xeze.org"
}
variable "subdomain" {
description = "Subdomain for the A record (e.g. 'db' -> db.0.xeze.org)"
type = string
default = "db"
}
variable "cloudflare_zone" {
description = "Cloudflare zone (registered domain) that manages the DNS"
type = string
default = "xeze.org"
}
variable "cloudflare_zone_id" {
description = "Cloudflare zone ID. If empty, looked up by cloudflare_zone name."
type = string
default = ""
}
############################################
# Database usernames (passwords are auto-generated)
############################################
variable "postgres_user" {
description = "PostgreSQL admin username"
type = string
default = "admin"
}
variable "postgres_db" {
description = "Default PostgreSQL database"
type = string
default = "unified_db"
}
variable "mongo_user" {
description = "MongoDB root username"
type = string
default = "admin"
}
############################################
# Access control & ports
############################################
variable "allowed_ips" {
description = "CIDRs allowed to reach SSH. Default is open — restrict in production."
type = list(string)
default = ["0.0.0.0/0", "::/0"]
}
variable "grpc_port" {
description = "gRPC server port (internal; fronted by Caddy on 443)"
type = number
default = 50051
}