|
| 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_private_link |
| 9 | +The PrivateLink data source allows the user to retrieve information about an existing PrivateLink in the provider. |
| 10 | + |
| 11 | +## Example Usage |
| 12 | + |
| 13 | +```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 | + } |
| 52 | +} |
| 53 | +
|
| 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 |
| 73 | +} |
| 74 | +``` |
| 75 | + |
| 76 | +## Argument Reference |
| 77 | + |
| 78 | +* `subscription_id` - (Required) The ID of the Pro Subscription the PrivateLink is attached to. |
| 79 | + |
| 80 | +## Attribute reference |
| 81 | + |
| 82 | +* `principals` - The principal(s) attached to the PrivateLink. |
| 83 | +* `resource_configuration_id` |
| 84 | +* `resource_configuration_arn` |
| 85 | +* `share_arn` |
| 86 | +* `connections` |
| 87 | +* `databases` |
| 88 | + |
| 89 | +The `principals` object is a list, with these attributes: |
| 90 | +* `principal` - The principal attached to this PrivateLink. |
| 91 | +* `principal_type` - The principal type. |
| 92 | +* `principal_alias` - The friendly name to refer to the principal. |
| 93 | + |
| 94 | +The `connections` object is a list, with these attributes: |
| 95 | +* `association_id` - Association ID of the PrivateLink connection. |
| 96 | +* `connection_id` - Connection ID of the PrivateLink connection |
| 97 | +* `connection_type` - The PrivateLink connection type. |
| 98 | +* `owner_id` - Owner ID of the connection. |
| 99 | +* `association_date` - Date the connection was associated. |
| 100 | + |
| 101 | +The `databases` object is a list, with these attributes: |
| 102 | +* `database_id` - ID of the database. |
| 103 | +* `port` - The port which the database is available on. |
| 104 | +* `resource_link_endpoint` - The resource link endpoint for the database. |
0 commit comments