GetFastlyIpRanges

Use this data source to get the IP ranges of Fastly edge nodes.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;
using Fastly = Pulumi.Fastly;

class MyStack : Stack
{
    public MyStack()
    {
        var fastly = Output.Create(Fastly.GetFastlyIpRanges.InvokeAsync());
        var fromFastly = new Aws.Ec2.SecurityGroup("fromFastly", new Aws.Ec2.SecurityGroupArgs
        {
            Ingress = 
            {
                new Aws.Ec2.Inputs.SecurityGroupIngressArgs
                {
                    CidrBlocks = fastly.Apply(fastly => fastly.CidrBlocks),
                    FromPort = 443,
                    Ipv6CidrBlocks = fastly.Apply(fastly => fastly.Ipv6CidrBlocks),
                    Protocol = "tcp",
                    ToPort = 443,
                },
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_aws as aws
import pulumi_fastly as fastly

fastly = fastly.get_fastly_ip_ranges()
from_fastly = aws.ec2.SecurityGroup("fromFastly", ingress=[{
    "cidr_blocks": fastly.cidr_blocks,
    "from_port": "443",
    "ipv6_cidr_blocks": fastly.ipv6_cidr_blocks,
    "protocol": "tcp",
    "to_port": "443",
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fastly from "@pulumi/fastly";

const fastlyFastlyIpRanges = pulumi.output(fastly.getFastlyIpRanges({ async: true }));
const fromFastly = new aws.ec2.SecurityGroup("from_fastly", {
    ingress: [{
        cidrBlocks: fastlyFastlyIpRanges.cidrBlocks,
        fromPort: 443,
        ipv6CidrBlocks: fastlyFastlyIpRanges.ipv6CidrBlocks,
        protocol: "tcp",
        toPort: 443,
    }],
});

Using GetFastlyIpRanges

function getFastlyIpRanges(opts?: InvokeOptions): Promise<GetFastlyIpRangesResult>
function  get_fastly_ip_ranges(opts=None)
func GetFastlyIpRanges(ctx *Context, opts ...InvokeOption) (*GetFastlyIpRangesResult, error)
public static class GetFastlyIpRanges {
    public static Task<GetFastlyIpRangesResult> InvokeAsync(InvokeOptions? opts = null)
}

GetFastlyIpRanges Result

The following output properties are available:

CidrBlocks List<string>

The lexically ordered list of ipv4 CIDR blocks.

Id string

The provider-assigned unique ID for this managed resource.

Ipv6CidrBlocks List<string>

The lexically ordered list of ipv6 CIDR blocks.

CidrBlocks []string

The lexically ordered list of ipv4 CIDR blocks.

Id string

The provider-assigned unique ID for this managed resource.

Ipv6CidrBlocks []string

The lexically ordered list of ipv6 CIDR blocks.

cidrBlocks string[]

The lexically ordered list of ipv4 CIDR blocks.

id string

The provider-assigned unique ID for this managed resource.

ipv6CidrBlocks string[]

The lexically ordered list of ipv6 CIDR blocks.

cidr_blocks List[str]

The lexically ordered list of ipv4 CIDR blocks.

id str

The provider-assigned unique ID for this managed resource.

ipv6_cidr_blocks List[str]

The lexically ordered list of ipv6 CIDR blocks.

Package Details

Repository
https://github.com/pulumi/pulumi-fastly
License
Apache-2.0
Notes
This Pulumi package is based on the fastly Terraform Provider.