mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #2523 from TimeIncOSS/aws-fix-elb-validation
aws: Fix validation for aws_elb.name
This commit is contained in:
commit
594f04e064
@ -28,7 +28,7 @@ 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-z-]+$`).MatchString(value) {
|
||||||
errors = append(errors, fmt.Errorf(
|
errors = append(errors, fmt.Errorf(
|
||||||
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
"only lowercase alphanumeric characters and hyphens allowed in %q", k))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user