Merge pull request #2519 from TimeIncOSS/f-aws-lc-validation
provider/aws: Add validation for aws_launch_configuration
This commit is contained in:
commit
9528ff1e0a
|
@ -30,6 +30,15 @@ func resourceAwsLaunchConfiguration() *schema.Resource {
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
|
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
|
||||||
|
// https://github.com/boto/botocore/blob/9f322b1/botocore/data/autoscaling/2011-01-01/service-2.json#L1932-L1939
|
||||||
|
value := v.(string)
|
||||||
|
if len(value) > 255 {
|
||||||
|
errors = append(errors, fmt.Errorf(
|
||||||
|
"%q cannot be longer than 255 characters", k))
|
||||||
|
}
|
||||||
|
return
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
"image_id": &schema.Schema{
|
"image_id": &schema.Schema{
|
||||||
|
|
Loading…
Reference in New Issue