-
Notifications
You must be signed in to change notification settings - Fork 197
refactor: Uses new plan modify logic common functions in advanced_cluster TPF #3218
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
Open
EspenAlbert
wants to merge
12
commits into
CLOUDP-307851_common_plan_modifier_logic
Choose a base branch
from
CLOUDP-308782_copy_unknowns_and_block_removal
base: CLOUDP-307851_common_plan_modifier_logic
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
851b0ed
refactor: Use new plan modifier helper functions
EspenAlbert b578282
chore: fix lint error
EspenAlbert 2d62230
test: relax match expression to avoid Attribute 'mongo_db_major_versi…
EspenAlbert 5e9e870
test: improve unknown spec replacement to respect changes and auto_sc…
EspenAlbert b903253
refactor: use existing req.Plan instead of resp.Plan
EspenAlbert e7e7a04
chore: increase unit test timeout
EspenAlbert fb9e9f8
doc: Add docstring for `AddReplacement`
EspenAlbert 9e8a54b
Merge branch 'CLOUDP-307851_common_plan_modifier_logic' into CLOUDP-3…
EspenAlbert 985adbf
Merge branch 'CLOUDP-307851_common_plan_modifier_logic' into CLOUDP-3…
EspenAlbert bc68416
refactor: remove unused variable in plan_modifier_test.go
EspenAlbert a191863
fix: Only copy auto_scaling if specific values are set
EspenAlbert 9a80078
refactor: remove unused state checks in advanced cluster test
EspenAlbert 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
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
412 changes: 412 additions & 0 deletions
412
internal/service/advancedcluster/testdata/TestAccAdvancedCluster_removeBlocksFromConfig.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
26 changes: 26 additions & 0 deletions
26
...rvice/advancedclustertpf/testdata/ClusterReplicasetOneRegion/main_cluster_type_changed.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,26 @@ | ||
resource "mongodbatlas_advanced_cluster" "test" { | ||
project_id = "111111111111111111111111" | ||
name = "mocked-cluster" | ||
cluster_type = "SHARDED" | ||
|
||
replication_specs = [{ | ||
region_configs = [{ | ||
auto_scaling = { | ||
compute_enabled = false | ||
compute_scale_down_enabled = false | ||
disk_gb_enabled = true | ||
} | ||
electable_specs = { | ||
disk_size_gb = 10 | ||
instance_size = "M10" | ||
node_count = 3 | ||
} | ||
priority = 7 | ||
provider_name = "AWS" | ||
region_name = "US_EAST_1" | ||
}] | ||
}] | ||
timeouts = { | ||
create = "6000s" | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...dvancedclustertpf/testdata/ClusterReplicasetOneRegion/main_electable_disk_size_changed.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,26 @@ | ||
resource "mongodbatlas_advanced_cluster" "test" { | ||
project_id = "111111111111111111111111" | ||
name = "mocked-cluster" | ||
cluster_type = "REPLICASET" | ||
|
||
replication_specs = [{ | ||
region_configs = [{ | ||
auto_scaling = { | ||
compute_enabled = false | ||
compute_scale_down_enabled = false | ||
disk_gb_enabled = true | ||
} | ||
electable_specs = { | ||
disk_size_gb = 99 | ||
instance_size = "M10" | ||
node_count = 3 | ||
} | ||
priority = 7 | ||
provider_name = "AWS" | ||
region_name = "US_EAST_1" | ||
}] | ||
}] | ||
timeouts = { | ||
create = "6000s" | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
internal/service/advancedclustertpf/testdata/ClusterReplicasetOneRegion/main_pin_fcv.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,30 @@ | ||
resource "mongodbatlas_advanced_cluster" "test" { | ||
project_id = "111111111111111111111111" | ||
name = "mocked-cluster" | ||
cluster_type = "REPLICASET" | ||
|
||
pinned_fcv = { | ||
expiration_date = "2025-04-03T00:00:00Z" | ||
} | ||
|
||
replication_specs = [{ | ||
region_configs = [{ | ||
auto_scaling = { | ||
compute_enabled = false | ||
compute_scale_down_enabled = false | ||
disk_gb_enabled = true | ||
} | ||
electable_specs = { | ||
disk_size_gb = 10 | ||
instance_size = "M10" | ||
node_count = 3 | ||
} | ||
priority = 7 | ||
provider_name = "AWS" | ||
region_name = "US_EAST_1" | ||
}] | ||
}] | ||
timeouts = { | ||
create = "6000s" | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...ncedclustertpf/testdata/ClusterReplicasetOneRegion/main_tls_cipher_config_mode_changed.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,29 @@ | ||
resource "mongodbatlas_advanced_cluster" "test" { | ||
project_id = "111111111111111111111111" | ||
name = "mocked-cluster" | ||
cluster_type = "REPLICASET" | ||
|
||
replication_specs = [{ | ||
region_configs = [{ | ||
auto_scaling = { | ||
compute_enabled = false | ||
compute_scale_down_enabled = false | ||
disk_gb_enabled = true | ||
} | ||
electable_specs = { | ||
disk_size_gb = 10 | ||
instance_size = "M10" | ||
node_count = 3 | ||
} | ||
priority = 7 | ||
provider_name = "AWS" | ||
region_name = "US_EAST_1" | ||
}] | ||
}] | ||
timeouts = { | ||
create = "6000s" | ||
} | ||
advanced_configuration = { | ||
tls_cipher_config_mode = "CUSTOM" | ||
} | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: these changes are not necessary once you rebase with master including #3211