Skip to content

Commit ce4955b

Browse files
Merge pull request #644 from RedisLabs/feat/OPCR-16-deprecate-subscription
OPCR-16 deprecate subscription
2 parents 8261d23 + a13427c commit ce4955b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

docs/resources/rediscloud_subscription.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ resource "rediscloud_subscription" "subscription-resource" {
3434
payment_method = "credit-card"
3535
payment_method_id = data.rediscloud_payment_method.card.id
3636
memory_storage = "ram"
37-
redis_version = "7.2"
3837
3938
cloud_provider {
4039
provider = data.rediscloud_cloud_account.account.provider_type
@@ -76,7 +75,7 @@ The following arguments are supported:
7675
* `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.**
7776
* `payment_method_id` - (Optional) A valid payment method pre-defined in the current account. Only __Required__ when `payment_method` is `credit-card`.
7877
* `memory_storage` - (Optional) Memory storage preference: either ‘ram’ or a combination of ‘ram-and-flash’. Default: ‘ram’. **Modifying this attribute will force creation of a new resource.**
79-
* `redis_version` - (Optional) The Redis version of the databases in the subscription. If omitted, the Redis version will be the default. **Modifying this attribute will force creation of a new resource.**
78+
* `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 pro subscriptions. Please specify `redis_version` on databases directly instead.**
8079
* `allowlist` - (Optional) An allowlist object, documented below
8180
* `cloud_provider` - (Required) A cloud provider object, documented below. **Modifying this attribute will force creation of a new resource.**
8281
* `creation_plan` - (Required) A creation plan object, documented below.

provider/resource_rediscloud_pro_subscription.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ func resourceRedisCloudProSubscription() *schema.Resource {
363363
Type: schema.TypeString,
364364
Optional: true,
365365
ForceNew: true,
366+
Deprecated: "This attribute is deprecated on pro subscriptions. Please specify `redis_version` on databases directly instead.",
366367
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
367368
if d.Id() == "" {
368369
// Consider the property if the resource is about to be created.
@@ -605,11 +606,6 @@ func resourceRedisCloudProSubscriptionCreate(ctx context.Context, d *schema.Reso
605606
Databases: dbs,
606607
}
607608

608-
redisVersion := d.Get("redis_version").(string)
609-
if d.Get("redis_version").(string) != "" {
610-
createSubscriptionRequest.RedisVersion = redis.String(redisVersion)
611-
}
612-
613609
cmkEnabled := d.Get("customer_managed_key_enabled").(bool)
614610

615611
if cmkEnabled {

0 commit comments

Comments
 (0)