Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2015bd3
fix: removing override for default users so that users do not have to…
burythehammer Nov 11, 2025
d0faf94
fix: use API value for global_enable_default_user comparison
burythehammer Nov 12, 2025
63c29fe
fix: source_ips showing erronous drift when not in same order
burythehammer Nov 11, 2025
b7b728d
chore: detects read mode and acts accordingly, and workflow changes f…
burythehammer Nov 12, 2025
d00272f
docs: various docs changes, bumping go.mod, adding new action to gh a…
burythehammer Nov 12, 2025
9e26f2d
fix: set global data persistence to computed so state tracks correctly
burythehammer Nov 12, 2025
0b8262f
test: improving test coverage for enable default user
burythehammer Nov 12, 2025
67b3ef6
fix: provide card numbers
burythehammer Nov 12, 2025
39fbc0e
test: remove region from fixture
burythehammer Nov 12, 2025
0f0c437
fix: cleaning up regions on subscription test
burythehammer Nov 12, 2025
e1c000e
chore: adding debugging to work out aws account id issue
burythehammer Nov 12, 2025
51d6ad9
test: removing account id assertion for non BYOC accounts and removin…
burythehammer Nov 12, 2025
fcafeea
test: redis_version 8.0 doesn't exist, fixing test version
burythehammer Nov 13, 2025
ebcec58
test: restructuring enable default user tests to have a 4 step compre…
burythehammer Nov 13, 2025
0701340
fix: remove qpf module hardcoded validation
burythehammer Nov 11, 2025
dbd6516
chore: adding debug logs
burythehammer Nov 13, 2025
f41e1de
chore: small formatting fix
burythehammer Nov 13, 2025
fcc3960
fix: when removing regional default_user then send the global default…
burythehammer Nov 13, 2025
c489f09
chore: changing test fixture naming logic and moving field to a compu…
burythehammer Nov 13, 2025
dd9c951
fix: trying custom hash for set to prevent drift, as only name should…
burythehammer Nov 13, 2025
96ec3cc
fix: Read enable_default_user from config, not state
burythehammer Nov 14, 2025
fd52aad
fix: custom force update function when hashes are different
burythehammer Nov 14, 2025
0812829
fix: reverting computed true and custom forcediffs
burythehammer Nov 14, 2025
bfad312
fix: new approach - using DiffSuppressFunc instead of messing with st…
burythehammer Nov 14, 2025
47ff5dd
fix: update needs to decide from rawconfig what to send
burythehammer Nov 14, 2025
a7375fd
test: explicit redis 7 and 8 crud tests for backwards compatibility
burythehammer Nov 14, 2025
4bbf24e
test: explicit redis 7 and 8 crud tests for backwards compatibility, …
burythehammer Nov 14, 2025
995d4bc
fix: making diffsuppress smarter so compute: true is not required
burythehammer Nov 14, 2025
36088e5
test: update fixtures missing redis versions
burythehammer Nov 14, 2025
1b800ef
test: moving redis version to correct level
burythehammer Nov 14, 2025
c29d7ed
fix: redis 8 modules correctly handled by active active databases in …
burythehammer Nov 14, 2025
dc0ad24
chore: seeing whether the typeset hash has caused our issues
burythehammer Nov 14, 2025
fb07fdf
test: fixing test fixture
burythehammer Nov 14, 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
20 changes: 20 additions & 0 deletions .github/actions/run-testacc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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
env:
TEST_PATTERN: ${{ inputs.test_pattern }}
run: |
set -o pipefail
EXECUTE_TESTS=true make testacc TESTARGS="-run=\"$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
104 changes: 76 additions & 28 deletions .github/workflows/terraform_provider_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ jobs:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveTransitGatewayAttachment_CRUDI"'

# ===== WAVE 1: Critical smoke tests for PR changes =====
# These test our direct code changes and must pass first
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have temporarily restructured the smoke tests so I don't spin up more than I need. This will go back to the old structure afterwards


go_test_smoke_aa_db:
name: go test smoke aa db
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
Expand All @@ -134,30 +137,35 @@ 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_essentials_sub:
name: go test smoke essentials sub
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
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudEssentialsSubscription"'

- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudActiveActiveDatabase_enableDefaultUser

go_test_smoke_essentials_db:
name: go test smoke essentials db
needs: go_test_smoke_essentials_sub
go_test_smoke_aa_sub:
name: go test smoke aa sub
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
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudEssentialsDatabase_CRUDI"'
- uses: ./.github/actions/run-testacc
with:
test_pattern: TestAccResourceRedisCloudActiveActiveSubscription_CRUDI

go_test_smoke_pro_db:
name: go test smoke pro db
Expand All @@ -168,64 +176,104 @@ 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_pro_sub:
name: go test smoke pro sub
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: TestAccResourceRedisCloudProSubscription_CRUDI

# ===== WAVE 2: Additional smoke tests (run after Wave 1 passes) =====

go_test_smoke_essentials_sub:
name: go test smoke essentials sub
needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub]
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: TestAccResourceRedisCloudEssentialsSubscription


go_test_smoke_essentials_db:
name: go test smoke essentials db
needs: go_test_smoke_essentials_sub
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: TestAccResourceRedisCloudEssentialsDatabase_CRUDI

go_test_smoke_misc:
name: go test smoke misc
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub]
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
- 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
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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:
name: go test smoke public endpoints
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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)"'

go_test_smoke_qpf:
name: go test smoke query performance factor
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
- uses: ./.github/actions/run-testacc
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_qpf"'
test_pattern: TestAcc(RedisCloudProDatabase_BlockPublicEndpoints|ActiveActiveSubscriptionDatabase_BlockPublicEndpoints)

tfproviderlint:
name: tfproviderlint
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
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.

# 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
7 changes: 0 additions & 7 deletions provider/activeactive/testdata/active_active_sub.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ resource "rediscloud_active_active_subscription" "example" {
write_operations_per_second = 1000
read_operations_per_second = 1000
}

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

maintenance_windows {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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
}

region {
region = "eu-west-2"
networking_deployment_cidr = "10.2.0.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)
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
}

# eu-west-2: NOT set (inherits from global=true)
override_region {
name = "eu-west-2"
}
}
Loading
Loading