Skip to content

Commit 41092b3

Browse files
authored
Feature/resp version aa (#449)
* Version update * Added global_resp_version * Added loca_resp_version to regions * Added docs
1 parent 3df50ae commit 41092b3

11 files changed

+237
-257
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v3.5.3
38+
uses: actions/checkout@v4.1.1
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
-
2222
name: Checkout
23-
uses: actions/checkout@v3.5.3
23+
uses: actions/checkout@v4.1.1
2424
-
2525
name: Unshallow
2626
run: git fetch --prune --unshallow
@@ -38,7 +38,7 @@ jobs:
3838
PASSPHRASE: ${{ secrets.PASSPHRASE }}
3939
-
4040
name: Run GoReleaser
41-
uses: goreleaser/goreleaser-action@v4.3.0
41+
uses: goreleaser/goreleaser-action@v5.0.0
4242
with:
4343
version: latest
4444
args: release --clean

.github/workflows/terraform_provider.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: go build
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v3.5.3
24+
- uses: actions/checkout@v4.1.1
2525
- uses: actions/[email protected]
2626
continue-on-error: true
2727
id: cache-terraform-plugin-dir
@@ -45,7 +45,7 @@ jobs:
4545
needs: [go_build]
4646
runs-on: ubuntu-latest
4747
steps:
48-
- uses: actions/checkout@v3.5.3
48+
- uses: actions/checkout@v4.1.1
4949
- uses: actions/[email protected]
5050
continue-on-error: true
5151
id: cache-terraform-providers-schema
@@ -60,7 +60,7 @@ jobs:
6060
path: terraform-plugin-dir
6161
key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }}
6262
- if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure'
63-
uses: hashicorp/setup-terraform@v2.0.3
63+
uses: hashicorp/setup-terraform@v3.0.0
6464
with:
6565
terraform_version: ${{ env.TERRAFORM_VERSION }}
6666
terraform_wrapper: false
@@ -91,7 +91,7 @@ jobs:
9191
needs: [go_build]
9292
runs-on: ubuntu-latest
9393
steps:
94-
- uses: actions/checkout@v3.5.3
94+
- uses: actions/checkout@v4.1.1
9595
- uses: actions/setup-go@v4
9696
with:
9797
go-version-file: go.mod
@@ -140,7 +140,7 @@ jobs:
140140
needs: [go_build]
141141
runs-on: ubuntu-latest
142142
steps:
143-
- uses: actions/checkout@v3.5.3
143+
- uses: actions/checkout@v4.1.1
144144
- uses: actions/setup-go@v4
145145
with:
146146
go-version-file: go.mod

