-
Notifications
You must be signed in to change notification settings - Fork 22
fix: default user override #707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
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 5801b31
fix: remove default from cmk fields as can't have computed and default
burythehammer 33072ce
fix: also update AA subscription and schema description
burythehammer a646e03
docs: fixed incorrect documentation regarding aws_account_id
burythehammer 57a885c
fix: removing override for default users so that users do not have to…
burythehammer 1bf4cd4
fix: tests have now properly randomised db and sub names
burythehammer c722762
fix: global data persistance should be computed, adding tflog for deb…
burythehammer 554a721
chore: add new tests to smoke tests
burythehammer 87a6efc
chore: bump rediscloud-go-api
burythehammer 39944a8
test: additional scenarios for test coverage plus api checks
burythehammer a93d8c8
docs: changelog
burythehammer e388d0d
chore: fix test and slight tweak to sweep error returning
burythehammer e708a7e
chore: fixed some test names and ensured tests always run in smoke tests
burythehammer 3080e39
chore: removing qpf smoke test from pr
burythehammer f977ed5
chore: adding force flag to sweep
burythehammer 259f8e4
fix: piping input through env variable instead of shell expansion
burythehammer 7623606
test: debug tests and version fix
burythehammer d5c62af
fix: source_ips showing erronous drift when not in same order
burythehammer 7375664
chore: debug tests
burythehammer 61736ea
chore: fixing debug test
burythehammer fd09b6d
chore: fixing debug test
burythehammer 4d71371
wip
burythehammer 1a31001
wip: import tests
burythehammer dd3da31
fix: when importing use global api value
burythehammer 6f24741
chore: adding note that test does not currently work due to limitations
burythehammer 169f545
chore: small tweaks
burythehammer 8537bcd
chore: adding nil checkdestroy to satisfy build
burythehammer 1d47883
chore: temporary reprioritisation of smoke tests to focus on current …
burythehammer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
provider/activeactive/testdata/enable_default_user_all_explicit.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } |
55 changes: 55 additions & 0 deletions
55
provider/activeactive/testdata/enable_default_user_global_false_inherit.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| } |
57 changes: 57 additions & 0 deletions
57
provider/activeactive/testdata/enable_default_user_global_false_region_false.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.