mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
providers/aws: aws_elb: Allow alnum plus hyphen in name attribute
This commit is contained in:
parent
3d81d83d01
commit
0cbb815d28
@ -28,9 +28,9 @@ func resourceAwsElb() *schema.Resource {
|
|||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
||||||
value := v.(string)
|
value := v.(string)
|
||||||
if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) {
|
if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
"only alphanumeric characters and hyphens allowed in %q", k))
|
||||||
}
|
}
|
||||||
if len(value) > 32 {
|
if len(value) > 32 {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
|
Loading…
Reference in New Issue
Block a user