Skip to content

Commit

Permalink
Merge pull request #38993 from gregops312/b-ecs-cluster-name-validation
Browse files Browse the repository at this point in the history
Update ECS cluster name validation
  • Loading branch information
gdavison authored Sep 24, 2024
2 parents 0544142 + e52f676 commit 14302b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changelog/38993.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:bug
resource/aws_ecs_cluster: Fix validation error with `name` attribute.
```

```release-note:bug
resource/aws_ecs_cluster_capacity_providers: Fix validation error with `name` attribute.
```
2 changes: 1 addition & 1 deletion internal/service/ecs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func validateClusterName(v interface{}, k string) (ws []string, errors []error)
return validation.All(
validation.StringLenBetween(1, 255),
validation.StringMatch(
regexache.MustCompile("[0-9A-Za-z_-]+"),
regexache.MustCompile("^[0-9A-Za-z_-]+$"),
"The cluster name must consist of alphanumerics, hyphens, and underscores."),
)(v, k)
}
Expand Down

0 comments on commit 14302b4

Please sign in to comment.