@@ -12,19 +12,17 @@ import (
12
12
"strings"
13
13
"time"
14
14
15
- matlas "go.mongodb.org/atlas/mongodbatlas"
16
-
17
15
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
18
16
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
19
17
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
20
18
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
21
- "github.com/mwielbut/pointy"
22
- "github.com/spf13/cast"
23
-
24
19
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
25
20
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
26
21
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
27
22
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
23
+ "github.com/mwielbut/pointy"
24
+ "github.com/spf13/cast"
25
+ matlas "go.mongodb.org/atlas/mongodbatlas"
28
26
)
29
27
30
28
const (
@@ -153,8 +151,9 @@ func Resource() *schema.Resource {
153
151
Required : true ,
154
152
},
155
153
"provider_name" : {
156
- Type : schema .TypeString ,
157
- Required : true ,
154
+ Type : schema .TypeString ,
155
+ Required : true ,
156
+ ValidateDiagFunc : advancedcluster .StringIsUppercase (),
158
157
},
159
158
"pit_enabled" : {
160
159
Type : schema .TypeBool ,
@@ -235,8 +234,9 @@ func Resource() *schema.Resource {
235
234
Elem : & schema.Resource {
236
235
Schema : map [string ]* schema.Schema {
237
236
"region_name" : {
238
- Type : schema .TypeString ,
239
- Required : true ,
237
+ Type : schema .TypeString ,
238
+ Required : true ,
239
+ ValidateDiagFunc : advancedcluster .StringIsUppercase (),
240
240
},
241
241
"electable_nodes" : {
242
242
Type : schema .TypeInt ,
0 commit comments