Skip to content

Commit

Permalink
Remove module
Browse files Browse the repository at this point in the history
  • Loading branch information
matpimenta committed Jan 23, 2025
1 parent 15bc934 commit e93c421
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,98 +172,6 @@ resource "rediscloud_active_active_private_service_connect_endpoint_accepter" "a
```

## Example Usage with Redis Private Service Connect Module

The example below creates a Private Service Connect Endpoint in an Active-Active subscription using a Terraform module.
We recommend using the module as it simplifies the Terraform configuration.

```hcl
data "rediscloud_payment_method" "card" {
card_type = "Visa"
}
resource "rediscloud_active_active_subscription" "subscription" {
name = "subscription-name"
payment_method_id = data.rediscloud_payment_method.card.id
cloud_provider = "GCP"
creation_plan {
memory_limit_in_gb = 1
quantity = 1
region {
region = "us-central1"
networking_deployment_cidr = "192.168.0.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}
region {
region = "europe-west1"
networking_deployment_cidr = "10.0.1.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}
}
}
resource "rediscloud_active_active_subscription_database" "database" {
subscription_id = rediscloud_active_active_subscription.subscription.id
name = "db"
memory_limit_in_gb = 1
global_data_persistence = "aof-every-1-second"
global_password = "some-password"
}
resource "rediscloud_active_active_subscription_regions" "regions" {
subscription_id = rediscloud_active_active_subscription.subscription.id
region {
region = "us-central1"
networking_deployment_cidr = "192.168.0.0/24"
database {
database_id = rediscloud_active_active_subscription_database.database.db_id
database_name = rediscloud_active_active_subscription_database.database.name
local_write_operations_per_second = 1000
local_read_operations_per_second = 1000
}
}
region {
region = "europe-west1"
networking_deployment_cidr = "10.0.1.0/24"
database {
database_id = rediscloud_active_active_subscription_database.database.db_id
database_name = rediscloud_active_active_subscription_database.database.name
local_write_operations_per_second = 1000
local_read_operations_per_second = 1000
}
}
}
locals {
region_id = one([for r in rediscloud_active_active_subscription_regions.regions.region : r.region_id if r.region == var.gcp_region])
}
module "private_service_connect" {
source = "RedisLabs/private-service-connect/rediscloud"
rediscloud_subscription_type = "active-active"
rediscloud_subscription_id = rediscloud_active_active_subscription.subscription.id
rediscloud_region_id = local.region_id
gcp_region = var.gcp_region
endpoints = [
{
gcp_project_id = var.gcp_project_id
gcp_vpc_name = var.gcp_vpc_name
gcp_vpc_subnetwork_name = var.gcp_subnet_name
gcp_response_policy_name = var.gcp_response_policy_name
}
]
}
```

## Argument Reference

* `subscription_id` - (Required) The ID of the Pro subscription to attach **Modifying this attribute will force creation of a new resource.**
Expand Down
51 changes: 0 additions & 51 deletions docs/resources/rediscloud_private_service_connect_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,57 +132,6 @@ resource "rediscloud_private_service_connect_endpoint_accepter" "accepter" {
```

## Example Usage with Redis Private Service Connect Module

The example below creates a Private Service Connect Endpoint in a Pro subscription using a Terraform module.
We recommend using the module as it simplifies the Terraform configuration.

```hcl
data "rediscloud_payment_method" "card" {
card_type = "Visa"
}
resource "rediscloud_subscription" "subscription" {
name = "subscription-name"
payment_method_id = data.rediscloud_payment_method.card.id
cloud_provider {
provider = "GCP"
region {
region = var.gcp_region
networking_deployment_cidr = "10.0.1.0/24"
}
}
creation_plan {
dataset_size_in_gb = 15
quantity = 1
replication = true
throughput_measurement_by = "operations-per-second"
throughput_measurement_value = 20000
}
}
module "private_service_connect" {
source = "RedisLabs/private-service-connect/rediscloud"
rediscloud_subscription_type = "pro"
rediscloud_subscription_id = rediscloud_subscription.subscription.id
gcp_region = var.gcp_region
endpoints = [
{
gcp_project_id = var.gcp_project_id
gcp_vpc_name = var.gcp_vpc_name
gcp_vpc_subnetwork_name = var.gcp_subnet_name
gcp_response_policy_name = var.gcp_response_policy_name
}
]
}
```

## Argument Reference

* `subscription_id` - (Required) The ID of the Pro subscription to attach **Modifying this attribute will force creation of a new resource.**
Expand Down

0 comments on commit e93c421

Please sign in to comment.