Skip to content

Commit a4f9eaa

Browse files
Merge pull request #689 from RedisLabs/feat/disable-public-endpoints
Merging without essentials tests as there are issues with essentials on staging env
2 parents aa8ecc4 + f0b15cb commit a4f9eaa

36 files changed

+848
-70
lines changed

.github/workflows/terraform_provider_pr.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ jobs:
182182
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudPrivateLink_CRUDI"'
183183

184184

185+
go_test_block_public_endpoints:
186+
name: go test smoke public endpoints
187+
needs: [ go_build ]
188+
runs-on: ubuntu-latest
189+
steps:
190+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
191+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
192+
with:
193+
go-version-file: go.mod
194+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(RedisCloudProDatabaseBlockPublicEndpoints|ActiveActiveSubscriptionDatabaseBlockPublicEndpoints)"'
195+
185196
go_unit_test:
186197
name: go unit test
187198
needs: [go_build]

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to this project will be documented in this file.
44
See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
55

6+
# 2.6.0 (17th October 2025)
7+
8+
## Added:
9+
- Support for disabling public endpoints on databases. When public endpoints are disabled, database connections are restricted to private networks only (via VPC peering, PrivateLink, or Private Service Connect).
10+
- `source_ips` attribute added to `rediscloud_database` data source.
11+
- `global_source_ips` attribute added to `rediscloud_active_active_subscription_database` data source.
12+
13+
## Fixed:
14+
- The default value for `enable_default_user` on each region for active-active subscriptions made the global default effectively redundant. The default has been removed meaning that the global default should work correctly now.
615

716
# 2.5.0 (13th October 2025)
817

