Fail when weight set and set_identifier not set

Resolves https://github.com/hashicorp/terraform/issues/5776
pull/5777/head
edmundcraske 10 years ago
parent a6f6f0da55
commit 4aa7d4f7db

@ -468,6 +468,9 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) (
w := d.Get("weight").(int)
if w > -1 {
if _, ok := d.GetOk("set_identifier"); !ok {
return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "weight" is set`, d.Get("name").(string))
}
rec.Weight = aws.Int64(int64(w))
}

Loading…
Cancel
Save