Skip to content

Commit de0a302

Browse files
resource/alicloud_rds_account: account_name supports case sensitivity.
1 parent 1e36241 commit de0a302

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

alicloud/resource_alicloud_rds_account.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ func resourceAlicloudRdsAccount() *schema.Resource {
4646
Optional: true,
4747
Computed: true,
4848
ForceNew: true,
49-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-z][a-z0-9_]{0,61}[a-z0-9]$`), "The name can consist of lowercase letters, numbers, underscores, and must begin with letters and end with letters or numbers"),
49+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_]{0,61}[a-zA-Z0-9]$`), "The name can consist of letters, numbers, underscores, and must begin with letters and end with letters or numbers"),
5050
ConflictsWith: []string{"name"},
5151
},
5252
"name": {
5353
Type: schema.TypeString,
5454
Optional: true,
5555
Computed: true,
5656
ForceNew: true,
57-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-z][a-z0-9_]{0,61}[a-z0-9]$`), "The name can consist of lowercase letters, numbers, underscores, and must begin with letters and end with letters or numbers"),
57+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_]{0,61}[a-zA-Z0-9]$`), "The name can consist of letters, numbers, underscores, and must begin with letters and end with letters or numbers"),
5858
Deprecated: "Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.",
5959
ConflictsWith: []string{"account_name"},
6060
},

alicloud/resource_alicloud_rds_account_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestAccAliCloudRdsAccount_basic(t *testing.T) {
2929
rac := resourceAttrCheckInit(rc, ra)
3030
testAccCheck := rac.resourceAttrMapUpdateSet()
3131
rand := acctest.RandIntRange(10000, 99999)
32-
name := fmt.Sprintf("tf-testacc%srdsaccount%d", defaultRegionToTest, rand)
32+
name := fmt.Sprintf("tf-Testacc%srdsaccount%d", defaultRegionToTest, rand)
3333
testAccConfig := resourceTestAccConfigFunc(resourceId, name, AlicloudRdsAccountBasicDependence0)
3434
resource.Test(t, resource.TestCase{
3535
PreCheck: func() {

0 commit comments

Comments
 (0)