Skip to content

Commit 662d8e8

Browse files
authored
Merge branch 'main' into DSP-774
2 parents 27344a4 + 884f5a6 commit 662d8e8

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

google/sql/postgresql/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ module "netbox-vm" {
9090

9191
role = "PostgreSQL"
9292
platform = "Google Cloud"
93-
site = var.site
93+
site = coalesce(var.site, "Google Cloud ${google_sql_database_instance.main.region}")
9494
cluster = var.cluster
9595

9696
interface = "internal"

google/sql/postgresql/variables.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ variable "region" {
88
}
99

1010
variable "name" {
11-
type = string
11+
type = string
12+
default = "postgres"
1213
}
1314

1415
variable "hostname" {
@@ -33,7 +34,7 @@ variable "cluster" {
3334

3435
variable "database_version" {
3536
type = string
36-
default = "POSTGRES_16"
37+
default = "POSTGRES_17"
3738
}
3839

3940
variable "tier" {

netbox/vm/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
locals {
2-
hostname = coalesce(var.hostname, var.name)
32
domain = try(trimsuffix(var.zone.dns_name, "."), "local")
4-
fqdn = "${local.hostname}.${local.domain}"
3+
fqdn = "${var.name}.${local.domain}"
54
ip_address = var.ip_address != null ? split("/", var.ip_address)[0] : null
65
ip_prefix = var.ip_address != null ? try(split("/", var.ip_address)[1], "32") : null
76
tags = var.tags != null ? var.tags : try(data.netbox_cluster.main[0].tags, [])

netbox/vm/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ variable "name" {
66
type = string
77
}
88

9-
variable "hostname" {
10-
type = string
11-
default = null
12-
}
13-
149
variable "zone" {
1510
type = any
1611
default = null

0 commit comments

Comments
 (0)