mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
ROUTE53: Allow R53_ALIAS records to enable target health evaluation (#2649)
This commit is contained in:
@ -328,8 +328,14 @@ var R53_ALIAS = recordBuilder('R53_ALIAS', {
|
||||
record.target = args.target;
|
||||
if (_.isObject(record.r53_alias)) {
|
||||
record.r53_alias['type'] = args.type;
|
||||
if (!_.isString(record.r53_alias['evaluate_target_health'])) {
|
||||
record.r53_alias['evaluate_target_health'] = 'false';
|
||||
}
|
||||
} else {
|
||||
record.r53_alias = { type: args.type };
|
||||
record.r53_alias = {
|
||||
type: args.type,
|
||||
evaluate_target_health: 'false',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@ -347,6 +353,17 @@ function R53_ZONE(zone_id) {
|
||||
};
|
||||
}
|
||||
|
||||
// R53_EVALUATE_TARGET_HEALTH(enabled)
|
||||
function R53_EVALUATE_TARGET_HEALTH(enabled) {
|
||||
return function (r) {
|
||||
if (_.isObject(r.r53_alias)) {
|
||||
r.r53_alias['evaluate_target_health'] = enabled.toString();
|
||||
} else {
|
||||
r.r53_alias = { evaluate_target_health: enabled.toString() };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function validateR53AliasType(value) {
|
||||
if (!_.isString(value)) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user