Skip to content

Commit 8ba20a0

Browse files
Merge branch 'main' into NoamSternRedis-patch-2
2 parents 97d0733 + f1d92b2 commit 8ba20a0

19 files changed

+566
-440
lines changed

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@ 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

66

7-
# 2.4.0 (18th September 2025)
7+
# 2.4.1 (24rd September 2025)
8+
9+
### Added
10+
11+
- AWS PrivateLink support for Active Active subscriptions.
12+
- New resource: `rediscloud_active_active_private_link`
13+
- New data source: `rediscloud_active_active_private_link`
14+
- New data source: `rediscloud_active_active_private_link_endpoint_script`
15+
16+
### Changed:
17+
18+
- `rediscloud_active_active_subscription_regions` now supports the property `region_id`
19+
20+
# 2.4.0 (19th September 2025)
821

922
### Added
1023

1124
- AWS PrivateLink support for Pro Subscriptions.
1225
- New resource: `rediscloud_private_link` which allows users to manage peering between Redis Subscriptions and AWS resources.
13-
- New data source: `rediscloud_private_link` which allows users to fetch information about Redis Subscriptions.
14-
-
15-
26+
- New data source: `rediscloud_private_link`
27+
- New data source: `rediscloud_private_link_endpoint_script`
1628

1729
# 2.3.0 (19th August 2025)
1830

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: "rediscloud"
3+
page_title: "Redis Cloud: rediscloud_private_link"
4+
description: |-
5+
PrivateLink data source for Pro Subscription in the Redis Cloud Terraform provider.
6+
---
7+
8+
# Data Source: rediscloud_active_active_private_link
9+
The PrivateLink data source allows the user to retrieve information about an existing PrivateLink for an Active Active Subscription in the provider.
10+
11+
## Example Usage
12+
13+
```hcl
14+
data "rediscloud_active_active_private_link" "example" {
15+
subscription_id = "1234"
16+
region_id = 1
17+
}
18+
19+
output "rediscloud_private_link_principals" {
20+
value = data.rediscloud_active_active_private_link.example.principals
21+
}
22+
```
23+
24+
## Argument Reference
25+
26+
* `subscription_id` - (Required) The ID of the Active Active Subscription the PrivateLink is attached to.
27+
* `region_id` - (Required) The region ID within the Active Active subscription that the PrivateLink is attached to.
28+
29+
## Attribute reference
30+
31+
* `principals` - The principal(s) attached to the PrivateLink.
32+
* `resource_configuration_id` - ID of the resource configuration to attach to this PrivateLink
33+
* `resource_configuration_arn` - ARN of the resource configuration to attach to this PrivateLink
34+
* `share_arn` - Share ARN of this PrivateLink.
35+
* `connections` - List of connections associated with the PrivateLink.
36+
* `databases` - List of databases associated with the PrivateLink.
37+
38+
The `principals` object is a list, with these attributes:
39+
* `principal` - The principal attached to this PrivateLink.
40+
* `principal_type` - The principal type.
41+
* `principal_alias` - The friendly name to refer to the principal.
42+
43+
The `connections` object is a list, with these attributes:
44+
* `association_id` - Association ID of the PrivateLink connection.
45+
* `connection_id` - Connection ID of the PrivateLink connection
46+
* `connection_type` - The PrivateLink connection type.
47+
* `owner_id` - Owner ID of the connection.
48+
* `association_date` - Date the connection was associated.
49+
50+
The `databases` object is a list, with these attributes:
51+
* `database_id` - ID of the database.
52+
* `port` - The port which the database is available on.
53+
* `resource_link_endpoint` - The resource link endpoint for the database.

docs/data-sources/rediscloud_private_link.md

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -11,65 +11,12 @@ The PrivateLink data source allows the user to retrieve information about an exi
1111
## Example Usage
1212

