Skip to content

Commit 84f4bac

Browse files
committed
Remove cluster and zone from Redis and PostgreSQL
1 parent ca4d5c6 commit 84f4bac

File tree

4 files changed

+4
-37
lines changed

4 files changed

+4
-37
lines changed

google/redis/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ module "netbox-vm" {
3737

3838
project = var.project
3939

40-
name = coalesce(var.hostname, var.name)
41-
zone = var.zone
40+
name = var.name
4241

4342
role = "Redis"
4443
platform = "Google Cloud"
45-
site = var.site
46-
cluster = var.cluster
44+
site = coalesce(var.site, "Google Cloud ${google_redis_instance.main.region}")
4745

4846
interface = "internal"
4947
ip_address = google_redis_instance.main.host

google/redis/variables.tf

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,15 @@ variable "region" {
88
}
99

1010
variable "name" {
11-
type = string
12-
}
13-
14-
variable "hostname" {
1511
type = string
16-
default = null
17-
}
18-
19-
variable "zone" {
20-
type = any
21-
default = null
12+
default = "redis"
2213
}
2314

2415
variable "site" {
2516
type = any
2617
default = null
2718
}
2819

29-
variable "cluster" {
30-
type = any
31-
default = null
32-
}
33-
3420
variable "network" {
3521
type = string
3622
}

google/sql/postgresql/main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,11 @@ module "netbox-vm" {
8585

8686
project = var.project
8787

88-
name = coalesce(var.hostname, var.name)
89-
zone = var.zone
88+
name = var.name
9089

9190
role = "PostgreSQL"
9291
platform = "Google Cloud"
9392
site = coalesce(var.site, "Google Cloud ${google_sql_database_instance.main.region}")
94-
cluster = var.cluster
9593

9694
interface = "internal"
9795
ip_address = google_sql_database_instance.main.private_ip_address

google/sql/postgresql/variables.tf

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,11 @@ variable "name" {
1212
default = "postgres"
1313
}
1414

15-
variable "hostname" {
16-
type = string
17-
default = null
18-
}
19-
20-
variable "zone" {
21-
type = any
22-
default = null
23-
}
24-
2515
variable "site" {
2616
type = any
2717
default = null
2818
}
2919

30-
variable "cluster" {
31-
type = any
32-
default = null
33-
}
34-
3520
variable "database_version" {
3621
type = string
3722
default = "POSTGRES_17"

0 commit comments

Comments
 (0)