import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Fastly Compute service. Compute is a computation platform capable of running custom binaries that you compile on your own systems and upload to Fastly. Security and portability is provided by compiling your code to [WebAssembly](https://webassembly.org/) using the `wasm32-wasi` target. A compute 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](https://docs.fastly.com/en/guides/adding-cname-records) on their documentation site for guidance. * * > **Note:** If you omit the `package` block, you must set `activate = false` to avoid service validation errors. * * ## 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 example = fastly.getPackageHash({ * filename: "./path/to/package.tar.gz", * }); * const exampleServiceCompute = new fastly.ServiceCompute("example", { * name: "demofastly", * domains: [{ * name: "demo.notexample.com", * comment: "demo", * }], * "package": { * filename: "package.tar.gz", * sourceCodeHash: example.then(example => example.hash), * }, * forceDestroy: true, * }); * ``` * * * ### package block * * The `package` block supports uploading or modifying Wasm packages for use in a Fastly Compute service. See Fastly's documentation on * [Compute](https://www.fastly.com/products/edge-compute/serverless) * * ## Product Enablement * * The [Product Enablement](https://developer.fastly.com/reference/api/products/) APIs allow customers to enable and disable specific products. * * Not all customers are entitled to use these endpoints and so care needs to be given when configuring a `productEnablement` block in your Terraform configuration. * * Consult the Product Enablement Guide to understand the internal workings for the `productEnablement` block. * * ## Import * * Fastly Services can be imported using their service ID, e.g. * * ```sh * $ pulumi import fastly:index/serviceCompute:ServiceCompute 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/serviceCompute:ServiceCompute demo xxxxxxxxxxxxxxxxxxxx@2 * ``` */ export declare class ServiceCompute extends pulumi.CustomResource { /** * Get an existing ServiceCompute 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?: ServiceComputeState, opts?: pulumi.CustomResourceOptions): ServiceCompute; /** * Returns true if the given object is an instance of ServiceCompute. 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 ServiceCompute; /** * 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; /** * 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 dictionaries: pulumi.Output; /** * A set of Domain names to serve as entry points for your Service */ readonly domains: 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 healthchecks: 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 loggingHeroku: 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; /** * The `package` block supports uploading or modifying Wasm packages for use in a Fastly Compute service (if omitted, ensure `activate = false` is set on `fastly.ServiceCompute` to avoid service validation errors). See Fastly's documentation on [Compute](https://developer.fastly.com/learning/compute/) */ readonly package: pulumi.Output; readonly productEnablement: pulumi.Output; /** * A resource link represents a link between a shared resource (such as an KV Store or Config Store) and a service version. */ readonly resourceLinks: 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; /** * 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; /** * Description field for the version */ readonly versionComment: pulumi.Output; /** * Create a ServiceCompute 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?: ServiceComputeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceCompute resources. */ export interface ServiceComputeState { /** * 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>; /** * The latest cloned version by the provider */ clonedVersion?: pulumi.Input; /** * Description field for the service. Default `Managed by Terraform` */ comment?: pulumi.Input; dictionaries?: pulumi.Input[] | undefined>; /** * A set of Domain names to serve as entry points for your Service */ domains?: 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; healthchecks?: pulumi.Input[] | undefined>; 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>; loggingHeroku?: 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; /** * The `package` block supports uploading or modifying Wasm packages for use in a Fastly Compute service (if omitted, ensure `activate = false` is set on `fastly.ServiceCompute` to avoid service validation errors). See Fastly's documentation on [Compute](https://developer.fastly.com/learning/compute/) */ package?: pulumi.Input; productEnablement?: pulumi.Input; /** * A resource link represents a link between a shared resource (such as an KV Store or Config Store) and a service version. */ resourceLinks?: 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; /** * 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; /** * Description field for the version */ versionComment?: pulumi.Input; } /** * The set of arguments for constructing a ServiceCompute resource. */ export interface ServiceComputeArgs { /** * 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>; /** * Description field for the service. Default `Managed by Terraform` */ comment?: pulumi.Input; dictionaries?: pulumi.Input[] | undefined>; /** * A set of Domain names to serve as entry points for your Service */ domains?: 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; healthchecks?: pulumi.Input[] | undefined>; 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>; loggingHeroku?: 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; /** * The `package` block supports uploading or modifying Wasm packages for use in a Fastly Compute service (if omitted, ensure `activate = false` is set on `fastly.ServiceCompute` to avoid service validation errors). See Fastly's documentation on [Compute](https://developer.fastly.com/learning/compute/) */ package?: pulumi.Input; productEnablement?: pulumi.Input; /** * A resource link represents a link between a shared resource (such as an KV Store or Config Store) and a service version. */ resourceLinks?: 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; /** * 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; /** * Description field for the version */ versionComment?: pulumi.Input; } //# sourceMappingURL=serviceCompute.d.ts.map