File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
internal/convert/testdata/adv2v2 Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 11resource "mongodbatlas_advanced_cluster" "dynamic_replication_specs" {
2+ lifecycle {
3+ precondition {
4+ condition = ! (var. auto_scaling_disk_gb_enabled && var. disk_size > 0 )
5+ error_message = " Must use either auto_scaling_disk_gb_enabled or disk_size, not both."
6+ }
7+ }
8+
29 project_id = var. project_id
310 name = var. cluster_name
411 cluster_type = " GEOSHARDED"
12+
13+ dynamic "tags" {
14+ for_each = var. tags
15+ content {
16+ key = tags. key
17+ value = tags. value
18+ }
19+ }
20+ tags {
21+ key = " Tag 2"
22+ value = " Value 2"
23+ }
24+
525 dynamic "replication_specs" {
626 for_each = var. replication_specs
727 content {
Original file line number Diff line number Diff line change 11resource "mongodbatlas_advanced_cluster" "dynamic_replication_specs" {
2+ lifecycle {
3+ precondition {
4+ condition = ! (var. auto_scaling_disk_gb_enabled && var. disk_size > 0 )
5+ error_message = " Must use either auto_scaling_disk_gb_enabled or disk_size, not both."
6+ }
7+ }
8+
29 project_id = var. project_id
310 name = var. cluster_name
411 cluster_type = " GEOSHARDED"
12+
13+
514 replication_specs = flatten ([
615 for spec in var . replication_specs : [
716 for i in range (spec. num_shards ) : {
@@ -24,6 +33,12 @@ resource "mongodbatlas_advanced_cluster" "dynamic_replication_specs" {
2433 }
2534 ]
2635 ])
36+ tags = merge (
37+ var. tags ,
38+ {
39+ " Tag 2" = " Value 2"
40+ }
41+ )
2742
2843 # Updated by atlas-cli-plugin-terraform, please review the changes.
2944}
You can’t perform that action at this time.
0 commit comments