@@ -136,12 +136,9 @@ func ResourceTable() *schema.Resource {
136
136
Type : schema .TypeString ,
137
137
ForceNew : true ,
138
138
Required : true ,
139
- ValidateFunc : validation .All (
140
- validation .StringLenBetween (1 , 48 ),
141
- validation .StringMatch (
142
- regexp .MustCompile (`^[a-zA-Z0-9][a-zA-Z0-9_]{1,47}$` ),
143
- "The name must consist of alphanumerics and underscores." ,
144
- ),
139
+ ValidateFunc : validation .StringMatch (
140
+ regexp .MustCompile (`^[a-zA-Z0-9][a-zA-Z0-9_]{0,47}$` ),
141
+ "The keyspace name can have up to 48 characters. It must begin with an alpha-numeric character and can only contain alpha-numeric characters and underscores." ,
145
142
),
146
143
},
147
144
"point_in_time_recovery" : {
@@ -176,12 +173,9 @@ func ResourceTable() *schema.Resource {
176
173
Type : schema .TypeString ,
177
174
Required : true ,
178
175
ForceNew : true ,
179
- ValidateFunc : validation .All (
180
- validation .StringLenBetween (1 , 48 ),
181
- validation .StringMatch (
182
- regexp .MustCompile (`^[a-z0-9][a-z0-9_]{1,47}$` ),
183
- "The name must consist of lower case alphanumerics and underscores." ,
184
- ),
176
+ ValidateFunc : validation .StringMatch (
177
+ regexp .MustCompile (`^[a-z0-9_]{1,48}$` ),
178
+ "The column name can have up to 48 characters. It can only contain lowercase alpha-numeric characters and underscores." ,
185
179
),
186
180
},
187
181
"order_by" : {
@@ -201,12 +195,9 @@ func ResourceTable() *schema.Resource {
201
195
"name" : {
202
196
Type : schema .TypeString ,
203
197
Required : true ,
204
- ValidateFunc : validation .All (
205
- validation .StringLenBetween (1 , 48 ),
206
- validation .StringMatch (
207
- regexp .MustCompile (`^[a-z0-9][a-z0-9_]{1,47}$` ),
208
- "The name must consist of lower case alphanumerics and underscores." ,
209
- ),
198
+ ValidateFunc : validation .StringMatch (
199
+ regexp .MustCompile (`^[a-z0-9_]{1,48}$` ),
200
+ "The column name can have up to 48 characters. It can only contain lowercase alpha-numeric characters and underscores." ,
210
201
),
211
202
},
212
203
"type" : {
@@ -230,12 +221,9 @@ func ResourceTable() *schema.Resource {
230
221
Type : schema .TypeString ,
231
222
Required : true ,
232
223
ForceNew : true ,
233
- ValidateFunc : validation .All (
234
- validation .StringLenBetween (1 , 48 ),
235
- validation .StringMatch (
236
- regexp .MustCompile (`^[a-z0-9][a-z0-9_]{1,47}$` ),
237
- "The name must consist of lower case alphanumerics and underscores." ,
238
- ),
224
+ ValidateFunc : validation .StringMatch (
225
+ regexp .MustCompile (`^[a-z0-9_]{1,48}$` ),
226
+ "The column name can have up to 48 characters. It can only contain lowercase alpha-numeric characters and underscores." ,
239
227
),
240
228
},
241
229
},
@@ -251,12 +239,9 @@ func ResourceTable() *schema.Resource {
251
239
Type : schema .TypeString ,
252
240
Required : true ,
253
241
ForceNew : true ,
254
- ValidateFunc : validation .All (
255
- validation .StringLenBetween (1 , 48 ),
256
- validation .StringMatch (
257
- regexp .MustCompile (`^[a-z0-9][a-z0-9_]{1,47}$` ),
258
- "The name must consist of lower case alphanumerics and underscores." ,
259
- ),
242
+ ValidateFunc : validation .StringMatch (
243
+ regexp .MustCompile (`^[a-z0-9_]{1,48}$` ),
244
+ "The column name can have up to 48 characters. It can only contain lowercase alpha-numeric characters and underscores." ,
260
245
),
261
246
},
262
247
},
@@ -269,12 +254,9 @@ func ResourceTable() *schema.Resource {
269
254
Type : schema .TypeString ,
270
255
ForceNew : true ,
271
256
Required : true ,
272
- ValidateFunc : validation .All (
273
- validation .StringLenBetween (1 , 48 ),
274
- validation .StringMatch (
275
- regexp .MustCompile (`^[a-zA-Z0-9][a-zA-Z0-9_]{1,47}$` ),
276
- "The name must consist of alphanumerics and underscores." ,
277
- ),
257
+ ValidateFunc : validation .StringMatch (
258
+ regexp .MustCompile (`^[a-zA-Z0-9_]{1,48}$` ),
259
+ "The table name can have up to 48 characters. It can only contain alpha-numeric characters and underscores." ,
278
260
),
279
261
},
280
262
names .AttrTags : tftags .TagsSchema (),
0 commit comments