Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi
fastly.getFastlyIpRanges
Use this data source to get the IP ranges of Fastly edge nodes.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fastly from "@pulumi/fastly";
const fastly = fastly.getFastlyIpRanges({});
const fromFastly = new aws.index.SecurityGroup("from_fastly", {
name: "from_fastly",
ingress: [{
fromPort: "443",
toPort: "443",
protocol: "tcp",
cidrBlocks: fastly.cidrBlocks,
ipv6CidrBlocks: fastly.ipv6CidrBlocks,
}],
});
import pulumi
import pulumi_aws as aws
import pulumi_fastly as fastly
fastly = fastly.get_fastly_ip_ranges()
from_fastly = aws.index.SecurityGroup("from_fastly",
name=from_fastly,
ingress=[{
fromPort: 443,
toPort: 443,
protocol: tcp,
cidrBlocks: fastly.cidr_blocks,
ipv6CidrBlocks: fastly.ipv6_cidr_blocks,
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fastly, err := fastly.GetFastlyIpRanges(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
_, err = aws.NewSecurityGroup(ctx, "from_fastly", &aws.SecurityGroupArgs{
Name: "from_fastly",
Ingress: []map[string]interface{}{
map[string]interface{}{
"fromPort": "443",
"toPort": "443",
"protocol": "tcp",
"cidrBlocks": fastly.CidrBlocks,
"ipv6CidrBlocks": fastly.Ipv6CidrBlocks,
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var fastly = Fastly.GetFastlyIpRanges.Invoke();
var fromFastly = new Aws.Index.SecurityGroup("from_fastly", new()
{
Name = "from_fastly",
Ingress = new[]
{
{
{ "fromPort", "443" },
{ "toPort", "443" },
{ "protocol", "tcp" },
{ "cidrBlocks", fastly.Apply(getFastlyIpRangesResult => getFastlyIpRangesResult.CidrBlocks) },
{ "ipv6CidrBlocks", fastly.Apply(getFastlyIpRangesResult => getFastlyIpRangesResult.Ipv6CidrBlocks) },
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.FastlyFunctions;
import com.pulumi.aws.securityGroup;
import com.pulumi.aws.securityGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var fastly = FastlyFunctions.getFastlyIpRanges(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var fromFastly = new SecurityGroup("fromFastly", SecurityGroupArgs.builder()
.name("from_fastly")
.ingress(List.of(Map.ofEntries(
Map.entry("fromPort", "443"),
Map.entry("toPort", "443"),
Map.entry("protocol", "tcp"),
Map.entry("cidrBlocks", fastly.cidrBlocks()),
Map.entry("ipv6CidrBlocks", fastly.ipv6CidrBlocks())
)))
.build());
}
}
resources:
fromFastly:
type: aws:securityGroup
name: from_fastly
properties:
name: from_fastly
ingress:
- fromPort: '443'
toPort: '443'
protocol: tcp
cidrBlocks: ${fastly.cidrBlocks}
ipv6CidrBlocks: ${fastly.ipv6CidrBlocks}
variables:
fastly:
fn::invoke:
function: fastly:getFastlyIpRanges
arguments: {}
Using getFastlyIpRanges
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFastlyIpRanges(opts?: InvokeOptions): Promise<GetFastlyIpRangesResult>
function getFastlyIpRangesOutput(opts?: InvokeOptions): Output<GetFastlyIpRangesResult>def get_fastly_ip_ranges(opts: Optional[InvokeOptions] = None) -> GetFastlyIpRangesResult
def get_fastly_ip_ranges_output(opts: Optional[InvokeOptions] = None) -> Output[GetFastlyIpRangesResult]func GetFastlyIpRanges(ctx *Context, opts ...InvokeOption) (*GetFastlyIpRangesResult, error)
func GetFastlyIpRangesOutput(ctx *Context, opts ...InvokeOption) GetFastlyIpRangesResultOutput> Note: This function is named GetFastlyIpRanges in the Go SDK.
public static class GetFastlyIpRanges
{
public static Task<GetFastlyIpRangesResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetFastlyIpRangesResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetFastlyIpRangesResult> getFastlyIpRanges(InvokeOptions options)
public static Output<GetFastlyIpRangesResult> getFastlyIpRanges(InvokeOptions options)
fn::invoke:
function: fastly:index/getFastlyIpRanges:getFastlyIpRanges
arguments:
# arguments dictionarygetFastlyIpRanges Result
The following output properties are available:
- Cidr
Blocks List<string> - The lexically ordered list of ipv4 CIDR blocks.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Cidr
Blocks List<string> - The lexically ordered list of ipv6 CIDR blocks.
- Cidr
Blocks []string - The lexically ordered list of ipv4 CIDR blocks.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Cidr
Blocks []string - The lexically ordered list of ipv6 CIDR blocks.
- cidr
Blocks List<String> - The lexically ordered list of ipv4 CIDR blocks.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Blocks List<String> - The lexically ordered list of ipv6 CIDR blocks.
- cidr
Blocks string[] - The lexically ordered list of ipv4 CIDR blocks.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Blocks string[] - The lexically ordered list of ipv6 CIDR blocks.
- cidr_
blocks Sequence[str] - The lexically ordered list of ipv4 CIDR blocks.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6_
cidr_ Sequence[str]blocks - The lexically ordered list of ipv6 CIDR blocks.
- cidr
Blocks List<String> - The lexically ordered list of ipv4 CIDR blocks.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Blocks List<String> - The lexically ordered list of ipv6 CIDR blocks.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastlyTerraform Provider.
