plain-night-8063
01/03/2020, 3:52 PMwhite-balloon-205
let failover = undefined; if (something) { failover = ... } new Record(... { failover: failover });
glamorous-printer-66548
01/03/2020, 4:29 PMfunction Record(type: string, record: string, failoverRoutingPolicies?: RecordFailoverRoutingPolicy[]) { return new aws.route53.Record(record, {
records: [record],
ttl: 300,
type: "A",
zoneId: aws_route53_zone_primary.zoneId,
});}
This then can be used like this:
Record('A', '1.2.3.4');
Record('CNAME', '<http://foo.com|foo.com>');
Record('CNAME', '<http://blabla.com|blabla.com>', {somepolicy});
const policy = {mypolicy}
and then pass it to the functionplain-night-8063
01/03/2020, 4:50 PM