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

service/ssm: tech debt: fix V001 errors #23082

Merged
merged 2 commits into from
Feb 9, 2022
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
13 changes: 8 additions & 5 deletions internal/service/ssm/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ func ResourceDocument() *schema.Resource {
Computed: true,
},
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validName,
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.All(
validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9_\-.]+$`), "must contain only alphanumeric, underscore, hyphen, or period characters"),
validation.StringLenBetween(3, 128),
),
},
"attachments_source": {
Type: schema.TypeList,
Expand All @@ -59,7 +62,7 @@ func ResourceDocument() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.All(
validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`), "must contain only alphanumeric, underscore, hyphen, or period characters"),
validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9_\-.]+$`), "must contain only alphanumeric, underscore, hyphen, or period characters"),
validation.StringLenBetween(3, 128),
),
},
Expand Down
19 changes: 0 additions & 19 deletions internal/service/ssm/validate.go

This file was deleted.

31 changes: 0 additions & 31 deletions internal/service/ssm/validate_test.go

This file was deleted.