Skip to content
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
636ab5f
fix: cmk drift fix
burythehammer Nov 10, 2025
5801b31
fix: remove default from cmk fields as can't have computed and default
burythehammer Nov 11, 2025
33072ce
fix: also update AA subscription and schema description
burythehammer Nov 11, 2025
a646e03
docs: fixed incorrect documentation regarding aws_account_id
burythehammer Nov 11, 2025
57a885c
fix: removing override for default users so that users do not have to…
burythehammer Nov 11, 2025
1bf4cd4
fix: tests have now properly randomised db and sub names
burythehammer Nov 11, 2025
c722762
fix: global data persistance should be computed, adding tflog for deb…
burythehammer Nov 11, 2025
554a721
chore: add new tests to smoke tests
burythehammer Nov 11, 2025
87a6efc
chore: bump rediscloud-go-api
burythehammer Nov 11, 2025
39944a8
test: additional scenarios for test coverage plus api checks
burythehammer Nov 11, 2025
a93d8c8
docs: changelog
burythehammer Nov 11, 2025
e388d0d
chore: fix test and slight tweak to sweep error returning
burythehammer Nov 11, 2025
e708a7e
chore: fixed some test names and ensured tests always run in smoke tests
burythehammer Nov 11, 2025
3080e39
chore: removing qpf smoke test from pr
burythehammer Nov 11, 2025
f977ed5
chore: adding force flag to sweep
burythehammer Nov 11, 2025
259f8e4
fix: piping input through env variable instead of shell expansion
burythehammer Nov 11, 2025
7623606
test: debug tests and version fix
burythehammer Nov 11, 2025
d5c62af
fix: source_ips showing erronous drift when not in same order
burythehammer Nov 11, 2025
7375664
chore: debug tests
burythehammer Nov 11, 2025
61736ea
chore: fixing debug test
burythehammer Nov 11, 2025
fd09b6d
chore: fixing debug test
burythehammer Nov 11, 2025
4d71371
wip
burythehammer Nov 11, 2025
1a31001
wip: import tests
burythehammer Nov 12, 2025
dd3da31
fix: when importing use global api value
burythehammer Nov 12, 2025
6f24741
chore: adding note that test does not currently work due to limitations
burythehammer Nov 12, 2025
169f545
chore: small tweaks
burythehammer Nov 12, 2025
8537bcd
chore: adding nil checkdestroy to satisfy build
burythehammer Nov 12, 2025
1d47883
chore: temporary reprioritisation of smoke tests to focus on current …
burythehammer Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/run-testacc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Run Acceptance Tests'
description: 'Run acceptance tests with validation that tests actually ran'
inputs:
test_pattern:
description: 'Test pattern to pass to -run flag'
required: true
runs:
using: 'composite'
steps:
- name: Run tests
shell: bash
run: |
set -o pipefail
EXECUTE_TESTS=true make testacc TESTARGS='-run="${{ inputs.test_pattern }}"' 2>&1 | tee test_output.txt
if ! grep -q "=== RUN" test_output.txt; then
echo "ERROR: No tests matched the pattern. Please check the -run argument."
exit 1
fi
49 changes: 40 additions & 9 deletions .github/workflows/terraform_provider_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,22 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveDatabase_CRUDI"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudActiveActiveDatabase_CRUDI

go_test_smoke_aa_db_enable_default_user:
name: go test smoke aa db enable default user
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudActiveActiveDatabase_enableDefaultUser

go_test_smoke_essentials_sub:
name: go test smoke essentials sub
Expand All @@ -145,7 +160,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudEssentialsSubscription"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudEssentialsSubscription


go_test_smoke_essentials_db:
Expand All @@ -157,7 +174,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudEssentialsDatabase_CRUDI"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudEssentialsDatabase_CRUDI

go_test_smoke_pro_db:
name: go test smoke pro db
Expand All @@ -168,7 +187,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_CRUDI"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudProDatabase_CRUDI


go_test_smoke_misc:
Expand All @@ -180,7 +201,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)

