@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
104 lines • 4.28 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRouteOutput = exports.getRoute = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* `aws.ec2.Route` provides details about a specific Route.
*
* This resource can prove useful when finding the resource associated with a CIDR. For example, finding the peering connection associated with a CIDR value.
*
* ## Example Usage
*
* The following example shows how one might use a CIDR value to find a network interface id and use this to create a data source of that network interface.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const config = new pulumi.Config();
* const subnetId = config.requireObject<any>("subnetId");
* const selected = aws.ec2.getRouteTable({
* subnetId: subnetId,
* });
* const route = aws.ec2.getRoute({
* routeTableId: selectedAwsRouteTable.id,
* destinationCidrBlock: "10.0.1.0/24",
* });
* const _interface = route.then(route => aws.ec2.getNetworkInterface({
* id: route.networkInterfaceId,
* }));
* ```
*/
function getRoute(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getRoute:getRoute", {
"carrierGatewayId": args.carrierGatewayId,
"coreNetworkArn": args.coreNetworkArn,
"destinationCidrBlock": args.destinationCidrBlock,
"destinationIpv6CidrBlock": args.destinationIpv6CidrBlock,
"destinationPrefixListId": args.destinationPrefixListId,
"egressOnlyGatewayId": args.egressOnlyGatewayId,
"gatewayId": args.gatewayId,
"instanceId": args.instanceId,
"localGatewayId": args.localGatewayId,
"natGatewayId": args.natGatewayId,
"networkInterfaceId": args.networkInterfaceId,
"region": args.region,
"routeTableId": args.routeTableId,
"transitGatewayId": args.transitGatewayId,
"vpcPeeringConnectionId": args.vpcPeeringConnectionId,
}, opts);
}
exports.getRoute = getRoute;
/**
* `aws.ec2.Route` provides details about a specific Route.
*
* This resource can prove useful when finding the resource associated with a CIDR. For example, finding the peering connection associated with a CIDR value.
*
* ## Example Usage
*
* The following example shows how one might use a CIDR value to find a network interface id and use this to create a data source of that network interface.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const config = new pulumi.Config();
* const subnetId = config.requireObject<any>("subnetId");
* const selected = aws.ec2.getRouteTable({
* subnetId: subnetId,
* });
* const route = aws.ec2.getRoute({
* routeTableId: selectedAwsRouteTable.id,
* destinationCidrBlock: "10.0.1.0/24",
* });
* const _interface = route.then(route => aws.ec2.getNetworkInterface({
* id: route.networkInterfaceId,
* }));
* ```
*/
function getRouteOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getRoute:getRoute", {
"carrierGatewayId": args.carrierGatewayId,
"coreNetworkArn": args.coreNetworkArn,
"destinationCidrBlock": args.destinationCidrBlock,
"destinationIpv6CidrBlock": args.destinationIpv6CidrBlock,
"destinationPrefixListId": args.destinationPrefixListId,
"egressOnlyGatewayId": args.egressOnlyGatewayId,
"gatewayId": args.gatewayId,
"instanceId": args.instanceId,
"localGatewayId": args.localGatewayId,
"natGatewayId": args.natGatewayId,
"networkInterfaceId": args.networkInterfaceId,
"region": args.region,
"routeTableId": args.routeTableId,
"transitGatewayId": args.transitGatewayId,
"vpcPeeringConnectionId": args.vpcPeeringConnectionId,
}, opts);
}
exports.getRouteOutput = getRouteOutput;
//# sourceMappingURL=getRoute.js.map