Skip to content

Commit ea5cfea

Browse files
authored
Add port, remote backup & CIDRs support (#371)
* Add port, remote backup & CIDRs support Add support for: * Specifying the port number on a normal or active/active database * Configuring backups for normal or active/active databases * Specifying multiple CIDR ranges when peering a normal or active/active database * Run all acceptance tests in parallel * Stream `go test` logs Go will only stream test logs if it is testing a single module at a time, otherwise it will buffer the logs to the end and then display them. This causes issues for CI as it means there's no idea what is happening at the moment and the logs will be missing if the run is cancelled. See golang/go#27826. * Run all acceptance tests in parallel CI is taking far too long and needs to be sped up.
1 parent 87011a7 commit ea5cfea

24 files changed

+650
-109
lines changed

GNUmakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ PROVIDER_VERSION = 99.99.99
99
PLUGINS_PATH = ~/.terraform.d/plugins
1010
PLUGINS_PROVIDER_PATH=$(PROVIDER_HOSTNAME)/$(PROVIDER_NAMESPACE)/$(PROVIDER_TYPE)/$(PROVIDER_VERSION)/$(PROVIDER_TARGET)
1111

12-
# Use a parallelism of 3 by default for tests, overriding whatever GOMAXPROCS is set to.
13-
TEST_PARALLELISM?=3
12+
# Use a parallelism of 2 by default for tests, overriding whatever GOMAXPROCS is set to.
13+
TEST_PARALLELISM?=2
1414
TESTARGS?=-short
1515

1616
BIN=$(CURDIR)/bin
@@ -30,20 +30,21 @@ clean:
3030
@echo "Deleting local provider binary"
3131
rm -rf $(BIN)
3232

33+
# `-p=1` added to avoid testing packages in parallel which causes `go test` to not stream logs as they are written
3334
testacc:
34-
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 360m -parallel=$(TEST_PARALLELISM)
35+
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 360m -p=1 -parallel=$(TEST_PARALLELISM)
3536

3637
install_local: build
3738
@echo "Installing local provider binary to plugins mirror path $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)"
3839
@mkdir -p $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)
39-
@cp ./$(BIN)/terraform-provider-rediscloud_v$(PROVIDER_VERSION) $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)
40+
@cp $(BIN)/terraform-provider-rediscloud_v$(PROVIDER_VERSION) $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)
4041

4142
sweep:
4243
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
4344
go test ./provider -v -sweep=ALL $(SWEEPARGS) -timeout 30m
4445

45-
tfproviderlintx: $(BIN)/tfproviderlint
46+
tfproviderlintx: $(BIN)/tfproviderlintx
4647
$(BIN)/tfproviderlintx $(TFPROVIDERLINT_ARGS) ./...
4748

48-
tfproviderlint: $(BIN)/tfproviderlintx
49+
tfproviderlint: $(BIN)/tfproviderlint
4950
$(BIN)/tfproviderlint $(TFPROVIDERLINT_ARGS) ./...

docs/resources/rediscloud_active_active_subscription_database.md

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Creates a Database within a specified Active-Active Subscription in your Redis E
1313

