Skip to content

Commit

Permalink
Undeprecate renames (#521)
Browse files Browse the repository at this point in the history
* Removed new, undeprecated old, improved documentation
* Added an explanatory comment
* Lots more renaming
* Corrections to CHANGELOG
* Upped a dependency

The failed tests have passed locally and are unrelated to the changes being made.
There was a temporary issue on Redis's systems which has now been resolved.
  • Loading branch information
JohnSharpe authored Jun 5, 2024
1 parent 7ae120d commit 3dd231b
Show file tree
Hide file tree
Showing 51 changed files with 454 additions and 3,879 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
}
}
EOT
echo 'resource "rediscloud_flexible_subscription" "example" {}' > example.tf
echo 'resource "rediscloud_subscription" "example" {}' > example.tf
terraform init -plugin-dir terraform-plugin-dir
- if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure'
name: terraform providers schema
Expand Down
15 changes: 5 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@
All notable changes to this project will be documented in this file.
See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)

## 1.7.0 (29th April 2024)
## 1.7.0 (11th June 2024)

### Changed
### Fixed

- Deprecated datasources: `rediscloud_subscription`, `rediscloud_database`
- Deprecated
resources: `rediscloud_subscription`, `rediscloud_subscription_database`, `rediscloud_active_active_subscription_database`
- Datasources `rediscloud_subscription` and `rediscloud_databases` are for Pro Subscriptions only

### Added

- To replace the deprecated datasources: `rediscloud_flexible_subscription`, `rediscloud_flexible_database`
- To replace the deprecated
resources: `rediscloud_flexible_subscription`, `rediscloud_flexible_database`, `rediscloud_active_active_database`
- Datasources for Active Active features: `rediscloud_active_active_subscription`, `rediscloud_active_active_database`
- Datasources for Active-Active features: `rediscloud_active_active_subscription`, `rediscloud_active_active_subscription_database`
- Datasources for Essentials
features: `rediscloud_essentials_plan`, `rediscloud_essentials_subscription`, `rediscloud_essentials_database`
- Resources for Essentials features: `rediscloud_essentials_subscription`, `rediscloud_essentials_database`
- `modules`/`global_modules` can be specified on Active Active Subscription/Database resources, enabling `RedisJSON`
- `modules`/`global_modules` can be specified on Active-Active Subscription/Database resources, enabling `RedisJSON`
- All Subscription resources include the `pricing` attribute
- All Database resources include `latest_backup_status` and `latest_import_status` attributes as appropriate

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Terraform Provider Redis Cloud
==================

The Redis Enterprise Cloud Terraform provider is a plugin for Terraform that allows Redis Enterprise Cloud Flexible customers to manage the full
The Redis Enterprise Cloud Terraform provider is a plugin for Terraform that allows Redis Enterprise Cloud customers to manage the full
lifecycle of their subscriptions and related Redis databases.

Requirements
Expand Down
7 changes: 4 additions & 3 deletions docs/data-sources/rediscloud_active_active_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ description: |-

# Resource: rediscloud_active_active_subscription

The Active Active Subscription data source allows access to the details of an existing flexible subscription within your
Redis Enterprise Cloud account.
This data source allows access to the details of an existing subscription within your Redis Enterprise Cloud account.

-> **Note:** This is referring to Active-Active Subscriptions only. See also `rediscloud_subscription` (Pro) and `rediscloud_essentials_subscription`.

## Example Usage

The following example shows how to use the name attribute to locate a flexible subscription within your Redis Enterprise
The following example shows how to use the name attribute to locate a subscription within your Redis Enterprise
Cloud account.

