Workaround to allow weight = 0 in Route53 RRs
Moved the GetOk to a Get in the set_identifier block so we can create a zero-weighted RR - otherwise this falls foul of a check in GetOk. See https://github.com/hashicorp/terraform/issues/3189
This commit is contained in:
parent
6cf126defa
commit
a0d9a4c96f
|
@ -407,12 +407,9 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) (
|
|||
rec.HealthCheckId = aws.String(v.(string))
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("weight"); ok {
|
||||
rec.Weight = aws.Int64(int64(v.(int)))
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("set_identifier"); ok {
|
||||
rec.SetIdentifier = aws.String(v.(string))
|
||||
rec.Weight = aws.Int64(int64(d.Get("weight").(int)))
|
||||
}
|
||||
|
||||
return rec, nil
|
||||
|
|
Loading…
Reference in New Issue