File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,11 @@ resource "aws_instance" "main" {
164164 }
165165
166166 user_data = templatefile (" ${ path . module } /user_data.sh" , {
167- grafana_password = var.grafana_password
168- postgres_ai_api_key = var.postgres_ai_api_key
169- enable_demo_db = var.enable_demo_db
170- instances_yml = templatefile (" ${ path . module } /instances.yml.tpl" , {
167+ grafana_password = var.grafana_password
168+ postgres_ai_api_key = var.postgres_ai_api_key
169+ enable_demo_db = var.enable_demo_db
170+ postgres_ai_version = var.postgres_ai_version
171+ instances_yml = templatefile (" ${ path . module } /instances.yml.tpl" , {
171172 monitoring_instances = var.monitoring_instances
172173 enable_demo_db = var.enable_demo_db
173174 })
Original file line number Diff line number Diff line change 4545# OPTIONAL PARAMETERS
4646# -------------------------
4747
48+ # postgres_ai version (optional, defaults to 'main')
49+ # postgres_ai_version = "0.9" # branch or specific tag like "0.9"
50+
4851# PostgreSQL instances to monitor (optional, can be empty for initial setup)
4952# monitoring_instances = [
5053# {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ chown -R postgres_ai:postgres_ai /data
7878
7979# Clone postgres_ai repository
8080cd /home/postgres_ai
81- sudo -u postgres_ai git clone https://gitlab.com/postgres-ai/postgres_ai.git
81+ sudo -u postgres_ai git clone --branch ${postgres_ai_version} https://gitlab.com/postgres-ai/postgres_ai.git
8282
8383# Configure postgres_ai
8484cd postgres_ai
Original file line number Diff line number Diff line change @@ -79,3 +79,9 @@ variable "enable_demo_db" {
7979 default = false
8080}
8181
82+ variable "postgres_ai_version" {
83+ description = " postgres_ai version (git tag or branch)"
84+ type = string
85+ default = " main"
86+ }
87+
You can’t perform that action at this time.
0 commit comments