docs/data-sources/rediscloud_active_active_subscription_database.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ data "rediscloud_active_active_subscription_database" "example" {
4949
* `external_endpoint_for_oss_cluster_api` - Use the external endpoint for open-source (OSS) Cluster API.
5050
* `enable_tls` - Enable TLS for database.
5151
* `tls_certificate` - TLS certificate used for authentication.
52+
* `global_source_ips` - Set of CIDR addresses to allow access to the database.
5253
* `data_eviction` - The data items eviction policy.
5354
* `global_modules` - A list of modules to be enabled on all deployments of this database.
5455
* `public_endpoint` - Public endpoint to access the database.

docs/data-sources/rediscloud_database.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ data "rediscloud_database" "example" {
6363
* `private_endpoint` - Private endpoint to access the database
6464
* `enable_tls` - Enable TLS for database, default is `false`
6565
* `enable_default_user` - When `true` enables connecting to the database with the default user. Default `true`.
66+
* `source_ips` - Set of CIDR addresses to allow access to the database.
6667
* `latest_backup_status` - A latest_backup_status object, documented below.
6768
* `latest_import_status` - A latest_import_status object, documented below.
6869
* `tags` - A string/string map of all Tags associated with this database.

docs/resources/rediscloud_active_active_subscription.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The following arguments are supported:
5959
* `name` - (Required) A meaningful name to identify the subscription
6060
* `payment_method` - (Optional) The payment method for the requested subscription, (either `credit-card` or `marketplace`). Must not be set for direct contracts. If `credit-card` is specified, `payment_method_id` must be defined. Default: 'credit-card'. **(Changes to) this attribute are ignored after creation.**
6161
* `payment_method_id` - (Optional) A valid payment method pre-defined in the current account. This value is __Optional__ for AWS/GCP Marketplace accounts, but __Required__ for all other account types
62+
* `public_endpoint_access` - (Optional) Allow public access to databases within this subscription. When set to `false`, database access is restricted to private IP ranges only. Default: `true`.
6263
* `cloud_provider` - (Optional) The cloud provider to use with the subscription, (either `AWS` or `GCP`). Default: ‘AWS’. **Modifying this attribute will force creation of a new resource.**
6364
* `redis_version` - (Optional) The Redis version of the databases in the subscription. If omitted, the Redis version will be the default. **Deprecated: This attribute is deprecated on the subscription level. Please specify `redis_version` on databases directly instead.**
6465
* `creation_plan` - (Required) A creation plan object, documented below. Ignored after creation.

docs/resources/rediscloud_active_active_subscription_database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The following arguments are supported:
102102
* `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
103103
* `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')
104104
* `global_modules` - (Optional) A list of modules to be enabled on all deployments of this database. Supported modules: `RedisJSON`, `RediSearch`. Ignored after database creation.
105-
* `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'])
105+
* `global_source_ips` - (Optional) List of source IP addresses or subnet masks that are allowed to connect to the database across all regions that don't override this setting (example: ['192.168.10.0/32', '192.168.12.0/24']). When not specified, the default behavior depends on the subscription's `public_endpoint_access` setting: if `false`, defaults to RFC1918 private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10); if `true`, defaults to 0.0.0.0/0 (unrestricted public access)
106106
* `global_enable_default_user` - (Optional) When 'true', enables connecting to the database with the 'default' user across all regions. Default: 'true'
107107
* `global_resp_version` - (Optional) Either 'resp2' or 'resp3'. Resp version for Crdb databases within the AA database. Must be compatible with Redis version.
108108
* `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.**
@@ -114,7 +114,7 @@ The `override_region` block supports:
114114
* `name` - (Required) Region name.
115115
* `override_global_alert` - (Optional) A block defining Redis regional instance of an Active-Active database alert, documented below, can be specified multiple times
116116
* `override_global_password` - (Optional) If specified, this regional instance of an Active-Active database password will be used to access the database
117-
* `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'] )
117+
* `override_global_source_ips` - (Optional) List of source IP addresses or subnet masks that are allowed to connect to the database in this specific region, overriding the global `global_source_ips` setting (example: ['192.168.10.0/32', '192.168.12.0/24']). If not specified, the global `global_source_ips` setting applies to this region
118118
* `override_global_data_persistence` - (Optional) Regional instance of an Active-Active database data persistence rate (in persistent storage)
119119
* `remote_backup` - (Optional) Specifies the backup options for the database in this region, documented below
120120
* `enable_default_user` - (Optional) Whether the default user should be enabled or not. True by default.

docs/resources/rediscloud_subscription.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The following arguments are supported:
7272
* `name` - (Required) A meaningful name to identify the subscription
7373
* `payment_method` (Optional) The payment method for the requested subscription, (either `credit-card` or `marketplace`). Must not be set for direct contracts. If `credit-card` is specified, `payment_method_id` must be defined. Default: 'credit-card'. **(Changes to) this attribute are ignored after creation.**
7474
* `payment_method_id` - (Optional) A valid payment method pre-defined in the current account. Only __Required__ when `payment_method` is `credit-card`.
75+
* `public_endpoint_access` - (Optional) Allow public access to databases within this subscription. When set to `false`, database access is restricted to private IP ranges only. Default: `true`.
7576
* `memory_storage` - (Optional) Memory storage preference: either ‘ram’ or a combination of ‘ram-and-flash’. Default: ‘ram’. **Modifying this attribute will force creation of a new resource.**
7677
* `redis_version` - (Optional) The Redis version of the databases in the subscription. If omitted, the Redis version will be the default. **Deprecated: This attribute is deprecated on the subscriptions level. Please specify `redis_version` on databases directly instead.**
7778
* `allowlist` - (Optional) An allowlist object, documented below

docs/resources/rediscloud_subscription_database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The following arguments are supported:
9696
* `replication` - (Optional) Databases replication. Default: ‘true’
9797
* `average_item_size_in_bytes` - (Optional) Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes)
9898
of the items stored in the database. Default: 1000
99-
* `source_ips` - (Optional) List of 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’])
99+
* `source_ips` - (Optional) List of source IP addresses or subnet masks that are allowed to connect to the database (example: ['192.168.10.0/32', '192.168.12.0/24']). When not specified, the default behavior depends on the subscription's `public_endpoint_access` setting: if `false`, defaults to RFC1918 private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10); if `true`, defaults to 0.0.0.0/0 (unrestricted public access)
100100
* `hashing_policy` - (Optional) List of regular expression rules to shard the database by. See
101101
[the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the
102102
hashing policy. This cannot be set when `support_oss_cluster_api` is set to true.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.0
55
toolchain go1.24.1
66

77
require (
8-
github.com/RedisLabs/rediscloud-go-api v0.37.0
8+
github.com/RedisLabs/rediscloud-go-api v0.38.0
99
github.com/bflad/tfproviderlint v0.31.0
1010
github.com/hashicorp/go-cty v1.5.0
1111
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
44
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
55
github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=
66
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
7-
github.com/RedisLabs/rediscloud-go-api v0.37.0 h1:qnu9mfGqOPZSMi17r3OwATzN72OkMkBPxjyWn619LBY=
8-
github.com/RedisLabs/rediscloud-go-api v0.37.0/go.mod h1:Hkh3i/EsHnyfgV0ijednbofz/EmZC3sFnSNNruF3G6I=
7+
github.com/RedisLabs/rediscloud-go-api v0.38.0 h1:lLOS0E8tQhUzuUfb/H+QWtDaZrC9xNnTvAPBygH4WS8=
8+
github.com/RedisLabs/rediscloud-go-api v0.38.0/go.mod h1:Hkh3i/EsHnyfgV0ijednbofz/EmZC3sFnSNNruF3G6I=
99
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
1010
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
1111
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=

0 commit comments

Comments
 (0)