1414
```hcl
1515
data "rediscloud_payment_method" "card" {
16-
card_type = "Visa"
16+
card_type = "Visa"
1717
}
1818
1919
resource "rediscloud_active_active_subscription" "subscription-resource" {
@@ -24,18 +24,18 @@ resource "rediscloud_active_active_subscription" "subscription-resource" {
2424
creation_plan {
2525
memory_limit_in_gb = 1
2626
quantity = 1
27-
region {
28-
region = "us-east-1"
29-
networking_deployment_cidr = "192.168.0.0/24"
30-
write_operations_per_second = 1000
31-
read_operations_per_second = 1000
32-
}
33-
region {
34-
region = "us-east-2"
35-
networking_deployment_cidr = "10.0.1.0/24"
36-
write_operations_per_second = 1000
37-
read_operations_per_second = 2000
38-
}
27+
region {
28+
region = "us-east-1"
29+
networking_deployment_cidr = "192.168.0.0/24"
30+
write_operations_per_second = 1000
31+
read_operations_per_second = 1000
32+
}
33+
region {
34+
region = "us-east-2"
35+
networking_deployment_cidr = "10.0.1.0/24"
36+
write_operations_per_second = 1000
37+
read_operations_per_second = 2000
38+
}
3939
}
4040
}
4141
@@ -47,23 +47,23 @@ resource "rediscloud_active_active_subscription_database" "database-resource" {
4747
global_password = "some-random-pass-2"
4848
global_source_ips = ["192.168.0.0/16"]
4949
global_alert {
50-
name = "dataset-size"
51-
value = 40
50+
name = "dataset-size"
51+
value = 40
5252
}
5353
5454
override_region {
55-
name = "us-east-2"
56-
override_global_source_ips = ["192.10.0.0/16"]
55+
name = "us-east-2"
56+
override_global_source_ips = ["192.10.0.0/16"]
5757
}
5858
5959
override_region {
60-
name = "us-east-1"
61-
override_global_data_persistence = "none"
62-
override_global_password = "region-specific-password"
63-
override_global_alert {
64-
name = "dataset-size"
65-
value = 60
66-
}
60+
name = "us-east-1"
61+
override_global_data_persistence = "none"
62+
override_global_password = "region-specific-password"
63+
override_global_alert {
64+
name = "dataset-size"
65+
value = 60
66+
}
6767
}
6868
}
6969
@@ -89,9 +89,10 @@ The following arguments are supported:
8989
* `client_ssl_certificate` - (Optional) SSL certificate to authenticate user connections.
9090
* `data_eviction` - (Optional) The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'. Default: 'volatile-lru')
9191
* `global_data_persistence` - (Optional) Global rate of database data persistence (in persistent storage) of regions that dont override global settings. Default: 'none'
92-
* `global_password` - (Optional) Password to access the database of regions that dont override global settings. If left empty, the password will be generated automatically
93-
* `global_alert` - (Optional) A block defining Redis database alert of regions that dont override global settings, documented below, can be specified multiple times
94-
* `global_source_ips` - (Optional) List of source IP addresses or subnet masks of regions that dont override global settings. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24'])
92+
* `global_password` - (Optional) Password to access the database of regions that don't override global settings. If left empty, the password will be generated automatically
93+
* `global_alert` - (Optional) A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times
94+
* `global_source_ips` - (Optional) List of source IP addresses or subnet masks of regions that don't override global settings. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24'])
95+
* `port` - (Optional) TCP port on which the database is available - must be between 10000 and 19999.
9596
* `override_region` - (Optional) Override region specific configuration, documented below
9697

9798

@@ -102,12 +103,20 @@ The `override_region` block supports:
102103
* `override_global_password` - (Optional) If specified, this regional instance of an Active-Active database password will be used to access the database
103104
* `override_global_source_ips` - (Optional) List of regional instance of an Active-Active database source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24'] )
104105
* `override_global_data_persistence` - (Optional) Regional instance of an Active-Active database data persistence rate (in persistent storage)
106+
* `remote_backup` - (Optional) Specifies the backup options for the database in this region, documented below
105107

106108
The `override_global_alert` block supports:
107109

108110
* `name` - (Required) Alert name
109111
* `value` - (Required) Alert value
110112

113+
The `remote_backup` block supports:
114+
115+
* `interval` (Required) - Defines the frequency of the automatic backup
116+
* `time_utc` (Optional) - Defines the hour automatic backups are made - only applicable when interval is `every-12-hours` or `every-24-hours`
117+
* `storage_type` (Required) - Defines the provider of the storage location
118+
* `storage_path` (Required) - Defines a URI representing the backup storage location
119+
111120
### Timeouts
112121

113122
The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:
@@ -129,5 +138,5 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l
129138
$ terraform import rediscloud_active_active_subscription_database.database-resource 123456/12345678
130139
```
131140

132-
Note: Due to constraints in the Redis Cloud API, the import process will not import global attributes or override region attributes. If you wish to use these attributes in your Terraform configuraton, you will need to manually add them to your Terraform configuration and run `terraform apply` to update the database.
141+
Note: Due to constraints in the Redis Cloud API, the import process will not import global attributes or override region attributes. If you wish to use these attributes in your Terraform configuration, you will need to manually add them to your Terraform configuration and run `terraform apply` to update the database.
133142