1313
```hcl
14-
15-
locals {
16-
rediscloud_subscription_name = "..."
17-
rediscloud_cloud_account = "..."
18-
rediscloud_private_link_share_name = "..."
19-
}
20-
21-
data "rediscloud_payment_method" "card" {
22-
card_type = "Visa"
23-
}
24-
25-
data "rediscloud_cloud_account" "account" {
26-
exclude_internal_account = true
27-
provider_type = "AWS"
28-
name = local.rediscloud_cloud_account
29-
}
30-
31-
resource "rediscloud_subscription" "subscription" {
32-
name = local.rediscloud_subscription_name
33-
payment_method_id = data.rediscloud_payment_method.card.id
34-
35-
cloud_provider {
36-
provider = data.rediscloud_cloud_account.account.provider_type
37-
cloud_account_id = data.rediscloud_cloud_account.account.id
38-
region {
39-
region = "eu-west-1"
40-
networking_deployment_cidr = "10.0.0.0/24"
41-
preferred_availability_zones = ["eu-west-1a"]
42-
}
43-
}
44-
45-
creation_plan {
46-
dataset_size_in_gb = 15
47-
quantity = 1
48-
replication = true
49-
throughput_measurement_by = "operations-per-second"
50-
throughput_measurement_value = 20000
51-
}
14+
data "rediscloud_private_link" "example" {
15+
subscription_id = "1234"
5216
}
5317
54-
resource "rediscloud_private_link" "private_link" {
55-
subscription_id = rediscloud_subscription.subscription.id
56-
share_name = local.rediscloud_private_link_share_name
57-
58-
principal {
59-
principal = "123456789012"
60-
principal_type = "aws_account"
61-
principal_alias = "principal 1"
62-
}
63-
64-
principal {
65-
principal = "123456789013"
66-
principal_type = "aws_account"
67-
principal_alias = "principal 2"
68-
}
69-
}
70-
71-
data "rediscloud_private_link" "private_link" {
72-
subscription_id = rediscloud_private_link.private_link.subscription_id
18+
output "rediscloud_private_link_principals" {
19+
value = data.rediscloud_private_link.example.principals
7320
}
7421
```
7522