go_test_pro_db_upgrade:
name: go test smoke pro db upgrade
Expand All @@ -191,7 +214,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_Upgrade"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudProDatabase_Redis8_Upgrade

go_test_privatelink:
name: go test smoke privatelink
Expand All @@ -202,7 +227,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudPrivateLink_CRUDI"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudPrivateLink_CRUDI


go_test_block_public_endpoints:
Expand All @@ -214,7 +241,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(RedisCloudProDatabaseBlockPublicEndpoints|ActiveActiveSubscriptionDatabaseBlockPublicEndpoints)"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAcc(RedisCloudProDatabase_BlockPublicEndpoints|ActiveActiveSubscriptionDatabase_BlockPublicEndpoints)

go_test_smoke_qpf:
name: go test smoke query performance factor
Expand All @@ -225,7 +254,9 @@ jobs:
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_qpf"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudProDatabase_qpf

tfproviderlint:
name: tfproviderlint
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)


# Unreleased

## Fixed
- `rediscloud_active_active_subscription_database`: Fixed drift detection for `enable_default_user` in region overrides. Regions now correctly inherit from `global_enable_default_user` when not explicitly set, eliminating spurious diffs.
- `rediscloud_active_active_subscription_database`: Fixed drift detection for `global_data_persistence`. This field now correctly tracks API-returned values without causing unexpected diffs.
- `rediscloud_subscription` and `rediscloud_active_active_subscription`: `customer_managed_key_enabled` and `customer_managed_key_deletion_grace_period` fields now support computed values from the API.

# 2.8.0 (10th November 2025)

