UNPKG

@csermet/multiprovider

Version:

cloud-graph provider plugin for AWS used to fetch AWS cloud data.

25 lines (24 loc) 860 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const format_1 = require("../../utils/format"); const generateArns_1 = require("../../utils/generateArns"); /** * Vpn Gateway */ exports.default = ({ service: rawData, account, region, }) => { const { State: state, Type: type, VpcAttachments: vpcAttachments, VpnGatewayId: vpnGatewayId, AmazonSideAsn: amazonSideAsn, Tags: tags, } = rawData; // Vpn Gateway Tags const vpnGatewayTags = format_1.formatTagsFromMap(tags); const vpnGateway = { id: vpnGatewayId, accountId: account, arn: generateArns_1.vpnGatewayArn({ region, account, id: vpnGatewayId }), region, type, state, amazonSideAsn, vpcIds: vpcAttachments.map(({ VpcId }) => VpcId), tags: vpnGatewayTags, }; return vpnGateway; };