Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ECS cluster name validation #38993

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading