Skip to content

Commit 3c3d6a3

Browse files
committed
docs: updates to active active docs
1 parent 03e3c1e commit 3c3d6a3

File tree

2 files changed

+55
-33
lines changed

2 files changed

+55
-33
lines changed

docs/data-sources/rediscloud_active_active_private_link.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: |-
66
---
77

88
# 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.
9+
The PrivateLink data source allows the user to retrieve information about an existing PrivateLink for an Active-Active Subscription region in the provider.
1010

1111
## Example Usage
1212

@@ -23,8 +23,8 @@ output "rediscloud_private_link_principals" {
2323

2424
## Argument Reference
2525

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.
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.
2828

2929
## Attribute reference
3030

docs/resources/rediscloud_active_active_private_link.md

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
layout: "rediscloud"
33
page_title: "Redis Cloud: rediscloud_active_active_private_link"
44
description: |-
5-
PrivateLink resource for Active Active Subscription in the Redis Cloud Terraform provider.
5+
PrivateLink resource for an Active-Active Subscription in the Redis Cloud Terraform provider.
66
---
77

88
# Resource: rediscloud_active_active_private_link
99

10-
Manages a PrivateLink to a Active Active Subscription in your Redis Enterprise Cloud Account.
10+
Manages a PrivateLink to an Active-Active Subscription in your Redis Enterprise Cloud Account.
11+
12+
Note the forced dependency on the Active-Active database. Currently, you require a database to be attached to your subscription in order for a `region_id` to be assigned.
1113

1214
## Example Usage
1315

@@ -30,41 +32,48 @@ data "rediscloud_cloud_account" "account" {
3032
name = local.rediscloud_cloud_account
3133
}
3234
33-
resource "rediscloud_active_active_subscription" "subscription" {
35+
resource "rediscloud_active_active_subscription" "aa_subscription" {
3436
name = local.rediscloud_subscription_name
37+
payment_method = "credit-card"
3538
payment_method_id = data.rediscloud_payment_method.card.id
39+
cloud_provider = "AWS"
3640
37-
cloud_provider {
38-
provider = data.rediscloud_cloud_account.account.provider_type
39-
cloud_account_id = data.rediscloud_cloud_account.account.id
41+
creation_plan {
42+
memory_limit_in_gb = 1
43+
quantity = 1
4044
region {
41-
region = "eu-west-1"
42-
networking_deployment_cidr = "10.0.0.0/24"
43-
preferred_availability_zones = ["eu-west-1a"]
45+
region = "eu-west-1"
46+
networking_deployment_cidr = "192.168.0.0/24"
47+
write_operations_per_second = 1000
48+
read_operations_per_second = 1000
49+
}
50+
region {
51+
region = "eu-west-2"
52+
networking_deployment_cidr = "10.0.1.0/24"
53+
write_operations_per_second = 1000
54+
read_operations_per_second = 1000
4455
}
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
5356
}
5457
}
5558
56-
resource "rediscloud_active_active_subscription_database" "database_resource" {
57-
subscription_id = rediscloud_active_active_subscription.subscription.id
59+
resource "rediscloud_active_active_subscription_database" "aa_database" {
60+
subscription_id = rediscloud_active_active_subscription.aa_subscription.id
5861
name = "db"
5962
memory_limit_in_gb = 1
6063
global_data_persistence = "aof-every-1-second"
6164
global_password = local.rediscloud_database_password
6265
}
6366
67+
data "rediscloud_active_active_subscription_regions" "aa_regions_info" {
68+
subscription_name = rediscloud_active_active_subscription.aa_subscription.name
69+
depends_on = [rediscloud_active_active_subscription_database.aa_database]
70+
}
71+
6472
65-
resource "rediscloud_private_link" "private_link" {
66-
subscription_id = rediscloud_subscription.subscription.id
67-
share_name = local.rediscloud_private_link_share_name
73+
resource "rediscloud_active_active_private_link" "private_link" {
74+
subscription_id = rediscloud_active_active_subscription.aa_subscription.id
75+
region_id = data.rediscloud_active_active_subscription_regions.aa_regions_info.regions[0].region_id
76+
share_name = local.rediscloud_private_link_share_name
6877
6978
principal {
7079
principal = "123456789012"
@@ -82,8 +91,8 @@ resource "rediscloud_private_link" "private_link" {
8291

8392
## Argument Reference
8493

85-
* `subscription_id` - (Required) The ID of the Active Active Subscription to link to. **Modifying this attribute will force creation of a new resource.**
86-
* `region_id` - (Required)
94+
* `subscription_id` - (Required) The ID of the Active-Active Subscription to link to. **Modifying this attribute will force creation of a new resource.**
95+
* `region_id` - (Required) The region ID within the Active-Active subscription that the PrivateLink is attached to. **Modifying this attribute will force creation of a new resource.**
8796
* `share_name` - (Required) The share name of the PrivateLink.
8897
* `principal` - (Required) The principal(s) attached to the PrivateLink.
8998

@@ -94,14 +103,27 @@ The `principal` block supports:
94103

95104
## Attribute Reference
96105

97-
* `resource_configuration_id` - Configuration I
98-
* `resource_configuration_arn`
99-
* `share_arn`
100-
* `connections` (block)
101-
* `databases` (block)
106+
* `resource_configuration_id` - ID of the resource configuration to attach to this PrivateLink
107+
* `resource_configuration_arn` - ARN of the resource configuration to attach to this PrivateLink
108+
* `share_arn` - Share ARN of this PrivateLink.
109+
* `connections` - List of connections associated with the PrivateLink.
110+
* `databases` - List of databases associated with the PrivateLink.
111+
112+
The `connections` object has these attributes:
113+
114+
* `association_id` - Association ID of the PrivateLink connection.
115+
* `connection_id` - Connection ID of the PrivateLink connection.
116+
* `connection_type` - Type of the PrivateLink connection.
117+
* `owner_id` - Owner ID of the connection.
118+
* `association_date` - Date the connection was associated.
119+
120+
The `databases` object has these attributes:
121+
* `database_id` - ID of the database.
122+
* `port` - The port which the database is available on.
123+
* `resource_link_endpoint` - The resource link endpoint for the database.
102124

103125
## Import
104-
`rediscloud_active_active_private_link` can be imported using the ID of the subscription and the region id, e.g.
126+
`rediscloud_active_active_private_link` can be imported using the ID of the subscription and the region id in the format SUB_ID/REGION_ID, e.g.
105127

106128
```
107129
$ terraform import rediscloud_active_active_private_link.id 123456/1

0 commit comments

Comments
 (0)