@csermet/multiprovider
Version:
cloud-graph provider plugin for AWS used to fetch AWS cloud data.
24 lines (23 loc) • 816 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const format_1 = require("../../utils/format");
const generateArns_1 = require("../../utils/generateArns");
/**
* Customer Gateway
*/
exports.default = ({ service: rawData, account, region, }) => {
const { BgpAsn: bgpAsn, CustomerGatewayId: customerGatewayId, IpAddress: ipAddress, Type: type, Tags: tags, } = rawData;
// Customer Gateway Tags
const customerGatewayTags = format_1.formatTagsFromMap(tags);
const customerGateway = {
id: customerGatewayId,
accountId: account,
arn: generateArns_1.customerGatewayArn({ region, account, id: customerGatewayId }),
region,
type,
bgpAsn,
ipAddress,
tags: customerGatewayTags,
};
return customerGateway;
};