UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

92 lines 3.47 kB
"use strict"; // *** 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.getIpRangesOutput = exports.getIpRanges = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const europeanEc2 = aws.getIpRanges({ * regions: [ * "eu-west-1", * "eu-central-1", * ], * services: ["ec2"], * }); * const fromEurope = new aws.ec2.SecurityGroup("from_europe", { * name: "from_europe", * ingress: [{ * fromPort: 443, * toPort: 443, * protocol: "tcp", * cidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.cidrBlocks), * ipv6CidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.ipv6CidrBlocks), * }], * tags: { * CreateDate: europeanEc2.then(europeanEc2 => europeanEc2.createDate), * SyncToken: europeanEc2.then(europeanEc2 => europeanEc2.syncToken), * }, * }); * ``` */ function getIpRanges(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:index/getIpRanges:getIpRanges", { "id": args.id, "regions": args.regions, "services": args.services, "url": args.url, }, opts); } exports.getIpRanges = getIpRanges; /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const europeanEc2 = aws.getIpRanges({ * regions: [ * "eu-west-1", * "eu-central-1", * ], * services: ["ec2"], * }); * const fromEurope = new aws.ec2.SecurityGroup("from_europe", { * name: "from_europe", * ingress: [{ * fromPort: 443, * toPort: 443, * protocol: "tcp", * cidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.cidrBlocks), * ipv6CidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.ipv6CidrBlocks), * }], * tags: { * CreateDate: europeanEc2.then(europeanEc2 => europeanEc2.createDate), * SyncToken: europeanEc2.then(europeanEc2 => europeanEc2.syncToken), * }, * }); * ``` */ function getIpRangesOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:index/getIpRanges:getIpRanges", { "id": args.id, "regions": args.regions, "services": args.services, "url": args.url, }, opts); } exports.getIpRangesOutput = getIpRangesOutput; //# sourceMappingURL=getIpRanges.js.map