import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides 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. * * ## Activation and Staging * * By default, the `activate` attribute is `true`, and the `stage` * attribute is `false`. This combination means that when `terraform * apply` is executed for a plan which will make changes to the service, * the last version created by the provider (the `clonedVersion`) will * be cloned to make a draft version, the changes will be applied to that * draft version, and that draft version will be activated. * * If desired, `activate` can be set to `false`, in which case the * behavior above will be modified such that cloning will only occur when * the `clonedVersion` is locked, and the draft version will not be * activated. * * Additionally, `stage` can be set to `true`, with `activate` set to * `false`. This extends the `activate = false` behavior to include * staging of applied changes, every time that changes are applied, even * if the changes were applied to an existing draft version. * * Finally, `activate` should not be set to `true` when `stage` is also * set to `true`. While this combination will not cause any harm to the * service, there is no logical reason to both stage and activate every * set of applied changes. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * const demo = new fastly.ServiceVcl("demo", { * name: "demofastly", * domains: [{ * name: "demo.notexample.com", * comment: "demo", * }], * backends: [{ * address: "127.0.0.1", * name: "localhost", * port: 80, * }], * forceDestroy: true, * }); * ``` * * Basic usage with an Amazon S3 Website and that removes the `x-amz-request-id` header: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as fastly from "@pulumi/fastly"; * * const demo = new fastly.ServiceVcl("demo", { * name: "demofastly", * domains: [{ * name: "demo.notexample.com", * comment: "demo", * }], * backends: [{ * address: "http-me.fastly.dev", * name: "Glitch Test Site", * port: 80, * overrideHost: "http-me.fastly.dev", * }], * headers: [{ * destination: "http.x-amz-request-id", * type: "cache", * action: "delete", * name: "remove x-amz-request-id", * }], * gzips: [{ * name: "file extensions and content types", * extensions: [ * "css", * "js", * ], * contentTypes: [ * "text/html", * "text/css", * ], * }], * forceDestroy: true, * }); * const websiteBucket = new aws.index.S3Bucket("website_bucket", {bucket: "your-unique-website-bucket-name"}); * const websiteConfig = new aws.index.S3BucketWebsiteConfiguration("website_config", { * bucket: websiteBucket.id, * indexDocument: [{ * suffix: "index.html", * }], * errorDocument: [{ * key: "error.html", * }], * }); * ``` * * Basic usage with [custom * VCL](https://docs.fastly.com/vcl/custom-vcl/uploading-custom-vcl/): * * ## Import * * Fastly Services can be imported using their service ID, e.g. * * ```sh * $ pulumi import fastly:index/serviceVcl:ServiceVcl demo xxxxxxxxxxxxxxxxxxxx * ``` * * By default, either the active version will be imported, or the latest version if no version is active. * Alternatively, a specific version of the service can be selected by appending an `@` followed by the version number to the service ID, e.g. * * ```sh * $ pulumi import fastly:index/serviceVcl:ServiceVcl demo xxxxxxxxxxxxxxxxxxxx@2 * ``` */ export declare class ServiceVcl extends pulumi.CustomResource { /** * Get an existing ServiceVcl resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ServiceVclState, opts?: pulumi.CustomResourceOptions): ServiceVcl; /** * Returns true if the given object is an instance of ServiceVcl. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ServiceVcl; readonly acls: pulumi.Output; /** * Conditionally prevents new service versions from being activated. The apply step will create a new draft version but will not activate it if this is set to `false`. Default `true` */ readonly activate: pulumi.Output; /** * The currently active version of your Fastly Service */ readonly activeVersion: pulumi.Output; readonly backends: pulumi.Output; readonly cacheSettings: pulumi.Output; /** * The latest cloned version by the provider */ readonly clonedVersion: pulumi.Output; /** * Description field for the service. Default `Managed by Terraform` */ readonly comment: pulumi.Output; readonly conditions: pulumi.Output; /** * The default hostname */ readonly defaultHost: pulumi.Output; /** * The default Time-to-live (TTL) for requests */ readonly defaultTtl: pulumi.Output; readonly dictionaries: pulumi.Output; readonly directors: pulumi.Output; /** * A set of Domain names to serve as entry points for your Service */ readonly domains: pulumi.Output; readonly dynamicsnippets: pulumi.Output; /** * Services that are active cannot be destroyed. In order to destroy the Service, set `forceDestroy` to `true`. Default `false` */ readonly forceDestroy: pulumi.Output; /** * Used internally by the provider to temporarily indicate if all resources should call their associated API to update the local state. This is for scenarios where the service version has been reverted outside of Terraform (e.g. via the Fastly UI) and the provider needs to resync the state for a different active version (this is only if `activate` is `true`). */ readonly forceRefresh: pulumi.Output; readonly gzips: pulumi.Output; readonly headers: pulumi.Output; readonly healthchecks: pulumi.Output; /** * Enables support for the HTTP/3 (QUIC) protocol */ readonly http3: pulumi.Output; readonly imageOptimizerDefaultSettings: pulumi.Output; /** * Used internally by the provider to temporarily indicate if the service is being imported, and is reset to false once the import is finished */ readonly imported: pulumi.Output; readonly loggingBigqueries: pulumi.Output; readonly loggingBlobstorages: pulumi.Output; readonly loggingCloudfiles: pulumi.Output; readonly loggingDatadogs: pulumi.Output; readonly loggingDigitaloceans: pulumi.Output; readonly loggingElasticsearches: pulumi.Output; readonly loggingFtps: pulumi.Output; readonly loggingGcs: pulumi.Output; readonly loggingGooglepubsubs: pulumi.Output; readonly loggingGrafanacloudlogs: pulumi.Output; readonly loggingHerokus: pulumi.Output; readonly loggingHoneycombs: pulumi.Output; readonly loggingHttps: pulumi.Output; readonly loggingKafkas: pulumi.Output; readonly loggingKineses: pulumi.Output; readonly loggingLogentries: pulumi.Output; readonly loggingLogglies: pulumi.Output; readonly loggingLogshuttles: pulumi.Output; readonly loggingNewrelicotlps: pulumi.Output; readonly loggingNewrelics: pulumi.Output; readonly loggingOpenstacks: pulumi.Output; readonly loggingPapertrails: pulumi.Output; readonly loggingS3s: pulumi.Output; readonly loggingScalyrs: pulumi.Output; readonly loggingSftps: pulumi.Output; readonly loggingSplunks: pulumi.Output; readonly loggingSumologics: pulumi.Output; readonly loggingSyslogs: pulumi.Output; /** * The unique name for the Service to create */ readonly name: pulumi.Output; readonly productEnablement: pulumi.Output; readonly rateLimiters: pulumi.Output; readonly requestSettings: pulumi.Output; readonly responseObjects: pulumi.Output; /** * Services that are active cannot be destroyed. If set to `true` a service Terraform intends to destroy will instead be deactivated (allowing it to be reused by importing it into another Terraform project). If `false`, attempting to destroy an active service will cause an error. Default `false` */ readonly reuse: pulumi.Output; readonly snippets: pulumi.Output; /** * Conditionally enables new service versions to be staged. If set to `true`, all changes made by an `apply` step will be staged, even if `apply` did not create a new draft version. Default `false` */ readonly stage: pulumi.Output; /** * The currently staged version of your Fastly Service */ readonly stagedVersion: pulumi.Output; /** * Enables serving a stale object if there is an error */ readonly staleIfError: pulumi.Output; /** * The default time-to-live (TTL) for serving the stale object for the version */ readonly staleIfErrorTtl: pulumi.Output; readonly vcls: pulumi.Output; /** * Description field for the version */ readonly versionComment: pulumi.Output; /** * Create a ServiceVcl resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ServiceVclArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceVcl resources. */ export interface ServiceVclState { acls?: pulumi.Input[] | undefined>; /** * Conditionally prevents new service versions from being activated. The apply step will create a new draft version but will not activate it if this is set to `false`. Default `true` */ activate?: pulumi.Input; /** * The currently active version of your Fastly Service */ activeVersion?: pulumi.Input; backends?: pulumi.Input[] | undefined>; cacheSettings?: pulumi.Input[] | undefined>; /** * The latest cloned version by the provider */ clonedVersion?: pulumi.Input; /** * Description field for the service. Default `Managed by Terraform` */ comment?: pulumi.Input; conditions?: pulumi.Input[] | undefined>; /** * The default hostname */ defaultHost?: pulumi.Input; /** * The default Time-to-live (TTL) for requests */ defaultTtl?: pulumi.Input; dictionaries?: pulumi.Input[] | undefined>; directors?: pulumi.Input[] | undefined>; /** * A set of Domain names to serve as entry points for your Service */ domains?: pulumi.Input[] | undefined>; dynamicsnippets?: pulumi.Input[] | undefined>; /** * Services that are active cannot be destroyed. In order to destroy the Service, set `forceDestroy` to `true`. Default `false` */ forceDestroy?: pulumi.Input; /** * Used internally by the provider to temporarily indicate if all resources should call their associated API to update the local state. This is for scenarios where the service version has been reverted outside of Terraform (e.g. via the Fastly UI) and the provider needs to resync the state for a different active version (this is only if `activate` is `true`). */ forceRefresh?: pulumi.Input; gzips?: pulumi.Input[] | undefined>; headers?: pulumi.Input[] | undefined>; healthchecks?: pulumi.Input[] | undefined>; /** * Enables support for the HTTP/3 (QUIC) protocol */ http3?: pulumi.Input; imageOptimizerDefaultSettings?: pulumi.Input; /** * Used internally by the provider to temporarily indicate if the service is being imported, and is reset to false once the import is finished */ imported?: pulumi.Input; loggingBigqueries?: pulumi.Input[] | undefined>; loggingBlobstorages?: pulumi.Input[] | undefined>; loggingCloudfiles?: pulumi.Input[] | undefined>; loggingDatadogs?: pulumi.Input[] | undefined>; loggingDigitaloceans?: pulumi.Input[] | undefined>; loggingElasticsearches?: pulumi.Input[] | undefined>; loggingFtps?: pulumi.Input[] | undefined>; loggingGcs?: pulumi.Input[] | undefined>; loggingGooglepubsubs?: pulumi.Input[] | undefined>; loggingGrafanacloudlogs?: pulumi.Input[] | undefined>; loggingHerokus?: pulumi.Input[] | undefined>; loggingHoneycombs?: pulumi.Input[] | undefined>; loggingHttps?: pulumi.Input[] | undefined>; loggingKafkas?: pulumi.Input[] | undefined>; loggingKineses?: pulumi.Input[] | undefined>; loggingLogentries?: pulumi.Input[] | undefined>; loggingLogglies?: pulumi.Input[] | undefined>; loggingLogshuttles?: pulumi.Input[] | undefined>; loggingNewrelicotlps?: pulumi.Input[] | undefined>; loggingNewrelics?: pulumi.Input[] | undefined>; loggingOpenstacks?: pulumi.Input[] | undefined>; loggingPapertrails?: pulumi.Input[] | undefined>; loggingS3s?: pulumi.Input[] | undefined>; loggingScalyrs?: pulumi.Input[] | undefined>; loggingSftps?: pulumi.Input[] | undefined>; loggingSplunks?: pulumi.Input[] | undefined>; loggingSumologics?: pulumi.Input[] | undefined>; loggingSyslogs?: pulumi.Input[] | undefined>; /** * The unique name for the Service to create */ name?: pulumi.Input; productEnablement?: pulumi.Input; rateLimiters?: pulumi.Input[] | undefined>; requestSettings?: pulumi.Input[] | undefined>; responseObjects?: pulumi.Input[] | undefined>; /** * Services that are active cannot be destroyed. If set to `true` a service Terraform intends to destroy will instead be deactivated (allowing it to be reused by importing it into another Terraform project). If `false`, attempting to destroy an active service will cause an error. Default `false` */ reuse?: pulumi.Input; snippets?: pulumi.Input[] | undefined>; /** * Conditionally enables new service versions to be staged. If set to `true`, all changes made by an `apply` step will be staged, even if `apply` did not create a new draft version. Default `false` */ stage?: pulumi.Input; /** * The currently staged version of your Fastly Service */ stagedVersion?: pulumi.Input; /** * Enables serving a stale object if there is an error */ staleIfError?: pulumi.Input; /** * The default time-to-live (TTL) for serving the stale object for the version */ staleIfErrorTtl?: pulumi.Input; vcls?: pulumi.Input[] | undefined>; /** * Description field for the version */ versionComment?: pulumi.Input; } /** * The set of arguments for constructing a ServiceVcl resource. */ export interface ServiceVclArgs { acls?: pulumi.Input[] | undefined>; /** * Conditionally prevents new service versions from being activated. The apply step will create a new draft version but will not activate it if this is set to `false`. Default `true` */ activate?: pulumi.Input; backends?: pulumi.Input[] | undefined>; cacheSettings?: pulumi.Input[] | undefined>; /** * Description field for the service. Default `Managed by Terraform` */ comment?: pulumi.Input; conditions?: pulumi.Input[] | undefined>; /** * The default hostname */ defaultHost?: pulumi.Input; /** * The default Time-to-live (TTL) for requests */ defaultTtl?: pulumi.Input; dictionaries?: pulumi.Input[] | undefined>; directors?: pulumi.Input[] | undefined>; /** * A set of Domain names to serve as entry points for your Service */ domains?: pulumi.Input[] | undefined>; dynamicsnippets?: pulumi.Input[] | undefined>; /** * Services that are active cannot be destroyed. In order to destroy the Service, set `forceDestroy` to `true`. Default `false` */ forceDestroy?: pulumi.Input; gzips?: pulumi.Input[] | undefined>; headers?: pulumi.Input[] | undefined>; healthchecks?: pulumi.Input[] | undefined>; /** * Enables support for the HTTP/3 (QUIC) protocol */ http3?: pulumi.Input; imageOptimizerDefaultSettings?: pulumi.Input; loggingBigqueries?: pulumi.Input[] | undefined>; loggingBlobstorages?: pulumi.Input[] | undefined>; loggingCloudfiles?: pulumi.Input[] | undefined>; loggingDatadogs?: pulumi.Input[] | undefined>; loggingDigitaloceans?: pulumi.Input[] | undefined>; loggingElasticsearches?: pulumi.Input[] | undefined>; loggingFtps?: pulumi.Input[] | undefined>; loggingGcs?: pulumi.Input[] | undefined>; loggingGooglepubsubs?: pulumi.Input[] | undefined>; loggingGrafanacloudlogs?: pulumi.Input[] | undefined>; loggingHerokus?: pulumi.Input[] | undefined>; loggingHoneycombs?: pulumi.Input[] | undefined>; loggingHttps?: pulumi.Input[] | undefined>; loggingKafkas?: pulumi.Input[] | undefined>; loggingKineses?: pulumi.Input[] | undefined>; loggingLogentries?: pulumi.Input[] | undefined>; loggingLogglies?: pulumi.Input[] | undefined>; loggingLogshuttles?: pulumi.Input[] | undefined>; loggingNewrelicotlps?: pulumi.Input[] | undefined>; loggingNewrelics?: pulumi.Input[] | undefined>; loggingOpenstacks?: pulumi.Input[] | undefined>; loggingPapertrails?: pulumi.Input[] | undefined>; loggingS3s?: pulumi.Input[] | undefined>; loggingScalyrs?: pulumi.Input[] | undefined>; loggingSftps?: pulumi.Input[] | undefined>; loggingSplunks?: pulumi.Input[] | undefined>; loggingSumologics?: pulumi.Input[] | undefined>; loggingSyslogs?: pulumi.Input[] | undefined>; /** * The unique name for the Service to create */ name?: pulumi.Input; productEnablement?: pulumi.Input; rateLimiters?: pulumi.Input[] | undefined>; requestSettings?: pulumi.Input[] | undefined>; responseObjects?: pulumi.Input[] | undefined>; /** * Services that are active cannot be destroyed. If set to `true` a service Terraform intends to destroy will instead be deactivated (allowing it to be reused by importing it into another Terraform project). If `false`, attempting to destroy an active service will cause an error. Default `false` */ reuse?: pulumi.Input; snippets?: pulumi.Input[] | undefined>; /** * Conditionally enables new service versions to be staged. If set to `true`, all changes made by an `apply` step will be staged, even if `apply` did not create a new draft version. Default `false` */ stage?: pulumi.Input; /** * Enables serving a stale object if there is an error */ staleIfError?: pulumi.Input; /** * The default time-to-live (TTL) for serving the stale object for the version */ staleIfErrorTtl?: pulumi.Input; vcls?: pulumi.Input[] | undefined>; /** * Description field for the version */ versionComment?: pulumi.Input; } //# sourceMappingURL=serviceVcl.d.ts.map