docs/resources/rediscloud_active_active_subscription_database.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ resource "rediscloud_active_active_subscription_database" "database-resource" {
4646
global_data_persistence = "aof-every-1-second"
4747
global_password = "some-random-pass-2"
4848
global_source_ips = ["192.168.0.0/16"]
49+
global_resp_version = "resp2"
4950
global_alert {
5051
name = "dataset-size"
5152
value = 40
@@ -92,6 +93,7 @@ The following arguments are supported:
9293
* `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
9394
* `global_alert` - (Optional) A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times. (either: 'dataset-size', 'datasets-size', 'throughput-higher-than', 'throughput-lower-than', 'latency', 'syncsource-error', 'syncsource-lag' or 'connections-limit')
9495
* `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'])
96+
* `global_resp_version` - (Optional) Either 'resp2' or 'resp3'. Resp version for Crdb databases within the AA database. Must be compatible with Redis version.
9597
* `port` - (Optional) TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.**
9698
* `override_region` - (Optional) Override region specific configuration, documented below
9799

docs/resources/rediscloud_active_active_subscription_regions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ resource "rediscloud_active_active_subscription_regions" "regions-resource" {
2929
}
3030
region {
3131
region = "us-east-2"
32-
networking_deployment_cidr = "10.0.1.0/24"
32+
networking_deployment_cidr = "10.0.1.0/24"
33+
local_resp_version = "resp2"
3334
database {
3435
database_id = rediscloud_active_active_subscription_database.database-resource.db_id
3536
database_name = rediscloud_active_active_subscription_database.database-resource.name
@@ -55,6 +56,7 @@ The `region` block supports:
5556
* `vpc_id` - (Computed) Identifier of the VPC to be peered, set by the API
5657
* `networking_deployment_cidr` - (Required) Deployment CIDR mask. The total number of bits must be 24 (x.x.x.x/24)
5758
* `recreate_region` - (Optional) Protection flag, needs to be set if a region has to be re-created. A region will need to be re-created in the case of a change on the `networking_deployment_cidr` field. During re-create, the region will be deleted (so the `delete_regions` flag also needs to be set) and then created again. Default: 'false'
59+
* `local_resp_version` - (Optional) Either 'resp2' or 'resp3'. Resp version for Crdb databases within this region. Must be compatible with Redis version.
5860
* `database` - (Required) A block defining the write and read operations in the region, per database, documented below
5961

6062
The `database` block supports:

go.mod

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,64 @@ module github.com/RedisLabs/terraform-provider-rediscloud
33
go 1.19
44

55
require (
6-
github.com/RedisLabs/rediscloud-go-api v0.7.0
6+
github.com/RedisLabs/rediscloud-go-api v0.8.0
77
github.com/bflad/tfproviderlint v0.29.0
88
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
9-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
9+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0
1010
github.com/stretchr/testify v1.8.4
1111
)
1212

1313
require (
14-
github.com/agext/levenshtein v1.2.3 // indirect
14+
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
15+
github.com/agext/levenshtein v1.2.2 // indirect
1516
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
16-
github.com/avast/retry-go/v4 v4.3.4 // indirect
17+
github.com/avast/retry-go/v4 v4.5.1 // indirect
1718
github.com/bflad/gopaniccheck v0.1.0 // indirect
19+
github.com/cloudflare/circl v1.3.3 // indirect
1820
github.com/davecgh/go-spew v1.1.1 // indirect
1921
github.com/fatih/color v1.13.0 // indirect
20-
github.com/golang/protobuf v1.5.2 // indirect
22+
github.com/golang/protobuf v1.5.3 // indirect
2123
github.com/google/go-cmp v0.5.9 // indirect
22-
github.com/hashicorp/errwrap v1.1.0 // indirect
24+
github.com/hashicorp/errwrap v1.0.0 // indirect
2325
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
2426
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
25-
github.com/hashicorp/go-hclog v1.4.0 // indirect
27+
github.com/hashicorp/go-hclog v1.5.0 // indirect
2628
github.com/hashicorp/go-multierror v1.1.1 // indirect
27-
github.com/hashicorp/go-plugin v1.4.8 // indirect
29+
github.com/hashicorp/go-plugin v1.4.10 // indirect
2830
github.com/hashicorp/go-uuid v1.0.3 // indirect
2931
github.com/hashicorp/go-version v1.6.0 // indirect
30-
github.com/hashicorp/hc-install v0.5.0 // indirect
31-
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
32+
github.com/hashicorp/hc-install v0.5.2 // indirect
33+
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
3234
github.com/hashicorp/logutils v1.0.0 // indirect
3335
github.com/hashicorp/terraform-exec v0.18.1 // indirect
34-
github.com/hashicorp/terraform-json v0.16.0 // indirect
35-
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
36-
github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect
37-
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
38-
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
39-
github.com/hashicorp/yamux v0.1.1 // indirect
40-
github.com/mattn/go-colorable v0.1.13 // indirect
41-
github.com/mattn/go-isatty v0.0.16 // indirect
36+
github.com/hashicorp/terraform-json v0.17.1 // indirect
37+
github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect
38+
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
39+
github.com/hashicorp/terraform-registry-address v0.2.1 // indirect
40+
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
41+
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
42+
github.com/mattn/go-colorable v0.1.12 // indirect
43+
github.com/mattn/go-isatty v0.0.14 // indirect
4244
github.com/mitchellh/copystructure v1.2.0 // indirect
4345
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
44-
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
46+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
4547
github.com/mitchellh/mapstructure v1.5.0 // indirect
4648
github.com/mitchellh/reflectwalk v1.0.2 // indirect
47-
github.com/oklog/run v1.1.0 // indirect
49+
github.com/oklog/run v1.0.0 // indirect
4850
github.com/pmezard/go-difflib v1.0.0 // indirect
4951
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
50-
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
51-
github.com/vmihailenco/tagparser v0.1.2 // indirect
52-
github.com/zclconf/go-cty v1.13.1 // indirect
53-
golang.org/x/crypto v0.8.0 // indirect
54-
golang.org/x/mod v0.10.0 // indirect
55-
golang.org/x/net v0.10.0 // indirect
56-
golang.org/x/sys v0.8.0 // indirect
57-
golang.org/x/text v0.9.0 // indirect
58-
golang.org/x/tools v0.9.1 // indirect
52+
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
53+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
54+
github.com/zclconf/go-cty v1.13.2 // indirect
55+
golang.org/x/crypto v0.15.0 // indirect
56+
golang.org/x/mod v0.14.0 // indirect
57+
golang.org/x/net v0.18.0 // indirect
58+
golang.org/x/sys v0.14.0 // indirect
59+
golang.org/x/text v0.14.0 // indirect
60+
golang.org/x/tools v0.15.0 // indirect
5961
google.golang.org/appengine v1.6.7 // indirect
60-
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
61-
google.golang.org/grpc v1.51.0 // indirect
62-
google.golang.org/protobuf v1.28.1 // indirect
62+
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
63+
google.golang.org/grpc v1.56.1 // indirect
64+
google.golang.org/protobuf v1.31.0 // indirect
6365
gopkg.in/yaml.v3 v3.0.1 // indirect
6466
)

0 commit comments

Comments
 (0)