docs/resources/rediscloud_active_active_subscription_peering.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ The following arguments are supported:
7777
* `source_region` - (Required) Name of the region to create the VPC peering from
7878
* `destination_region` - (Required) Name of the region to create the VPC peering to
7979
* `vpc_id` - (Required) Identifier of the VPC to be peered
80-
* `vpc_cidr` - (Required) CIDR range of the VPC to be peered
80+
* `vpc_cidr` - (Optional) CIDR range of the VPC to be peered. Either this or `vpc_cidrs` must be specified
81+
* `vpc_cidrs` - (Optional) CIDR ranges of the VPC to be peered. Either this or `vpc_cidr` must be specified
8182

8283
**GCP ONLY:**
8384
* `gcp_project_id` - (Required) GCP project ID that the VPC to be peered lives in

docs/resources/rediscloud_subscription_database.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following arguments are supported:
100100
* `throughput_measurement_by` - (Required) Throughput measurement method, (either ‘number-of-shards’ or ‘operations-per-second’)
101101
* `throughput_measurement_value` - (Required) Throughput value (as applies to selected measurement method)
102102
* `memory_limit_in_gb` - (Required) Maximum memory usage for this specific database
103-
* `protocol` - (Optional) The protocol that will be used to access the database, (either ‘redis’ or 'memcached’) Default: ‘redis’
103+
* `protocol` - (Optional) The protocol that will be used to access the database, (either ‘redis’ or memcached’) Default: ‘redis’
104104
* `support_oss_cluster_api` - (Optional) Support Redis open-source (OSS) Cluster API. Default: ‘false’
105105
* `external_endpoint_for_oss_cluster_api` - (Optional) Should use the external endpoint for open-source (OSS) Cluster API.
106106
Can only be enabled if OSS Cluster API support is enabled. Default: 'false'
@@ -122,6 +122,8 @@ The following arguments are supported:
122122
[the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the
123123
hashing policy. This cannot be set when `support_oss_cluster_api` is set to true.
124124
* `enable_tls` - (Optional) Use TLS for authentication. Default: ‘false’
125+
* `port` - (Optional) TCP port on which the database is available - must be between 10000 and 19999.
126+
* `remote_backup` (Optional) Specifies the backup options for the database, documented below
125127

126128
The `alert` block supports:
127129

@@ -145,6 +147,13 @@ The `modules` list supports:
145147
]
146148
```
147149

150+
The `remote_backup` block supports:
151+
152+
* `interval` (Required) - Defines the frequency of the automatic backup
153+
* `time_utc` (Optional) - Defines the hour automatic backups are made - only applicable when interval is `every-12-hours` or `every-24-hours`
154+
* `storage_type` (Required) - Defines the provider of the storage location
155+
* `storage_path` (Required) - Defines a URI representing the backup storage location
156+
148157
### Timeouts
149158

150159
The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:

docs/resources/rediscloud_subscription_peering.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ The following arguments are supported:
7575
* `aws_account_id` - (Required AWS) AWS account ID that the VPC to be peered lives in
7676
* `region` - (Required AWS) AWS Region that the VPC to be peered lives in
7777
* `vpc_id` - (Required AWS) Identifier of the VPC to be peered
78-
* `vpc_cidr` - (Required AWS) CIDR range of the VPC to be peered
78+
* `vpc_cidr` - (Optional) CIDR range of the VPC to be peered. Either this or `vpc_cidrs` must be specified
79+
* `vpc_cidrs` - (Optional) CIDR ranges of the VPC to be peered. Either this or `vpc_cidr` must be specified
7980

8081
**GCP ONLY:**
8182
* `gcp_project_id` - (Required GCP) GCP project ID that the VPC to be peered lives in

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/RedisLabs/terraform-provider-rediscloud
33
go 1.17
44

55
require (
6-
github.com/RedisLabs/rediscloud-go-api v0.2.0
6+
github.com/RedisLabs/rediscloud-go-api v0.3.0
77
github.com/bflad/tfproviderlint v0.28.1
88
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
99
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugX
386386
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
387387
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ=
388388
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
389-
github.com/RedisLabs/rediscloud-go-api v0.2.0 h1:tkS2AIMLLlI3yeW22dT5DP2BvaYO+K7xvytJvFo8z04=
390-
github.com/RedisLabs/rediscloud-go-api v0.2.0/go.mod h1:EJXWMnC2ZSM5m7k2TCnmxenYv57o6yGlZXo0ZVnMgIs=
389+
github.com/RedisLabs/rediscloud-go-api v0.3.0 h1:IiQZ8uFoyZVWIRytFMykiD0ohRijmQcAI3YeAT1kEgg=
390+
github.com/RedisLabs/rediscloud-go-api v0.3.0/go.mod h1:EJXWMnC2ZSM5m7k2TCnmxenYv57o6yGlZXo0ZVnMgIs=
391391
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
392392
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
393393
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=

provider/datasource_rediscloud_subscription_peerings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestAccDataSourceRedisCloudSubscriptionPeerings_basic(t *testing.T) {
3333
)
3434
dataSourceName := "data.rediscloud_subscription_peerings.example"
3535

36-
resource.Test(t, resource.TestCase{
36+
resource.ParallelTest(t, resource.TestCase{
3737
PreCheck: func() { testAccPreCheck(t); testAccAwsPeeringPreCheck(t); testAccAwsPreExistingCloudAccountPreCheck(t) },
3838
ProviderFactories: providerFactories,
3939
CheckDestroy: testAccCheckSubscriptionDestroy,

provider/datasource_rediscloud_subscription_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccDataSourceRedisCloudSubscription_basic(t *testing.T) {
1717
dataSourceName := "data.rediscloud_subscription.example"
1818
testCloudAccountName := os.Getenv("AWS_TEST_CLOUD_ACCOUNT_NAME")
1919

20-
resource.Test(t, resource.TestCase{
20+
resource.ParallelTest(t, resource.TestCase{
2121
PreCheck: func() { testAccPreCheck(t); testAccAwsPreExistingCloudAccountPreCheck(t) },
2222
ProviderFactories: providerFactories,
2323
CheckDestroy: testAccCheckSubscriptionDestroy,

provider/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func New(version string) func() *schema.Provider {
6969
}
7070

7171
// Lock that must be acquired when modifying something related to a subscription as only one _thing_ can modify a subscription and all sub-resources at any time
72-
var subscriptionMutex = NewPerIdLock()
72+
var subscriptionMutex = newPerIdLock()
7373

7474
type apiClient struct {
7575
client *rediscloud_api.Client

provider/resource_rediscloud_active_active_subscription_database.go

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package provider
33
import (
44
"context"
55
"log"
6+
"strings"
67
"time"
78

89
"github.com/RedisLabs/rediscloud-go-api/redis"
@@ -45,6 +46,23 @@ func resourceRedisCloudActiveActiveSubscriptionDatabase() *schema.Resource {
4546
Delete: schema.DefaultTimeout(10 * time.Minute),
4647
},
4748

49+
CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
50+
var keys []string
51+
for _, key := range diff.GetChangedKeysPrefix("override_region") {
52+
if strings.HasSuffix(key, "time_utc") {
53+
keys = append(keys, strings.TrimSuffix(key, ".0.time_utc"))
54+
}
55+
}
56+
57+
for _, key := range keys {
58+
if err := remoteBackupIntervalSetCorrectly(key)(ctx, diff, i); err != nil {
59+
return err
60+
}
61+
}
62+
63+
return nil
64+
},
65+
4866
Schema: map[string]*schema.Schema{
4967
"subscription_id": {
5068
Description: "Identifier of the subscription",
@@ -191,6 +209,39 @@ func resourceRedisCloudActiveActiveSubscriptionDatabase() *schema.Resource {
191209
Type: schema.TypeString,
192210
Optional: true,
193211
},
212+
"remote_backup": {
213+
Description: "An object that specifies the backup options for the database in this region",
214+
Type: schema.TypeList,
215+
Optional: true,
216+
MaxItems: 1,
217+
Elem: &schema.Resource{
218+
Schema: map[string]*schema.Schema{
219+
"interval": {
220+
Description: "Defines the frequency of the automatic backup",
221+
Type: schema.TypeString,
222+
Required: true,
223+
ValidateDiagFunc: validateDiagFunc(validation.StringInSlice(databases.BackupIntervals(), false)),
224+
},
225+
"time_utc": {
226+
Description: "Defines the hour automatic backups are made - only applicable when interval is `every-12-hours` or `every-24-hours`",
227+
Type: schema.TypeString,
228+
Optional: true,
229+
ValidateDiagFunc: isTime(),
230+
},
231+
"storage_type": {
232+
Description: "Defines the provider of the storage location",
233+
Type: schema.TypeString,
234+
Required: true,
235+
ValidateDiagFunc: validateDiagFunc(validation.StringInSlice(databases.BackupStorageTypes(), false)),
236+
},
237+
"storage_path": {
238+
Description: "Defines a URI representing the backup storage location",
239+
Type: schema.TypeString,
240+
Required: true,
241+
},
242+
},
243+
},
244+
},
194245
},
195246
},
196247
},
@@ -210,6 +261,13 @@ func resourceRedisCloudActiveActiveSubscriptionDatabase() *schema.Resource {
210261
Type: schema.TypeString,
211262
},
212263
},
264+
"port": {
265+
Description: "TCP port on which the database is available",
266+
Type: schema.TypeInt,
267+
ValidateDiagFunc: validateDiagFunc(validation.IntBetween(10000, 19999)),
268+
Optional: true,
269+
ForceNew: true,
270+
},
213271
},
214272
}
215273
}
@@ -286,6 +344,10 @@ func resourceRedisCloudActiveActiveSubscriptionDatabaseCreate(ctx context.Contex
286344
createDatabase.GlobalPassword = redis.String(globalPassword)
287345
}
288346

347+
if v, ok := d.GetOk("port"); ok {
348+
createDatabase.PortNumber = redis.Int(v.(int))
349+
}
350+
289351
// Confirm Subscription Active status before creating database
290352
err = waitForSubscriptionToBeActive(ctx, subId, api)
291353
if err != nil {
@@ -416,6 +478,8 @@ func resourceRedisCloudActiveActiveSubscriptionDatabaseRead(ctx context.Context,
416478
regionDbConfig["override_global_alert"] = flattenAlerts(regionDb.Alerts)
417479
}
418480

481+
regionDbConfig["remote_backup"] = flattenBackupPlan(regionDb.Backup, getStateRemoteBackup(d, redis.StringValue(regionDb.Region)), "")
482+
419483
regionDbConfigs = append(regionDbConfigs, regionDbConfig)
420484
}
421485

@@ -500,8 +564,8 @@ func resourceRedisCloudActiveActiveSubscriptionDatabaseUpdate(ctx context.Contex
500564

501565
// Make a list of region-specific source IPs for use in the regions list below
502566
var overrideSourceIps []*string
503-
for _, source_ip := range dbRegion["override_global_source_ips"].(*schema.Set).List() {
504-
overrideSourceIps = append(overrideSourceIps, redis.String(source_ip.(string)))
567+
for _, sourceIp := range dbRegion["override_global_source_ips"].(*schema.Set).List() {
568+
overrideSourceIps = append(overrideSourceIps, redis.String(sourceIp.(string)))
505569
}
506570

507571
regionProps := &databases.LocalRegionProperties{
@@ -533,6 +597,9 @@ func resourceRedisCloudActiveActiveSubscriptionDatabaseUpdate(ctx context.Contex
533597
regionProps.Password = redis.String(d.Get("global_password").(string))
534598
}
535599
}
600+
601+
regionProps.RemoteBackup = buildBackupPlan(dbRegion["remote_backup"], nil)
602+
536603
regions = append(regions, regionProps)
537604
}
538605

@@ -608,6 +675,16 @@ func getStateOverrideRegion(d *schema.ResourceData, regionName string) map[strin
608675
return nil
609676
}
610677

678+
func getStateRemoteBackup(d *schema.ResourceData, regionName string) []interface{} {
679+
for _, region := range d.Get("override_region").(*schema.Set).List() {
680+
dbRegion := region.(map[string]interface{})
681+
if dbRegion["name"].(string) == regionName {
682+
return dbRegion["remote_backup"].([]interface{})
683+
}
684+
}
685+
return nil
686+
}
687+
611688
func getStateAlertsFromDbRegion(dbRegion map[string]interface{}) []*databases.UpdateAlert {
612689
// Make a list of region-specific alert configurations for use in the regions list below
613690
if dbRegion == nil {

0 commit comments

Comments
 (0)