Skip to content

Commit

Permalink
Fail if failover set when set_identifier unset
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundcraske-bjss authored and dharrisio committed Mar 29, 2016
1 parent 9982044 commit 082c7c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builtin/providers/aws/resource_aws_route53_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) (
}

if v, ok := d.GetOk("failover"); ok {
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 "failover" is set`, d.Get("name").(string))
}
rec.Failover = aws.String(v.(string))
}

Expand Down

0 comments on commit 082c7c1

Please sign in to comment.