```hcl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
layout: "rediscloud"
page_title: "Redis Cloud: rediscloud_active_active_database"
page_title: "Redis Cloud: rediscloud_active_active_subscription_database"
description: |-
Database data source for Active-Active Subscriptions in the Redis Cloud Terraform provider.
---

# Resource: rediscloud_active_active_database
# Resource: rediscloud_active_active_subscription_database

The Active Active Database data source allows access to the details of an existing database within your Redis Enterprise
Cloud account.
This data source allows access to the details of an existing database within your Redis Enterprise Cloud account.

-> **Note:** This is for databases within Active-Active Subscriptions only. See also `rediscloud_database` (Pro) and `rediscloud_essentials_database`.

## Example Usage

The following example shows how to locate a single database within an AA Subscription. This example assumes the subscription
only contains a single database.

```hcl-terraform
data "rediscloud_active_active_database" "example" {
data "rediscloud_active_active_subscription_database" "example" {
subscription_id = "1234"
}
```
Expand All @@ -25,7 +26,7 @@ The following example shows how to use the name to locate a single database with
databases.

```hcl-terraform
data "rediscloud_active_active_database" "example" {
data "rediscloud_active_active_subscription_database" "example" {
subscription_id = "1234"
name = "first-database"
}
Expand Down
42 changes: 34 additions & 8 deletions docs/data-sources/rediscloud_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: |-

# Data Source: rediscloud_database

!> **WARNING:** This resource is deprecated and will be removed in the next major version. Switch to `rediscloud_flexible_database` or `rediscloud_active_active_database` (incoming)
This data source allows access to the details of an existing database within your Redis Enterprise Cloud account.

The Database data source allows access to the details of an existing database within your Redis Enterprise Cloud account.
-> **Note:** This is for databases within Pro Subscriptions only. See also `rediscloud_active_active_subscription_database` and `rediscloud_essentials_database`.

## Example Usage

Expand All @@ -21,7 +21,7 @@ data "rediscloud_database" "example" {
}
```

The following example shows how to use the name to locate a single database within a subscription that has multiple databases.
The following example shows how to use the name to locate a single database within a subscription that has multiple databases.

```hcl-terraform
data "rediscloud_database" "example" {
Expand All @@ -46,7 +46,7 @@ data "rediscloud_database" "example" {
* `support_oss_cluster_api` - Supports the Redis open-source (OSS) Cluster API.
* `resp_version` - Either `resp2` or `resp3`. Database's RESP version.
* `replica_of` - The set of Redis database URIs, in the format `redis://user:password@host:port`, that this
database will be a replica of.
database will be a replica of.
* `alert` - Set of alerts to enable on the database, documented below.
* `data_persistence` - The rate of database data persistence (in persistent storage).
* `data_eviction` - The data items eviction policy.
Expand All @@ -55,14 +55,40 @@ database will be a replica of.
* `throughput_measurement_by` - The throughput measurement method.
* `throughput_measurement_value` - The throughput value.
* `hashing_policy` - The list of regular expression rules the database is sharded by. See
[the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the
hashing policy.
[the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the
hashing policy.
* `public_endpoint` - Public endpoint to access the database
* `private_endpoint` - Private endpoint to access the database
* `enable_tls` - Enable TLS for database, default is `false`
* `enable_default_user` - When `true` enables connecting to the database with the default user. Default `true`.
* `latest_backup_status` - A latest_backup_status object, documented below.
* `latest_import_status` - A latest_import_status object, documented below.

The `alert` block supports:

* `name` The alert name
* `value` The alert value
* `name` - The alert name
* `value` - The alert value

The `latest_backup_status` and `latest_import_status` blocks contain:

* `error` - An error block, in case this lookup failed, documented below.
* `response` - A detail block, documented below.

The `error` block in both `latest_backup_status` and `latest_import_status` contains:

* `type` - The type of error encountered while looking up the status of the last backup/import.
* `description` - A description of the error encountered while looking up the status of the last backup/import.
* `status` - Any particular HTTP status code associated with the erroneous status check.

The `response` block `latest_backup_status` contains:

* `status` - The status of the last backup operation.
* `last_backup_time` - When the last backup operation occurred.
* `failure_reason` - If a failure, why the backup operation failed.

The `response` block `latest_import_status` contains:

* `status` - The status of the last import operation.
* `last_import_time` - When the last import operation occurred.
* `failure_reason` - If a failure, why the import operation failed.
* `failure_reason_params` - Parameters of the failure, if appropriate, in the form of a list of objects each with a `key` entry and a `value` entry.
5 changes: 3 additions & 2 deletions docs/data-sources/rediscloud_essentials_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ description: |-

# Resource: rediscloud_essentials_database

The Essentials Database data source allows access to the details of an existing database within your Redis Enterprise
Cloud account.
This data source allows access to the details of an existing database within your Redis Enterprise Cloud account.

-> **Note:** This is for databases within Essentials Subscriptions only. See also `rediscloud_database` (Pro) and `rediscloud_active_active_subscription_database`.

## Example Usage

Expand Down
4 changes: 3 additions & 1 deletion docs/data-sources/rediscloud_essentials_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ description: |-

# Data Source: rediscloud_essentials_subscription

The Essentials Subscription data source allows access to the details of an existing Subscription within your Redis Enterprise Cloud account.
This data source allows access to the details of an existing subscription within your Redis Enterprise Cloud account.

-> **Note:** This is referring to Essentials Subscriptions only. See also `rediscloud_subscription` (Pro) and `rediscloud_active_active_subscription`.

## Example Usage

Expand Down
92 changes: 0 additions & 92 deletions docs/data-sources/rediscloud_flexible_database.md

This file was deleted.

58 changes: 0 additions & 58 deletions docs/data-sources/rediscloud_flexible_subscription.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/data-sources/rediscloud_payment_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "rediscloud_payment_method" "card" {
card_type = "Visa"
}
resource "rediscloud_flexible_subscription" "example" {
resource "rediscloud_subscription" "example" {
name = "My Test Subscription"
payment_method_id = data.rediscloud_payment_method.card.id
Expand Down
Loading

0 comments on commit 3dd231b

Please sign in to comment.