Skip to content

Commit

Permalink
add validation to elb name to not begin with "internal-" into validat…
Browse files Browse the repository at this point in the history
…eElbName
  • Loading branch information
kangaechu committed Dec 10, 2020
1 parent 57988db commit 59b790a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ func validateElbName(v interface{}, k string) (ws []string, errors []error) {
errors = append(errors, fmt.Errorf(
"%q cannot end with a hyphen: %q", k, value))
}
if strings.HasPrefix(value, "internal-") {
errors = append(errors, fmt.Errorf(
"%q cannot begin with `internal-`: %q", k, value))
}
return
}

Expand Down

0 comments on commit 59b790a

Please sign in to comment.