-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Don't use num_shards and root disk_size_gb in conversion #65
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
Changes from all commits
e6484d1
2b9facc
8f5149b
f5d5ae3
03bd5e5
88289ce
29c0a50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| resource "mongodbatlas_advanced_cluster" "clu" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| disk_size_gb = 100 | ||
| replication_specs { | ||
| region_configs { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| } | ||
| } | ||
| region_configs { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "clu_var" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| disk_size_gb = var.disk_size_gb | ||
| replication_specs { | ||
| region_configs { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| } | ||
| } | ||
| region_configs { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs { | ||
| disk_size_gb = 123 # will be ignored and root value will be used instead | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "clu_keep" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| replication_specs { | ||
| region_configs { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| } | ||
| } | ||
| region_configs { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs { | ||
| disk_size_gb = 123 # will be kept as root value is not defined | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "auto" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| disk_size_gb = 100 | ||
| replication_specs { | ||
| region_configs { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| } | ||
| read_only_specs { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| analytics_specs { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| auto_scaling { | ||
| disk_gb_enabled = true # auto_scaling won't get disk_size_gb | ||
| } | ||
| analytics_auto_scaling { | ||
| compute_enabled = true # analytics_auto_scaling won't get disk_size_gb | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| resource "mongodbatlas_advanced_cluster" "clu" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| replication_specs = [ | ||
| { | ||
| region_configs = [ | ||
| { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| disk_size_gb = 100 | ||
| } | ||
| }, | ||
| { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| disk_size_gb = 100 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
|
|
||
| # Updated by atlas-cli-plugin-terraform, please review the changes. | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "clu_var" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| replication_specs = [ | ||
| { | ||
| region_configs = [ | ||
| { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| disk_size_gb = var.disk_size_gb | ||
| } | ||
| }, | ||
| { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| disk_size_gb = var.disk_size_gb | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
|
|
||
| # Updated by atlas-cli-plugin-terraform, please review the changes. | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "clu_keep" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| replication_specs = [ | ||
| { | ||
| region_configs = [ | ||
| { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| } | ||
| }, | ||
| { | ||
| priority = 6 | ||
| provider_name = "AWS" | ||
| region_name = "US_WEST_2" | ||
| electable_specs = { | ||
| disk_size_gb = 123 # will be kept as root value is not defined | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
|
|
||
| # Updated by atlas-cli-plugin-terraform, please review the changes. | ||
| } | ||
|
|
||
| resource "mongodbatlas_advanced_cluster" "auto" { | ||
| project_id = var.project_id | ||
| name = "clu" | ||
| cluster_type = "SHARDED" | ||
| replication_specs = [ | ||
| { | ||
| region_configs = [ | ||
| { | ||
| priority = 7 | ||
| provider_name = "AWS" | ||
| region_name = "US_EAST_1" | ||
| electable_specs = { | ||
| instance_size = "M10" | ||
| node_count = 2 | ||
| disk_size_gb = 100 | ||
| } | ||
| read_only_specs = { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| disk_size_gb = 100 | ||
| } | ||
| analytics_specs = { | ||
| instance_size = "M10" | ||
| node_count = 1 | ||
| disk_size_gb = 100 | ||
| } | ||
| auto_scaling = { | ||
| disk_gb_enabled = true # auto_scaling won't get disk_size_gb | ||
| } | ||
| analytics_auto_scaling = { | ||
| compute_enabled = true # analytics_auto_scaling won't get disk_size_gb | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
|
|
||
| # Updated by atlas-cli-plugin-terraform, please review the changes. | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| { | ||
| "configuration_file_error": "failed to parse Terraform config file", | ||
| "replication_specs_missing_region_configs": "replication_specs must have at least one region_configs", | ||
| "missing_replication_specs": "must have at least one replication_specs" | ||
| "missing_replication_specs": "must have at least one replication_specs", | ||
| "num_shards_not_numerical": "setting num_shards: failed to evaluate number" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure the full context of this error, but not sure how I would fix it 😅
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as in the other command we distinguish two main use cases:
see PR description note for more info
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the explanation! |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.