Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1181fb4
fix: issue where regional would incorrectly default to
burythehammer Nov 4, 2025
bb865ff
fix: fixing TGW parameters the wrong way around and acceptance tests …
burythehammer Nov 4, 2025
0ac3657
test: fixing fixtures with regions
burythehammer Nov 4, 2025
1869712
fix: minor upgrades disabled as not ready in production yet
burythehammer Nov 4, 2025
6d525c5
fix: defending against nils in the TGW
burythehammer Nov 4, 2025
068f24e
fix: added wait and polling logic to the tgw
burythehammer Nov 4, 2025
44b9652
fix: global fields drift issue
burythehammer Nov 4, 2025
33a275d
test: disabling tgw acceptance tests for now until they are ready in …
burythehammer Nov 4, 2025
1a73f0f
fix: using getrawstate to compare against the real state rather than …
burythehammer Nov 5, 2025
c489c82
chore: refactoring drift code into helpers
burythehammer Nov 5, 2025
1d3b96a
chore: moving helper functions out to dedicated file
burythehammer Nov 5, 2025
53c44c0
chore: refactoring test fixtures
burythehammer Nov 5, 2025
6ac9a7d
fix: order insensitive string slice comparisons
burythehammer Nov 6, 2025
2c54609
fix: deep comparison of alerts
burythehammer Nov 6, 2025
2a1ffe3
fix: fixing drift with alerts
burythehammer Nov 6, 2025
1a59c18
fix: empty sets incorrectly being flagged as explicitly set
burythehammer Nov 6, 2025
ab98d99
fix: explicitly send an empty array when updating alerts to 0
burythehammer Nov 6, 2025
6614d90
chore: debugging logs
burythehammer Nov 6, 2025
09d4d45
chore: remove debug logs
burythehammer Nov 6, 2025
ff49d27
docs: changelog
burythehammer Nov 6, 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
84 changes: 54 additions & 30 deletions .github/workflows/terraform_provider_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ jobs:
name: go build
run: go build -o terraform-plugin-dir/registry.terraform.io/RedisLabs/rediscloud/99.99.99/$(go env GOOS)_$(go env GOARCH)/terraform-provider-rediscloud .

go_unit_test:
name: go unit test
needs: [go_build]
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: go test ./... -run="^TestUnit" # Runs tests starting with TestUnit

tfproviderlint:
name: tfproviderlint
needs: [go_build]
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: make tfproviderlint

terraform_providers_schema:
name: terraform providers schema
needs: [go_build]
Expand Down Expand Up @@ -102,9 +124,33 @@ jobs:
mkdir terraform-providers-schema
terraform providers schema -json > terraform-providers-schema/schema.json

# All acceptance tests run in parallel after quick tests
go_test_smoke_aa_tgw_attachment:
if: false # Temporarily disabled - TGW tests not ready yet
name: go test smoke aa tgw attachment
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="TestAccResourceRedisCloudActiveActiveTransitGatewayAttachment_CRUDI"'

go_test_smoke_aa_enable_default_user:
name: go test smoke aa 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="TestAccResourceRedisCloudActiveActiveDatabase_enableDefaultUser"'

go_test_smoke_aa_db:
name: go test smoke aa db
needs: [go_build]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -115,7 +161,7 @@ jobs:

go_test_smoke_essentials_sub:
name: go test smoke essentials sub
needs: [go_build]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -139,7 +185,7 @@ jobs:

go_test_smoke_pro_db:
name: go test smoke pro db
needs: [go_build]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -151,7 +197,7 @@ jobs:

go_test_smoke_misc:
name: go test smoke misc
needs: [ go_build ]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -162,7 +208,7 @@ jobs:

go_test_pro_db_upgrade:
name: go test smoke pro db upgrade
needs: [ go_build ]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -173,7 +219,7 @@ jobs:

go_test_privatelink:
name: go test smoke privatelink
needs: [ go_build ]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -185,7 +231,7 @@ jobs:

go_test_block_public_endpoints:
name: go test smoke public endpoints
needs: [ go_build ]
needs: [go_unit_test, tfproviderlint, terraform_providers_schema]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -196,33 +242,11 @@ jobs:

go_test_smoke_qpf:
name: go test smoke query performance factor
needs: [ go_build ]
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
with:
go-version-file: go.mod
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_qpf"'

go_unit_test:
name: go unit test
needs: [go_build]
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: go test ./... -run="^TestUnit" # Runs tests starting with TestUnit

tfproviderlint:
name: tfproviderlint
needs: [go_build]
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: make tfproviderlint
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)


# 2.7.3 (6th November 2025)

## Changed
- Reworked the entire interaction between global/regional overrides and how they read config and state. This should fix many existing subtle state drift bugs.

## Fixed
- `rediscloud_active_active_subscription_database`: Fixed multiple issues concerning regional `enable_default_user` and `global_enable_default_user` to do with drift or incorrectly not detecting changes.
- The default for `global_enable_default_user` was omitted, it is now set to true.
- `rediscloud_active_active_transit_gateway_attachment`: Fixed parameter order bug in update operation.

## Testing
- Added acceptance tests covering `enable_default_user` inheritance and override scenarios
- Added acceptance test for `rediscloud_active_active_transit_gateway_attachment` resource lifecycle (Create/Read/Update/Delete/Import)

# 2.7.2 (3rd November 2025)

## Fixed
Expand Down
54 changes: 54 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,54 @@
# 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" "test" {
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 = "192.168.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" "test" {
subscription_id = rediscloud_active_active_subscription.test.id
name = local.database_name
dataset_size_in_gb = 1
global_password = local.password
global_enable_default_user = true

# us-east-1: explicitly true
override_region {
name = "us-east-1"
enable_default_user = true
}

# us-east-2: explicitly false
override_region {
name = "us-east-2"
enable_default_user = false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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" "test" {
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 = "192.168.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" "test" {
subscription_id = rediscloud_active_active_subscription.test.id
name = local.database_name
dataset_size_in_gb = 1
global_password = local.password
global_enable_default_user = false

# us-east-1: explicitly enable (override global false)
override_region {
name = "us-east-1"
enable_default_user = true
}

# us-east-2: inherit global=false
override_region {
name = "us-east-2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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" "test" {
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 = "192.168.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" "test" {
subscription_id = rediscloud_active_active_subscription.test.id
name = local.database_name
dataset_size_in_gb = 1
global_password = local.password
global_enable_default_user = true

# Both regions should inherit global=true
# Before fix: would send enableDefaultUser=false to API
# After fix: should NOT send enableDefaultUser at all
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,53 @@
# 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" "test" {
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 = "192.168.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" "test" {
subscription_id = rediscloud_active_active_subscription.test.id
name = local.database_name
dataset_size_in_gb = 1
global_password = local.password
global_enable_default_user = true

# us-east-1: explicitly disable (override global)
override_region {
name = "us-east-1"
enable_default_user = false
}

# us-east-2: inherit global=true
override_region {
name = "us-east-2"
}
}
Loading