File tree Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ variable "region" {
88}
99
1010variable "name" {
11- type = string
11+ type = string
12+ default = " postgres"
1213}
1314
1415variable "hostname" {
@@ -33,7 +34,7 @@ variable "cluster" {
3334
3435variable "database_version" {
3536 type = string
36- default = " POSTGRES_16 "
37+ default = " POSTGRES_17 "
3738}
3839
3940variable "tier" {
Original file line number Diff line number Diff line change 11locals {
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 , [])
Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ variable "name" {
66 type = string
77}
88
9- variable "hostname" {
10- type = string
11- default = null
12- }
13-
149variable "zone" {
1510 type = any
1611 default = null
You can’t perform that action at this time.
0 commit comments