mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Fail if failover set when set_identifier unset
Added as per https://github.com/hashicorp/terraform/pull/5777#issuecomment-199802514
This commit is contained in:
parent
4aa7d4f7db
commit
edbc4fad13
@ -455,6 +455,9 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("failover"); ok {
|
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))
|
rec.Failover = aws.String(v.(string))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user