File tree Expand file tree Collapse file tree 7 files changed +17
-9
lines changed
dashboards/grafana_v9-11/cloud/ops
kickstart_v2/terraform/gcp Expand file tree Collapse file tree 7 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 30843084 "refresh" : " " ,
30853085 "schemaVersion" : 39 ,
30863086 "tags" : [
3087- " Operations Preview"
30883087 ],
30893088 "templating" : {
30903089 "list" : [
Original file line number Diff line number Diff line change 43234323 "refresh" : " " ,
43244324 "schemaVersion" : 39 ,
43254325 "tags" : [
4326- " Operations Preview"
43274326 ],
43284327 "templating" : {
43294328 "list" : [
Original file line number Diff line number Diff line change 23032303 "refresh" : " 30s" ,
23042304 "schemaVersion" : 39 ,
23052305 "tags" : [
2306- " Operations Preview" ,
2307- " Customer view"
23082306 ],
23092307 "templating" : {
23102308 "list" : [
Original file line number Diff line number Diff line change 35063506 ],
35073507 "schemaVersion" : 39 ,
35083508 "tags" : [
3509- " Operations Preview" ,
3510- " Customer view"
35113509 ],
35123510 "templating" : {
35133511 "list" : [
Original file line number Diff line number Diff line change 26772677 "refresh" : " 5s" ,
26782678 "schemaVersion" : 39 ,
26792679 "tags" : [
2680- " Operations Preview"
26812680 ],
26822681 "templating" : {
26832682 "list" : [
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ provider "google" {
3232
3333# Data source to fetch Redis Cloud database information
3434data "rediscloud_database" "redis_db" {
35+ count = var. existing_subnet_id == null ? 1 : 0
3536 subscription_id = var. subscription_id
3637 name = var. db_name
3738}
@@ -46,7 +47,7 @@ locals {
4647 # Extract FQDN from Redis Cloud database private_endpoint
4748 # Format: redis-18738.internal.c41372.us-central1-mz.gcp.cloud.rlrcp.com:18738
4849 # Extract: internal.c41372.us-central1-mz.gcp.cloud.rlrcp.com
49- redis_db_primary_fqdn = regex (" ^[^.]+\\ .(.+):\\ d+$" , data. rediscloud_database . redis_db . private_endpoint )[0 ]
50+ redis_db_primary_fqdn = var . redis_fqdn != null ? var . redis_fqdn : regex (" ^[^.]+\\ .(.+):\\ d+$" , data. rediscloud_database . redis_db [ 0 ] . private_endpoint )[0 ]
5051}
5152
5253# Conditionally create VPC only if not using existing one
@@ -120,8 +121,9 @@ resource "google_compute_firewall" "redispeer_allow_egress" {
120121}
121122
122123
124+ # VPC Peering for regular (non-Active-Active) subscriptions
123125resource "rediscloud_subscription_peering" "redispeer-sub-vpc-peering" {
124- count = var. existing_vpc_id == null ? 1 : 0
126+ count = var. existing_vpc_id == null ? 1 : 0
125127 subscription_id = var. subscription_id
126128 provider_name = " GCP"
127129 gcp_project_id = var. gcp_project
Original file line number Diff line number Diff line change @@ -98,4 +98,17 @@ variable "grafana_password" {
9898 description = " The Grafana admin password"
9999 default = " admin"
100100 sensitive = true
101+ }
102+
103+ variable "subscription_name" {
104+ type = string
105+ description = " The name of the Redis Cloud subscription"
106+ default = " "
107+
108+ }
109+
110+ variable "redis_fqdn" {
111+ type = string
112+ description = " The FQDN of the Redis Cloud database"
113+ default = null
101114}
You can’t perform that action at this time.
0 commit comments