Package @pulumi/fastly
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-fastlyrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-fastlyrepo.
var fastly = require("@pulumi/fastly");
import * as fastly from "@pulumi/fastly";Modules
Resources
Functions
Others
- getEnv
- getEnvBoolean
- getEnvNumber
- GetFastlyIpRangesResult
- getVersion
- ProviderArgs
- ServiceACLEntriesv1Args
- ServiceACLEntriesv1State
- ServiceDictionaryItemsv1Args
- ServiceDictionaryItemsv1State
- ServiceDynamicSnippetContentv1Args
- ServiceDynamicSnippetContentv1State
- Servicev1Args
- Servicev1State
- Userv1Args
- Userv1State
Resources
Resource Provider
class Provider extends ProviderResourceThe provider type for the fastly package. By default, resources use package-wide configuration
settings, however an explicit Provider instance may be created and passed during resource
construction to achieve fine-grained programmatic control over provider settings. See the
documentation for more information.
constructor
new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)Create a Provider resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProviderReturns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method register
static register(provider: ProviderResource | undefined): Promise<string | undefined>property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServiceACLEntriesv1
class ServiceACLEntriesv1 extends CustomResourceDefines a set of Fastly ACL entries that can be used to populate a service ACL. This resource will populate an ACL with the entries and will track their state.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const config = new pulumi.Config();
const myaclName = config.get("myaclName") || "My ACL";
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "demo.notexample.com",
comment: "demo",
}],
backend: [{
address: "demo.notexample.com.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
acl: [{
name: myaclName,
}],
forceDestroy: true,
});
const entries = new fastly.ServiceACLEntriesv1("entries", {
serviceId: myservice.id,
aclId: myservice.acls.apply(acls => acls.reduce((__obj, d) => { ...__obj, [d.name]: d.aclId })[myaclName]),
entry: [{
ip: "127.0.0.1",
subnet: "24",
negated: false,
comment: "ALC Entry 1",
}],
});Complex object usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const aclName = "myAcl";
const aclEntries = [
{
ip: "1.2.3.4",
comment: "aclEntry1",
},
{
ip: "1.2.3.5",
comment: "aclEntry2",
},
{
ip: "1.2.3.6",
comment: "aclEntry3",
},
];
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "demo.notexample.com",
comment: "demo",
}],
backend: [{
address: "1.2.3.4",
name: "localhost",
port: 80,
}],
acl: [{
name: aclName,
}],
forceDestroy: true,
});
const entries = new fastly.ServiceACLEntriesv1("entries", {
serviceId: myservice.id,
aclId: myservice.acls.apply(acls => acls.reduce((__obj, d) => { ...__obj, [d.name]: d.aclId })[aclName]),
dynamic: [{
forEach: aclEntries.map(e => {
ip: e.ip,
comment: e.comment,
}),
content: [{
ip: entry.value.ip,
subnet: 22,
comment: entry.value.comment,
negated: false,
}],
}],
});constructor
new ServiceACLEntriesv1(name: string, args: ServiceACLEntriesv1Args, opts?: pulumi.CustomResourceOptions)Create a ServiceACLEntriesv1 resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceACLEntriesv1State, opts?: pulumi.CustomResourceOptions): ServiceACLEntriesv1Get an existing ServiceACLEntriesv1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServiceACLEntriesv1Returns true if the given object is an instance of ServiceACLEntriesv1. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property aclId
public aclId: pulumi.Output<string>;The ID of the ACL that the items belong to
property entries
public entries: pulumi.Output<ServiceACLEntriesv1Entry[] | undefined>;A Set ACL entries that are applied to the service. Defined below
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property serviceId
public serviceId: pulumi.Output<string>;The ID of the Service that the ACL belongs to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServiceDictionaryItemsv1
class ServiceDictionaryItemsv1 extends CustomResourceDefines a map of Fastly dictionary items that can be used to populate a service dictionary. This resource will populate a dictionary with the items and will track their state.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const config = new pulumi.Config();
const mydictName = config.get("mydictName") || "My Dictionary";
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "demo.notexample.com",
comment: "demo",
}],
backend: [{
address: "demo.notexample.com.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
dictionary: [{
name: mydictName,
}],
forceDestroy: true,
});
const items = new fastly.ServiceDictionaryItemsv1("items", {
serviceId: myservice.id,
dictionaryId: myservice.dictionaries.apply(dictionaries => dictionaries.reduce((__obj, s) => { ...__obj, [s.name]: s.dictionaryId })[mydictName]),
items: {
key1: "value1",
key2: "value2",
},
});Complex object usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const config = new pulumi.Config();
const mydict = config.getObject("mydict") || {
name: "My Dictionary",
items: {
key1: "value1x",
key2: "value2x",
},
};
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "demo.notexample.com",
comment: "demo",
}],
backend: [{
address: "demo.notexample.com.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
dictionary: [{
name: mydict.name,
}],
forceDestroy: true,
});
const items = new fastly.ServiceDictionaryItemsv1("items", {
serviceId: myservice.id,
dictionaryId: myservice.dictionaries.apply(dictionaries => dictionaries.reduce((__obj, d) => { ...__obj, [d.name]: d.dictionaryId })[mydict.name]),
items: mydict.items,
});constructor
new ServiceDictionaryItemsv1(name: string, args: ServiceDictionaryItemsv1Args, opts?: pulumi.CustomResourceOptions)Create a ServiceDictionaryItemsv1 resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceDictionaryItemsv1State, opts?: pulumi.CustomResourceOptions): ServiceDictionaryItemsv1Get an existing ServiceDictionaryItemsv1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServiceDictionaryItemsv1Returns true if the given object is an instance of ServiceDictionaryItemsv1. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property dictionaryId
public dictionaryId: pulumi.Output<string>;The ID of the dictionary that the items belong to
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property items
public items: pulumi.Output<{[key: string]: any} | undefined>;A map representing an entry in the dictionary, (key/value)
property serviceId
public serviceId: pulumi.Output<string>;The ID of the service that the dictionary belongs to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServiceDynamicSnippetContentv1
class ServiceDynamicSnippetContentv1 extends CustomResourceDefines content that represents blocks of VCL logic that is inserted into your service. This resource will populate the content of a dynamic snippet and allow it to be manged without the creation of a new service verison.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "snippet.fastlytestdomain.com",
comment: "snippet test",
}],
backend: [{
address: "tftesting.tftesting.net.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
dynamicsnippet: [{
name: "My Dynamic Snippet",
type: "recv",
priority: 110,
}],
defaultHost: "tftesting.tftesting.net.s3-website-us-west-2.amazonaws.com",
forceDestroy: true,
});
const myDynContent = new fastly.ServiceDynamicSnippetContentv1("myDynContent", {
serviceId: myservice.id,
snippetId: myservice.dynamicsnippets.apply(dynamicsnippets => dynamicsnippets.reduce((__obj, s) => { ...__obj, [s.name]: s.snippetId })["My Dynamic Snippet"]),
content: `if ( req.url ) {
set req.http.my-snippet-test-header = "true";
}`,
});Multiple dynamic snippets
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const myservice = new fastly.Servicev1("myservice", {
domain: [{
name: "snippet.fastlytestdomain.com",
comment: "snippet test",
}],
backend: [{
address: "tftesting.tftesting.net.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
dynamicsnippet: [
{
name: "My Dynamic Snippet One",
type: "recv",
priority: 110,
},
{
name: "My Dynamic Snippet Two",
type: "recv",
priority: 110,
},
],
defaultHost: "tftesting.tftesting.net.s3-website-us-west-2.amazonaws.com",
forceDestroy: true,
});
const myDynContentOne = new fastly.ServiceDynamicSnippetContentv1("myDynContentOne", {
serviceId: myservice.id,
snippetId: myservice.dynamicsnippets.apply(dynamicsnippets => dynamicsnippets.reduce((__obj, s) => { ...__obj, [s.name]: s.snippetId })["My Dynamic Snippet One"]),
content: `if ( req.url ) {
set req.http.my-snippet-test-header-one = "true";
}`,
});
const myDynContentTwo = new fastly.ServiceDynamicSnippetContentv1("myDynContentTwo", {
serviceId: myservice.id,
snippetId: myservice.dynamicsnippets.apply(dynamicsnippets => dynamicsnippets.reduce((__obj, s) => { ...__obj, [s.name]: s.snippetId })["My Dynamic Snippet Two"]),
content: `if ( req.url ) {
set req.http.my-snippet-test-header-two = "true";
}`,
});constructor
new ServiceDynamicSnippetContentv1(name: string, args: ServiceDynamicSnippetContentv1Args, opts?: pulumi.CustomResourceOptions)Create a ServiceDynamicSnippetContentv1 resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceDynamicSnippetContentv1State, opts?: pulumi.CustomResourceOptions): ServiceDynamicSnippetContentv1Get an existing ServiceDynamicSnippetContentv1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServiceDynamicSnippetContentv1Returns true if the given object is an instance of ServiceDynamicSnippetContentv1. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property content
public content: pulumi.Output<string>;The VCL code that specifies exactly what the snippet does.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property serviceId
public serviceId: pulumi.Output<string>;The ID of the service that the dynamic snippet belongs to
property snippetId
public snippetId: pulumi.Output<string>;The ID of the dynamic snippet that the content belong to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Servicev1
class Servicev1 extends CustomResourceProvides a Fastly Service, representing the configuration for a website, app, API, or anything else to be served through Fastly. A Service encompasses Domains and Backends.
The Service resource requires a domain name that is correctly set up to direct traffic to the Fastly service. See Fastly’s guide on [Adding CNAME Records][fastly-cname] on their documentation site for guidance.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.Servicev1("demo", {
backends: [{
address: "127.0.0.1",
name: "localhost",
port: 80,
}],
domains: [{
comment: "demo",
name: "demo.notexample.com",
}],
forceDestroy: true,
});Basic usage with an Amazon S3 Website and that removes the x-amz-request-id header
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fastly from "@pulumi/fastly";
const website = new aws.s3.Bucket("website", {
acl: "public-read",
website: {
errorDocument: "error.html",
indexDocument: "index.html",
},
});
const demo = new fastly.Servicev1("demo", {
backends: [{
address: "demo.notexample.com.s3-website-us-west-2.amazonaws.com",
name: "AWS S3 hosting",
port: 80,
}],
defaultHost: pulumi.interpolate`${website.name}.s3-website-us-west-2.amazonaws.com`,
domains: [{
comment: "demo",
name: "demo.notexample.com",
}],
forceDestroy: true,
gzips: [{
contentTypes: [
"text/html",
"text/css",
],
extensions: [
"css",
"js",
],
name: "file extensions and content types",
}],
headers: [{
action: "delete",
destination: "http.x-amz-request-id",
name: "remove x-amz-request-id",
type: "cache",
}],
});Basic usage with custom VCL:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
import * as fs from "fs";
const demo = new fastly.Servicev1("demo", {
backends: [{
address: "127.0.0.1",
name: "localhost",
port: 80,
}],
domains: [{
comment: "demo",
name: "demo.notexample.com",
}],
forceDestroy: true,
vcls: [
{
content: fs.readFileSync(`./my_custom_main.vcl`, "utf-8"),
main: true,
name: "myCustomMainVcl",
},
{
content: fs.readFileSync(`./my_custom_library.vcl`, "utf-8"),
name: "myCustomLibraryVcl",
},
],
});Basic usage with custom Director
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.Servicev1("demo", {
backends: [
{
address: "127.0.0.1",
name: "origin1",
port: 80,
},
{
address: "127.0.0.2",
name: "origin2",
port: 80,
},
],
directors: [{
backends: [
"origin1",
"origin2",
],
name: "mydirector",
quorum: 0,
type: 3,
}],
domains: [{
comment: "demo",
name: "demo.notexample.com",
}],
forceDestroy: true,
});constructor
new Servicev1(name: string, args: Servicev1Args, opts?: pulumi.CustomResourceOptions)Create a Servicev1 resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: Servicev1State, opts?: pulumi.CustomResourceOptions): Servicev1Get an existing Servicev1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is Servicev1Returns true if the given object is an instance of Servicev1. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property acls
public acls: pulumi.Output<Servicev1Acl[] | undefined>;A set of ACL configuration blocks. Defined below.
property activate
public activate: pulumi.Output<boolean | undefined>;Conditionally prevents the Service from being activated. The apply step will continue to create a new draft version but will not activate it if this is set to false. Default true.
property activeVersion
public activeVersion: pulumi.Output<number>;The currently active version of your Fastly Service.
property backends
public backends: pulumi.Output<Servicev1Backend[] | undefined>;A set of Backends to service requests from your Domains.
Defined below. Backends must be defined in this argument, or defined in the
vcl argument below
property bigqueryloggings
public bigqueryloggings: pulumi.Output<Servicev1Bigquerylogging[] | undefined>;A BigQuery endpoint to send streaming logs too. Defined below.
property blobstorageloggings
public blobstorageloggings: pulumi.Output<Servicev1Blobstoragelogging[] | undefined>;An Azure Blob Storage endpoint to send streaming logs too. Defined below.
property cacheSettings
public cacheSettings: pulumi.Output<Servicev1CacheSetting[] | undefined>;A set of Cache Settings, allowing you to override
property clonedVersion
public clonedVersion: pulumi.Output<number>;The latest cloned version by the provider. The value gets only set after running pulumi up.
property comment
public comment: pulumi.Output<string | undefined>;An optional comment about the Director.
property conditions
public conditions: pulumi.Output<Servicev1Condition[] | undefined>;A set of conditions to add logic to any basic configuration object in this service. Defined below.
property defaultHost
public defaultHost: pulumi.Output<string>;Sets the host header.
property defaultTtl
public defaultTtl: pulumi.Output<number | undefined>;The default Time-to-live (TTL) for requests.
property dictionaries
public dictionaries: pulumi.Output<Servicev1Dictionary[] | undefined>;A set of dictionaries that allow the storing of key values pair for use within VCL functions. Defined below.
property directors
public directors: pulumi.Output<Servicev1Director[] | undefined>;A director to allow more control over balancing traffic over backends.
when an item is not to be cached based on an above condition. Defined below
property domains
public domains: pulumi.Output<Servicev1Domain[]>;If you created the S3 bucket outside of us-east-1,
then specify the corresponding bucket endpoint. Example: s3-us-west-2.amazonaws.com.
property dynamicsnippets
public dynamicsnippets: pulumi.Output<Servicev1Dynamicsnippet[] | undefined>;A set of custom, “dynamic” VCL Snippet configuration blocks. Defined below.
property forceDestroy
public forceDestroy: pulumi.Output<boolean | undefined>;Services that are active cannot be destroyed. In
order to destroy the Service, set forceDestroy to true. Default false.
property gcsloggings
public gcsloggings: pulumi.Output<Servicev1Gcslogging[] | undefined>;A gcs endpoint to send streaming logs too. Defined below.
property gzips
public gzips: pulumi.Output<Servicev1Gzip[] | undefined>;A set of gzip rules to control automatic gzipping of content. Defined below.
property headers
public headers: pulumi.Output<Servicev1Header[] | undefined>;A set of Headers to manipulate for each request. Defined below.
property healthchecks
public healthchecks: pulumi.Output<Servicev1Healthcheck[] | undefined>;Name of a defined healthcheck to assign to this backend.
property httpsloggings
public httpsloggings: pulumi.Output<Servicev1Httpslogging[] | undefined>;An HTTPS endpoint to send streaming logs to. Defined below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property logentries
public logentries: pulumi.Output<Servicev1Logentry[] | undefined>;A logentries endpoint to send streaming logs too. Defined below.
property name
public name: pulumi.Output<string>;A unique name to identify this dictionary.
property papertrails
public papertrails: pulumi.Output<Servicev1Papertrail[] | undefined>;A Papertrail endpoint to send streaming logs too. Defined below.
property requestSettings
public requestSettings: pulumi.Output<Servicev1RequestSetting[] | undefined>;A set of Request modifiers. Defined below
property responseObjects
public responseObjects: pulumi.Output<Servicev1ResponseObject[] | undefined>;Allows you to create synthetic responses that exist entirely on the varnish machine. Useful for creating error or maintenance pages that exists outside the scope of your datacenter. Best when used with Condition objects.
property s3loggings
public s3loggings: pulumi.Output<Servicev1S3logging[] | undefined>;A set of S3 Buckets to send streaming logs too. Defined below.
property snippets
public snippets: pulumi.Output<Servicev1Snippet[] | undefined>;A set of custom, “regular” (non-dynamic) VCL Snippet configuration blocks. Defined below.
property splunks
public splunks: pulumi.Output<Servicev1Splunk[] | undefined>;A Splunk endpoint to send streaming logs too. Defined below.
property sumologics
public sumologics: pulumi.Output<Servicev1Sumologic[] | undefined>;A Sumologic endpoint to send streaming logs too. Defined below.
property syslogs
public syslogs: pulumi.Output<Servicev1Syslog[] | undefined>;A syslog endpoint to send streaming logs too. Defined below.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vcls
public vcls: pulumi.Output<Servicev1Vcl[] | undefined>;A set of custom VCL configuration blocks. The ability to upload custom VCL code is not enabled by default for new Fastly accounts (see the Fastly documentation for details).
property versionComment
public versionComment: pulumi.Output<string | undefined>;Description field for the version.
Resource Userv1
class Userv1 extends CustomResourceProvides a Fastly User, representing the configuration for a user account for interacting with Fastly.
The User resource requires a login and name, and optionally a role.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.Userv1("demo", {
login: "demo@example.com",
});constructor
new Userv1(name: string, args: Userv1Args, opts?: pulumi.CustomResourceOptions)Create a Userv1 resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: Userv1State, opts?: pulumi.CustomResourceOptions): Userv1Get an existing Userv1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is Userv1Returns true if the given object is an instance of Userv1. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property login
public login: pulumi.Output<string>;The email address, which is the login name, of the User.
property name
public name: pulumi.Output<string>;The real life name of the user.
property role
public role: pulumi.Output<string | undefined>;The role of this user. Can be user (the default), billing, engineer, or superuser. For detailed information on the abilities granted to each role, see Fastly’s Documentation on User roles.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getFastlyIpRanges
getFastlyIpRanges(opts?: pulumi.InvokeOptions): Promise<GetFastlyIpRangesResult>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 fastlyFastlyIpRanges = pulumi.output(fastly.getFastlyIpRanges({ async: true }));
const fromFastly = new aws.ec2.SecurityGroup("fromFastly", {
ingress: [{
cidrBlocks: fastlyFastlyIpRanges.cidrBlocks,
fromPort: 443,
ipv6CidrBlocks: fastlyFastlyIpRanges.ipv6CidrBlocks,
protocol: "tcp",
toPort: 443,
}],
});Others
function getEnv
getEnv(vars: string[]): string | undefinedfunction getEnvBoolean
getEnvBoolean(vars: string[]): boolean | undefinedfunction getEnvNumber
getEnvNumber(vars: string[]): number | undefinedinterface GetFastlyIpRangesResult
interface GetFastlyIpRangesResultA collection of values returned by getFastlyIpRanges.
property cidrBlocks
cidrBlocks: string[];The lexically ordered list of ipv4 CIDR blocks.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ipv6CidrBlocks
ipv6CidrBlocks: string[];The lexically ordered list of ipv6 CIDR blocks.
function getVersion
getVersion(): stringinterface ProviderArgs
interface ProviderArgsThe set of arguments for constructing a Provider resource.
property apiKey
apiKey?: pulumi.Input<string>;Fastly API Key from https://app.fastly.com/#account
property baseUrl
baseUrl?: pulumi.Input<string>;Fastly API URL
interface ServiceACLEntriesv1Args
interface ServiceACLEntriesv1ArgsThe set of arguments for constructing a ServiceACLEntriesv1 resource.
property aclId
aclId: pulumi.Input<string>;The ID of the ACL that the items belong to
property entries
entries?: pulumi.Input<pulumi.Input<ServiceACLEntriesv1Entry>[]>;A Set ACL entries that are applied to the service. Defined below
property serviceId
serviceId: pulumi.Input<string>;The ID of the Service that the ACL belongs to
interface ServiceACLEntriesv1State
interface ServiceACLEntriesv1StateInput properties used for looking up and filtering ServiceACLEntriesv1 resources.
property aclId
aclId?: pulumi.Input<string>;The ID of the ACL that the items belong to
property entries
entries?: pulumi.Input<pulumi.Input<ServiceACLEntriesv1Entry>[]>;A Set ACL entries that are applied to the service. Defined below
property serviceId
serviceId?: pulumi.Input<string>;The ID of the Service that the ACL belongs to
interface ServiceDictionaryItemsv1Args
interface ServiceDictionaryItemsv1ArgsThe set of arguments for constructing a ServiceDictionaryItemsv1 resource.
property dictionaryId
dictionaryId: pulumi.Input<string>;The ID of the dictionary that the items belong to
property items
items?: pulumi.Input<{[key: string]: any}>;A map representing an entry in the dictionary, (key/value)
property serviceId
serviceId: pulumi.Input<string>;The ID of the service that the dictionary belongs to
interface ServiceDictionaryItemsv1State
interface ServiceDictionaryItemsv1StateInput properties used for looking up and filtering ServiceDictionaryItemsv1 resources.
property dictionaryId
dictionaryId?: pulumi.Input<string>;The ID of the dictionary that the items belong to
property items
items?: pulumi.Input<{[key: string]: any}>;A map representing an entry in the dictionary, (key/value)
property serviceId
serviceId?: pulumi.Input<string>;The ID of the service that the dictionary belongs to
interface ServiceDynamicSnippetContentv1Args
interface ServiceDynamicSnippetContentv1ArgsThe set of arguments for constructing a ServiceDynamicSnippetContentv1 resource.
property content
content: pulumi.Input<string>;The VCL code that specifies exactly what the snippet does.
property serviceId
serviceId: pulumi.Input<string>;The ID of the service that the dynamic snippet belongs to
property snippetId
snippetId: pulumi.Input<string>;The ID of the dynamic snippet that the content belong to
interface ServiceDynamicSnippetContentv1State
interface ServiceDynamicSnippetContentv1StateInput properties used for looking up and filtering ServiceDynamicSnippetContentv1 resources.
property content
content?: pulumi.Input<string>;The VCL code that specifies exactly what the snippet does.
property serviceId
serviceId?: pulumi.Input<string>;The ID of the service that the dynamic snippet belongs to
property snippetId
snippetId?: pulumi.Input<string>;The ID of the dynamic snippet that the content belong to
interface Servicev1Args
interface Servicev1ArgsThe set of arguments for constructing a Servicev1 resource.
property acls
acls?: pulumi.Input<pulumi.Input<Servicev1Acl>[]>;A set of ACL configuration blocks. Defined below.
property activate
activate?: pulumi.Input<boolean>;Conditionally prevents the Service from being activated. The apply step will continue to create a new draft version but will not activate it if this is set to false. Default true.
property backends
backends?: pulumi.Input<pulumi.Input<Servicev1Backend>[]>;A set of Backends to service requests from your Domains.
Defined below. Backends must be defined in this argument, or defined in the
vcl argument below
property bigqueryloggings
bigqueryloggings?: pulumi.Input<pulumi.Input<Servicev1Bigquerylogging>[]>;A BigQuery endpoint to send streaming logs too. Defined below.
property blobstorageloggings
blobstorageloggings?: pulumi.Input<pulumi.Input<Servicev1Blobstoragelogging>[]>;An Azure Blob Storage endpoint to send streaming logs too. Defined below.
property cacheSettings
cacheSettings?: pulumi.Input<pulumi.Input<Servicev1CacheSetting>[]>;A set of Cache Settings, allowing you to override
property comment
comment?: pulumi.Input<string>;An optional comment about the Director.
property conditions
conditions?: pulumi.Input<pulumi.Input<Servicev1Condition>[]>;A set of conditions to add logic to any basic configuration object in this service. Defined below.
property defaultHost
defaultHost?: pulumi.Input<string>;Sets the host header.
property defaultTtl
defaultTtl?: pulumi.Input<number>;The default Time-to-live (TTL) for requests.
property dictionaries
dictionaries?: pulumi.Input<pulumi.Input<Servicev1Dictionary>[]>;A set of dictionaries that allow the storing of key values pair for use within VCL functions. Defined below.
property directors
directors?: pulumi.Input<pulumi.Input<Servicev1Director>[]>;A director to allow more control over balancing traffic over backends.
when an item is not to be cached based on an above condition. Defined below
property domains
domains: pulumi.Input<pulumi.Input<Servicev1Domain>[]>;If you created the S3 bucket outside of us-east-1,
then specify the corresponding bucket endpoint. Example: s3-us-west-2.amazonaws.com.
property dynamicsnippets
dynamicsnippets?: pulumi.Input<pulumi.Input<Servicev1Dynamicsnippet>[]>;A set of custom, “dynamic” VCL Snippet configuration blocks. Defined below.
property forceDestroy
forceDestroy?: pulumi.Input<boolean>;Services that are active cannot be destroyed. In
order to destroy the Service, set forceDestroy to true. Default false.
property gcsloggings
gcsloggings?: pulumi.Input<pulumi.Input<Servicev1Gcslogging>[]>;A gcs endpoint to send streaming logs too. Defined below.
property gzips
gzips?: pulumi.Input<pulumi.Input<Servicev1Gzip>[]>;A set of gzip rules to control automatic gzipping of content. Defined below.
property headers
headers?: pulumi.Input<pulumi.Input<Servicev1Header>[]>;A set of Headers to manipulate for each request. Defined below.
property healthchecks
healthchecks?: pulumi.Input<pulumi.Input<Servicev1Healthcheck>[]>;Name of a defined healthcheck to assign to this backend.
property httpsloggings
httpsloggings?: pulumi.Input<pulumi.Input<Servicev1Httpslogging>[]>;An HTTPS endpoint to send streaming logs to. Defined below.
property logentries
logentries?: pulumi.Input<pulumi.Input<Servicev1Logentry>[]>;A logentries endpoint to send streaming logs too. Defined below.
property name
name?: pulumi.Input<string>;A unique name to identify this dictionary.
property papertrails
papertrails?: pulumi.Input<pulumi.Input<Servicev1Papertrail>[]>;A Papertrail endpoint to send streaming logs too. Defined below.
property requestSettings
requestSettings?: pulumi.Input<pulumi.Input<Servicev1RequestSetting>[]>;A set of Request modifiers. Defined below
property responseObjects
responseObjects?: pulumi.Input<pulumi.Input<Servicev1ResponseObject>[]>;Allows you to create synthetic responses that exist entirely on the varnish machine. Useful for creating error or maintenance pages that exists outside the scope of your datacenter. Best when used with Condition objects.
property s3loggings
s3loggings?: pulumi.Input<pulumi.Input<Servicev1S3logging>[]>;A set of S3 Buckets to send streaming logs too. Defined below.
property snippets
snippets?: pulumi.Input<pulumi.Input<Servicev1Snippet>[]>;A set of custom, “regular” (non-dynamic) VCL Snippet configuration blocks. Defined below.
property splunks
splunks?: pulumi.Input<pulumi.Input<Servicev1Splunk>[]>;A Splunk endpoint to send streaming logs too. Defined below.
property sumologics
sumologics?: pulumi.Input<pulumi.Input<Servicev1Sumologic>[]>;A Sumologic endpoint to send streaming logs too. Defined below.
property syslogs
syslogs?: pulumi.Input<pulumi.Input<Servicev1Syslog>[]>;A syslog endpoint to send streaming logs too. Defined below.
property vcls
vcls?: pulumi.Input<pulumi.Input<Servicev1Vcl>[]>;A set of custom VCL configuration blocks. The ability to upload custom VCL code is not enabled by default for new Fastly accounts (see the Fastly documentation for details).
property versionComment
versionComment?: pulumi.Input<string>;Description field for the version.
interface Servicev1State
interface Servicev1StateInput properties used for looking up and filtering Servicev1 resources.
property acls
acls?: pulumi.Input<pulumi.Input<Servicev1Acl>[]>;A set of ACL configuration blocks. Defined below.
property activate
activate?: pulumi.Input<boolean>;Conditionally prevents the Service from being activated. The apply step will continue to create a new draft version but will not activate it if this is set to false. Default true.
property activeVersion
activeVersion?: pulumi.Input<number>;The currently active version of your Fastly Service.
property backends
backends?: pulumi.Input<pulumi.Input<Servicev1Backend>[]>;A set of Backends to service requests from your Domains.
Defined below. Backends must be defined in this argument, or defined in the
vcl argument below
property bigqueryloggings
bigqueryloggings?: pulumi.Input<pulumi.Input<Servicev1Bigquerylogging>[]>;A BigQuery endpoint to send streaming logs too. Defined below.
property blobstorageloggings
blobstorageloggings?: pulumi.Input<pulumi.Input<Servicev1Blobstoragelogging>[]>;An Azure Blob Storage endpoint to send streaming logs too. Defined below.
property cacheSettings
cacheSettings?: pulumi.Input<pulumi.Input<Servicev1CacheSetting>[]>;A set of Cache Settings, allowing you to override
property clonedVersion
clonedVersion?: pulumi.Input<number>;The latest cloned version by the provider. The value gets only set after running pulumi up.
property comment
comment?: pulumi.Input<string>;An optional comment about the Director.
property conditions
conditions?: pulumi.Input<pulumi.Input<Servicev1Condition>[]>;A set of conditions to add logic to any basic configuration object in this service. Defined below.
property defaultHost
defaultHost?: pulumi.Input<string>;Sets the host header.
property defaultTtl
defaultTtl?: pulumi.Input<number>;The default Time-to-live (TTL) for requests.
property dictionaries
dictionaries?: pulumi.Input<pulumi.Input<Servicev1Dictionary>[]>;A set of dictionaries that allow the storing of key values pair for use within VCL functions. Defined below.
property directors
directors?: pulumi.Input<pulumi.Input<Servicev1Director>[]>;A director to allow more control over balancing traffic over backends.
when an item is not to be cached based on an above condition. Defined below
property domains
domains?: pulumi.Input<pulumi.Input<Servicev1Domain>[]>;If you created the S3 bucket outside of us-east-1,
then specify the corresponding bucket endpoint. Example: s3-us-west-2.amazonaws.com.
property dynamicsnippets
dynamicsnippets?: pulumi.Input<pulumi.Input<Servicev1Dynamicsnippet>[]>;A set of custom, “dynamic” VCL Snippet configuration blocks. Defined below.
property forceDestroy
forceDestroy?: pulumi.Input<boolean>;Services that are active cannot be destroyed. In
order to destroy the Service, set forceDestroy to true. Default false.
property gcsloggings
gcsloggings?: pulumi.Input<pulumi.Input<Servicev1Gcslogging>[]>;A gcs endpoint to send streaming logs too. Defined below.
property gzips
gzips?: pulumi.Input<pulumi.Input<Servicev1Gzip>[]>;A set of gzip rules to control automatic gzipping of content. Defined below.
property headers
headers?: pulumi.Input<pulumi.Input<Servicev1Header>[]>;A set of Headers to manipulate for each request. Defined below.
property healthchecks
healthchecks?: pulumi.Input<pulumi.Input<Servicev1Healthcheck>[]>;Name of a defined healthcheck to assign to this backend.
property httpsloggings
httpsloggings?: pulumi.Input<pulumi.Input<Servicev1Httpslogging>[]>;An HTTPS endpoint to send streaming logs to. Defined below.
property logentries
logentries?: pulumi.Input<pulumi.Input<Servicev1Logentry>[]>;A logentries endpoint to send streaming logs too. Defined below.
property name
name?: pulumi.Input<string>;A unique name to identify this dictionary.
property papertrails
papertrails?: pulumi.Input<pulumi.Input<Servicev1Papertrail>[]>;A Papertrail endpoint to send streaming logs too. Defined below.
property requestSettings
requestSettings?: pulumi.Input<pulumi.Input<Servicev1RequestSetting>[]>;A set of Request modifiers. Defined below
property responseObjects
responseObjects?: pulumi.Input<pulumi.Input<Servicev1ResponseObject>[]>;Allows you to create synthetic responses that exist entirely on the varnish machine. Useful for creating error or maintenance pages that exists outside the scope of your datacenter. Best when used with Condition objects.
property s3loggings
s3loggings?: pulumi.Input<pulumi.Input<Servicev1S3logging>[]>;A set of S3 Buckets to send streaming logs too. Defined below.
property snippets
snippets?: pulumi.Input<pulumi.Input<Servicev1Snippet>[]>;A set of custom, “regular” (non-dynamic) VCL Snippet configuration blocks. Defined below.
property splunks
splunks?: pulumi.Input<pulumi.Input<Servicev1Splunk>[]>;A Splunk endpoint to send streaming logs too. Defined below.
property sumologics
sumologics?: pulumi.Input<pulumi.Input<Servicev1Sumologic>[]>;A Sumologic endpoint to send streaming logs too. Defined below.
property syslogs
syslogs?: pulumi.Input<pulumi.Input<Servicev1Syslog>[]>;A syslog endpoint to send streaming logs too. Defined below.
property vcls
vcls?: pulumi.Input<pulumi.Input<Servicev1Vcl>[]>;A set of custom VCL configuration blocks. The ability to upload custom VCL code is not enabled by default for new Fastly accounts (see the Fastly documentation for details).
property versionComment
versionComment?: pulumi.Input<string>;Description field for the version.
interface Userv1Args
interface Userv1ArgsThe set of arguments for constructing a Userv1 resource.
property login
login: pulumi.Input<string>;The email address, which is the login name, of the User.
property name
name?: pulumi.Input<string>;The real life name of the user.
property role
role?: pulumi.Input<string>;The role of this user. Can be user (the default), billing, engineer, or superuser. For detailed information on the abilities granted to each role, see Fastly’s Documentation on User roles.
interface Userv1State
interface Userv1StateInput properties used for looking up and filtering Userv1 resources.
property login
login?: pulumi.Input<string>;The email address, which is the login name, of the User.
property name
name?: pulumi.Input<string>;The real life name of the user.
property role
role?: pulumi.Input<string>;The role of this user. Can be user (the default), billing, engineer, or superuser. For detailed information on the abilities granted to each role, see Fastly’s Documentation on User roles.