Skip to content

Commit 92b2396

Browse files
authored
doc: Improves clarity in flex upgrade example (#3157)
* improve clarity in flex upgrade example * missing sentence * clarify in v2 examples
1 parent 5aeeab4 commit 92b2396

File tree

2 files changed

+180
-0
lines changed
  • examples
    • mongodbatlas_advanced_cluster (preview provider 2.0.0)/flex-upgrade
    • mongodbatlas_advanced_cluster/flex-upgrade

2 files changed

+180
-0
lines changed

examples/mongodbatlas_advanced_cluster (preview provider 2.0.0)/flex-upgrade/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,38 @@ provider_instance_size_name = "M0"
2929
node_count = null
3030
```
3131

32+
The configuration will be equivalent to:
33+
34+
```terraform
35+
resource "mongodbatlas_advanced_cluster" "cluster" {
36+
project_id = mongodbatlas_project.project.id
37+
name = "ClusterToUpgrade"
38+
cluster_type = "REPLICASET"
39+
40+
replication_specs = [
41+
{
42+
region_configs = [
43+
{
44+
electable_specs = {
45+
instance_size = "M0"
46+
node_count = null # equivalent to not setting a value
47+
}
48+
provider_name = "TENANT"
49+
backing_provider_name = "AWS"
50+
region_name = "US_EAST_1"
51+
priority = 7
52+
}
53+
]
54+
}
55+
]
56+
57+
tags = {
58+
key = "environment"
59+
value = "dev"
60+
}
61+
}
62+
```
63+
3264
Apply with the following `terraform.tfvars` to upgrade the free tier cluster you just created to flex tier:
3365
```
3466
atlas_org_id = <YOUR_ORG_ID>
@@ -39,6 +71,39 @@ backing_provider_name = "AWS"
3971
provider_instance_size_name = null
4072
node_count = null
4173
```
74+
75+
The configuration will be equivalent to:
76+
77+
```terraform
78+
resource "mongodbatlas_advanced_cluster" "cluster" {
79+
project_id = mongodbatlas_project.project.id
80+
name = "ClusterToUpgrade"
81+
cluster_type = "REPLICASET"
82+
83+
replication_specs = [
84+
{
85+
region_configs = [
86+
{
87+
electable_specs = {
88+
instance_size = null # equivalent to not setting a value
89+
node_count = null # equivalent to not setting a value
90+
}
91+
provider_name = "FLEX"
92+
backing_provider_name = "AWS"
93+
region_name = "US_EAST_1"
94+
priority = 7
95+
}
96+
]
97+
}
98+
]
99+
100+
tags = {
101+
key = "environment"
102+
value = "dev"
103+
}
104+
}
105+
```
106+
42107
Apply with the following `terraform.tfvars` to upgrade the flex tier cluster you just created to dedicated tier:
43108
```
44109
atlas_org_id = <YOUR_ORG_ID>
@@ -49,3 +114,35 @@ backing_provider_name = null
49114
provider_instance_size_name = "M10"
50115
node_count = 3
51116
```
117+
118+
The configuration will be equivalent to:
119+
120+
```terraform
121+
resource "mongodbatlas_advanced_cluster" "cluster" {
122+
project_id = mongodbatlas_project.project.id
123+
name = "ClusterToUpgrade"
124+
cluster_type = "REPLICASET"
125+
126+
replication_specs = [
127+
{
128+
region_configs = [
129+
{
130+
electable_specs = {
131+
instance_size = "M10"
132+
node_count = 3
133+
}
134+
provider_name = "AWS"
135+
backing_provider_name = null # equivalent to not setting a value
136+
region_name = "US_EAST_1"
137+
priority = 7
138+
}
139+
]
140+
}
141+
]
142+
143+
tags = {
144+
key = "environment"
145+
value = "dev"
146+
}
147+
}
148+
```

examples/mongodbatlas_advanced_cluster/flex-upgrade/README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,34 @@ provider_instance_size_name = "M0"
2424
node_count = null
2525
```
2626

27+
The configuration will be equivalent to:
28+
29+
```terraform
30+
resource "mongodbatlas_advanced_cluster" "cluster" {
31+
project_id = mongodbatlas_project.project.id
32+
name = "ClusterToUpgrade"
33+
cluster_type = "REPLICASET"
34+
35+
replication_specs {
36+
region_configs {
37+
electable_specs {
38+
instance_size = "M0"
39+
node_count = null # equivalent to not setting a value
40+
}
41+
provider_name = "TENANT"
42+
backing_provider_name = "AWS"
43+
region_name = "US_EAST_1"
44+
priority = 7
45+
}
46+
}
47+
48+
tags {
49+
key = "environment"
50+
value = "dev"
51+
}
52+
}
53+
```
54+
2755
Apply with the following `terraform.tfvars` to upgrade the free tier cluster you just created to flex tier:
2856
```
2957
atlas_org_id = <YOUR_ORG_ID>
@@ -34,6 +62,34 @@ backing_provider_name = "AWS"
3462
provider_instance_size_name = null
3563
node_count = null
3664
```
65+
66+
The configuration will be equivalent to:
67+
```terraform
68+
resource "mongodbatlas_advanced_cluster" "cluster" {
69+
project_id = mongodbatlas_project.project.id
70+
name = "ClusterToUpgrade"
71+
cluster_type = "REPLICASET"
72+
73+
replication_specs {
74+
region_configs {
75+
electable_specs {
76+
instance_size = null # equivalent to not setting a value
77+
node_count = null # equivalent to not setting a value
78+
}
79+
provider_name = "FLEX"
80+
backing_provider_name = "AWS"
81+
region_name = "US_EAST_1"
82+
priority = 7
83+
}
84+
}
85+
86+
tags {
87+
key = "environment"
88+
value = "dev"
89+
}
90+
}
91+
```
92+
3793
Apply with the following `terraform.tfvars` to upgrade the flex tier cluster you just created to dedicated tier:
3894
```
3995
atlas_org_id = <YOUR_ORG_ID>
@@ -43,4 +99,31 @@ provider_name = "AWS"
4399
backing_provider_name = null
44100
provider_instance_size_name = "M10"
45101
node_count = 3
102+
```
103+
104+
The configuration will be equivalent to:
105+
```terraform
106+
resource "mongodbatlas_advanced_cluster" "cluster" {
107+
project_id = mongodbatlas_project.project.id
108+
name = "ClusterToUpgrade"
109+
cluster_type = "REPLICASET"
110+
111+
replication_specs {
112+
region_configs {
113+
electable_specs {
114+
instance_size = "M10"
115+
node_count = 3
116+
}
117+
provider_name = "AWS"
118+
backing_provider_name = null # equivalent to not setting a value
119+
region_name = "US_EAST_1"
120+
priority = 7
121+
}
122+
}
123+
124+
tags {
125+
key = "environment"
126+
value = "dev"
127+
}
128+
}
46129
```

0 commit comments

Comments
 (0)