Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 3x 3x 7x 3x 6x 6x 6x 6x 6x 3x 1x | const DNS_UPDATE_ROLE_SUFFIX = '-dns-update';
export const getDNSUpdateRoleNameFromSubZoneName = (subZoneName: string) => {
return `${subZoneName}${DNS_UPDATE_ROLE_SUFFIX}`.toLocaleLowerCase();
}
export const getSubdomainPrefix = (accountName: string | undefined, accountStageName: string | undefined) => {
Iif(!accountName) {
throw new Error(`accountName needs to be provided. aborting.`);
}
let prefix: string = accountStageName ? accountStageName : accountName!;
prefix = prefix.toLowerCase();
prefix = prefix.replace(' ', '-');
return prefix;
}
export const getDNSUpdateRoleNameFromServiceRecordName = (serviceRecordName: string) => {
// Keep only the root domain as it is used for the role name "landingpage.dev.ilovemylocalfarmer.dev".split('.').splice(1).join('.') => 'dev.ilovemylocalfarmer.dev'
return getDNSUpdateRoleNameFromSubZoneName(serviceRecordName
.split(".")
.splice(1)
.join("."));
} |