## Added
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/rediscloud_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ output "rediscloud_subscription" {

`id` is set to the ID of the found subscription.

* `aws_account_id` - AWS account ID that the subscription is deployed in (AWS subscriptions only).
* `payment_method_id` - A valid payment method pre-defined in the current account
* `memory_storage` - Memory storage preference: either 'ram' or a combination of 'ram-and-flash'
* `cloud_provider` - A cloud provider object, documented below
Expand All @@ -45,6 +44,7 @@ The `cloud_provider` block supports:

* `provider` - The cloud provider to use with the subscription, (either `AWS` or `GCP`)
* `cloud_account_id` - Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
* `aws_account_id` - AWS account ID that the subscription is deployed in (AWS subscriptions only).
* `region` - Cloud networking details, per region (single region or multiple regions for Active-Active cluster only), documented below

The cloud_provider `region` block supports:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/rediscloud_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/d

## Attribute reference

* `aws_account_id` - AWS account ID that the subscription is deployed in (AWS subscriptions only).
* `customer_managed_key_redis_service_account` - Outputs the id of the service account associated with the subscription. Useful as part of the CMK flow.

The `cloud_provider` block has these attributes:

* `aws_account_id` - AWS account ID that the subscription is deployed in (AWS subscriptions only).

The `region` block has these attributes:

* `networks` - List of generated network configuration
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ go 1.24.0
toolchain go1.24.1

require (
github.com/RedisLabs/rediscloud-go-api v0.42.0
github.com/RedisLabs/rediscloud-go-api v0.43.0
github.com/bflad/tfproviderlint v0.31.0
github.com/hashicorp/go-cty v1.5.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1
github.com/stretchr/testify v1.11.1
)
Expand Down Expand Up @@ -38,7 +39,6 @@ require (
github.com/hashicorp/terraform-exec v0.23.1 // indirect
github.com/hashicorp/terraform-json v0.27.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.29.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
Expand Down Expand Up @@ -71,4 +71,4 @@ require (
)

// for local development, uncomment this
//replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api
// replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/RedisLabs/rediscloud-go-api v0.42.0 h1:nsEgDF9IlPSGVTpMtDMAKR3mzk1oqATAxpO/hAqrp80=
github.com/RedisLabs/rediscloud-go-api v0.42.0/go.mod h1:ZsOzeXCzczue7vOiAF0be0sl1FTEgltAGmh+4s0BFq0=
github.com/RedisLabs/rediscloud-go-api v0.43.0 h1:fMODeDNQoD/o2afeSkMl8zezxQ/scOW17Z54p3GrhyI=
github.com/RedisLabs/rediscloud-go-api v0.43.0/go.mod h1:ZsOzeXCzczue7vOiAF0be0sl1FTEgltAGmh+4s0BFq0=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
Expand Down
59 changes: 59 additions & 0 deletions provider/activeactive/testdata/enable_default_user_all_explicit.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Template signature: fmt.Sprintf(template, subscription_name, database_name, password)
locals {
subscription_name = "%s"
database_name = "%s"
password = "%s"
}

data "rediscloud_payment_method" "card" {
card_type = "Visa"
last_four_numbers = "5556"
}

resource "rediscloud_active_active_subscription" "example" {
name = local.subscription_name
payment_method_id = data.rediscloud_payment_method.card.id
cloud_provider = "AWS"

creation_plan {
dataset_size_in_gb = 1
quantity = 1

region {
region = "us-east-1"
networking_deployment_cidr = "10.0.0.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}

region {
region = "us-east-2"
networking_deployment_cidr = "10.0.1.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}
}
}

resource "rediscloud_active_active_subscription_database" "example" {
subscription_id = rediscloud_active_active_subscription.example.id
name = local.database_name
memory_limit_in_gb = 1

# Global enable_default_user is true
global_enable_default_user = true
global_password = local.password

# us-east-1 explicitly set to true (matches global but is EXPLICIT)
# This tests that explicit values are preserved even when matching global
override_region {
name = "us-east-1"
enable_default_user = true
}

# us-east-2 explicitly set to false (differs from global)
override_region {
name = "us-east-2"
enable_default_user = false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Template signature: fmt.Sprintf(template, subscription_name, database_name, password)
locals {
subscription_name = "%s"
database_name = "%s"
password = "%s"
}

data "rediscloud_payment_method" "card" {
card_type = "Visa"
last_four_numbers = "5556"
}

resource "rediscloud_active_active_subscription" "example" {
name = local.subscription_name
payment_method_id = data.rediscloud_payment_method.card.id
cloud_provider = "AWS"

creation_plan {
dataset_size_in_gb = 1
quantity = 1

region {
region = "us-east-1"
networking_deployment_cidr = "10.0.0.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}

region {
region = "us-east-2"
networking_deployment_cidr = "10.0.1.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}
}
}

resource "rediscloud_active_active_subscription_database" "example" {
subscription_id = rediscloud_active_active_subscription.example.id
name = local.database_name
memory_limit_in_gb = 1

# Global enable_default_user is false
global_enable_default_user = false
global_password = local.password

# Both regions inherit from global - NO enable_default_user specified
override_region {
name = "us-east-1"
}

override_region {
name = "us-east-2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Template signature: fmt.Sprintf(template, subscription_name, database_name, password)
locals {
subscription_name = "%s"
database_name = "%s"
password = "%s"
}

data "rediscloud_payment_method" "card" {
card_type = "Visa"
last_four_numbers = "5556"
}

resource "rediscloud_active_active_subscription" "example" {
name = local.subscription_name
payment_method_id = data.rediscloud_payment_method.card.id
cloud_provider = "AWS"

creation_plan {
dataset_size_in_gb = 1
quantity = 1

region {
region = "us-east-1"
networking_deployment_cidr = "10.0.0.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}

region {
region = "us-east-2"
networking_deployment_cidr = "10.0.1.0/24"
write_operations_per_second = 1000
read_operations_per_second = 1000
}
}
}

resource "rediscloud_active_active_subscription_database" "example" {
subscription_id = rediscloud_active_active_subscription.example.id
name = local.database_name
memory_limit_in_gb = 1

# Global enable_default_user is false
global_enable_default_user = false
global_password = local.password

# us-east-1 explicitly set to false (matches global but is EXPLICIT)
override_region {
name = "us-east-1"
enable_default_user = false
}

# us-east-2 inherits from global (false) - NO enable_default_user specified
override_region {
name = "us-east-2"
}
}
Loading
Loading