@@ -80,11 +27,12 @@ data "rediscloud_private_link" "private_link" {
8027
## Attribute reference
8128

8229
* `principals` - The principal(s) attached to the PrivateLink.
83-
* `resource_configuration_id`
84-
* `resource_configuration_arn`
85-
* `share_arn`
86-
* `connections`
87-
* `databases`
30+
* `resource_configuration_id` - ID of the resource configuration to attach to this PrivateLink
31+
* `resource_configuration_arn` - ARN of the resource configuration to attach to this PrivateLink
32+
* `share_arn` - Share ARN of this PrivateLink.
33+
* `connections` - List of connections associated with the PrivateLink.
34+
* `databases` - List of databases associated with the PrivateLink.
35+
8836

8937
The `principals` object is a list, with these attributes:
9038
* `principal` - The principal attached to this PrivateLink.

docs/resources/rediscloud_active_active_private_link.md

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,104 @@ description: |-
55
PrivateLink resource for Active Active Subscription in the Redis Cloud Terraform provider.
66
---
77

8-
# Resource: rediscloud_active_activeprivate_link
8+
# Resource: rediscloud_active_active_private_link
99

1010
Manages a PrivateLink to a Active Active Subscription in your Redis Enterprise Cloud Account.
1111

1212
## Example Usage
1313

14+
```hcl
15+
16+
locals {
17+
rediscloud_subscription_name = "..."
18+
rediscloud_cloud_account = "..."
19+
rediscloud_private_link_share_name = "..."
20+
rediscloud_database_password = "..."
21+
}
22+
23+
data "rediscloud_payment_method" "card" {
24+
card_type = "Visa"
25+
}
26+
27+
data "rediscloud_cloud_account" "account" {
28+
exclude_internal_account = true
29+
provider_type = "AWS"
30+
name = local.rediscloud_cloud_account
31+
}
32+
33+
resource "rediscloud_active_active_subscription" "subscription" {
34+
name = local.rediscloud_subscription_name
35+
payment_method_id = data.rediscloud_payment_method.card.id
36+
37+
cloud_provider {
38+
provider = data.rediscloud_cloud_account.account.provider_type
39+
cloud_account_id = data.rediscloud_cloud_account.account.id
40+
region {
41+
region = "eu-west-1"
42+
networking_deployment_cidr = "10.0.0.0/24"
43+
preferred_availability_zones = ["eu-west-1a"]
44+
}
45+
}
46+
47+
creation_plan {
48+
dataset_size_in_gb = 15
49+
quantity = 1
50+
replication = true
51+
throughput_measurement_by = "operations-per-second"
52+
throughput_measurement_value = 20000
53+
}
54+
}
55+
56+
resource "rediscloud_active_active_subscription_database" "database_resource" {
57+
subscription_id = rediscloud_active_active_subscription.subscription.id
58+
name = "db"
59+
memory_limit_in_gb = 1
60+
global_data_persistence = "aof-every-1-second"
61+
global_password = local.rediscloud_database_password
62+
}
63+
64+
65+
resource "rediscloud_private_link" "private_link" {
66+
subscription_id = rediscloud_subscription.subscription.id
67+
share_name = local.rediscloud_private_link_share_name
68+
69+
principal {
70+
principal = "123456789012"
71+
principal_type = "aws_account"
72+
principal_alias = "principal 1"
73+
}
74+
75+
principal {
76+
principal = "234567890123"
77+
principal_type = "aws_account"
78+
principal_alias = "principal 2"
79+
}
80+
}
81+
```
82+
1483
## Argument Reference
1584

16-
* `subscription_id` - (Required) The ID of the Pro Subscription to **Modifying this attribute will force creation of a new resource.**
17-
* `share_name` - (Required)
18-
* `principal` - (Required) (block)
85+
* `subscription_id` - (Required) The ID of the Active Active Subscription to link to. **Modifying this attribute will force creation of a new resource.**
1986
* `region_id` - (Required)
87+
* `share_name` - (Required) The share name of the PrivateLink.
88+
* `principal` - (Required) The principal(s) attached to the PrivateLink.
89+
90+
The `principal` block supports:
91+
* `principal` - (Required) The principal to be added to this PrivateLink. The format depends upon the type of principal you wish to attach.
92+
* `principal_type` - (Required) The principal type. Can be one of: `aws_account`, `organization`, `organization_unit`, `iam_role`, `iam_user`, `service_principal`.
93+
* `principal_alias` - The friendly name to refer to the principal.
2094

2195
## Attribute Reference
2296

23-
* `resource_configuration_id`
97+
* `resource_configuration_id` - Configuration I
2498
* `resource_configuration_arn`
2599
* `share_arn`
26100
* `connections` (block)
27101
* `databases` (block)
28102

29103
## Import
30-
`rediscloud_private_link` can be imported using the ID of the subscription and the name of the PrivateLink share, e.g.
104+
`rediscloud_active_active_private_link` can be imported using the ID of the subscription and the region id, e.g.
31105

32106
```
33-
$ terraform import rediscloud_active_active_private_link.id 1000/123456
107+
$ terraform import rediscloud_active_active_private_link.id 123456/1
34108
```

docs/resources/rediscloud_active_active_subscription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ resource "rediscloud_active_active_subscription" "subscription-resource" {
5757
The following arguments are supported:
5858

5959
* `name` - (Required) A meaningful name to identify the subscription
60-
* `payment_method` (Optional) The payment method for the requested subscription, (either `credit-card` or `marketplace`). If `credit-card` is specified, `payment_method_id` must be defined. Default: 'credit-card'. **(Changes to) this attribute are ignored after creation.**
60+
* `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
6262
* `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.**
6363
* `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.**

docs/resources/rediscloud_private_link.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "rediscloud_private_link" "private_link" {
7272

7373
## Argument Reference
7474

75-
* `subscription_id` - (Required) The ID of the Pro Subscription to attach the PrivateLink to. **Modifying this attribute will force creation of a new resource.**
75+
* `subscription_id` - (Required) The ID of the Pro Subscription to attach the PrivateLink to. **Modifying this attribute will force creation of a new resource.**
7676
* `share_name` - (Required) The share name of the PrivateLink.
7777
* `principal` - (Required) The principal(s) attached to the PrivateLink.
7878

@@ -84,11 +84,11 @@ The `principal` block supports:
8484

8585
## Attribute Reference
8686

87-
* `resource_configuration_id`
88-
* `resource_configuration_arn`
89-
* `share_arn`
90-
* `connections`
91-
* `databases`
87+
* `resource_configuration_id` - ID of the resource configuration to attach to this PrivateLink
88+
* `resource_configuration_arn` - ARN of the resource configuration to attach to this PrivateLink
89+
* `share_arn` - Share ARN of this PrivateLink.
90+
* `connections` - List of connections associated with the PrivateLink.
91+
* `databases` - List of databases associated with the PrivateLink.
9292

9393
The `connections` object has these attributes:
9494

go.mod

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/RedisLabs/terraform-provider-rediscloud
22

3-
go 1.23.0
3+
go 1.24.0
44

55
toolchain go1.24.1
66

77
require (
8-
github.com/RedisLabs/rediscloud-go-api v0.36.2
8+
github.com/RedisLabs/rediscloud-go-api v0.36.3
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.37.0
@@ -55,13 +55,14 @@ require (
5555
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
5656
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
5757
github.com/zclconf/go-cty v1.16.2 // indirect
58-
golang.org/x/crypto v0.41.0 // indirect
59-
golang.org/x/mod v0.27.0 // indirect
60-
golang.org/x/net v0.43.0 // indirect
61-
golang.org/x/sync v0.16.0 // indirect
62-
golang.org/x/sys v0.35.0 // indirect
63-
golang.org/x/text v0.28.0 // indirect
64-
golang.org/x/tools v0.36.0 // indirect
58+
golang.org/x/crypto v0.42.0 // indirect
59+
golang.org/x/mod v0.28.0 // indirect
60+
golang.org/x/net v0.44.0 // indirect
61+
golang.org/x/sync v0.17.0 // indirect
62+
golang.org/x/sys v0.36.0 // indirect
63+
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 // indirect
64+
golang.org/x/text v0.29.0 // indirect
65+
golang.org/x/tools v0.37.0 // indirect
6566
google.golang.org/appengine v1.6.8 // indirect
6667
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
6768
google.golang.org/grpc v1.72.1 // indirect

0 commit comments

Comments
 (0)