import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > If you are using a `source` block configuration, you must first have a * connected GitHub or GitLab account connected to Cloudflare. See the * [Getting Started with Pages](https://developers.cloudflare.com/pages/get-started/git-integration/) * documentation on how to link your accounts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const examplePagesProject = new cloudflare.PagesProject("example_pages_project", { * accountId: "023e105f4ecef8ad9ca31a8372d0c353", * name: "my-pages-app", * productionBranch: "main", * buildConfig: { * buildCaching: true, * buildCommand: "npm run build", * destinationDir: "build", * rootDir: "/", * webAnalyticsTag: "cee1c73f6e4743d0b5e6bb1a0bcaabcc", * webAnalyticsToken: "021e1057c18547eca7b79f2516f06o7x", * }, * deploymentConfigs: { * preview: { * aiBindings: { * AI_BINDING: { * projectId: "some-project-id", * }, * }, * alwaysUseLatestCompatibilityDate: false, * analyticsEngineDatasets: { * ANALYTICS_ENGINE_BINDING: { * dataset: "api_analytics", * }, * }, * browsers: { * BROWSER: {}, * }, * buildImageMajorVersion: 3, * compatibilityDate: "2025-01-01", * compatibilityFlags: ["url_standard"], * d1Databases: { * D1_BINDING: { * id: "445e2955-951a-43f8-a35b-a4d0c8138f63", * }, * }, * durableObjectNamespaces: { * DO_BINDING: { * namespaceId: "5eb63bbbe01eeed093cb22bb8f5acdc3", * }, * }, * envVars: { * foo: { * type: "plain_text", * value: "hello world", * }, * }, * failOpen: true, * hyperdriveBindings: { * HYPERDRIVE: { * id: "a76a99bc342644deb02c38d66082262a", * }, * }, * kvNamespaces: { * KV_BINDING: { * namespaceId: "5eb63bbbe01eeed093cb22bb8f5acdc3", * }, * }, * limits: { * cpuMs: 100, * }, * mtlsCertificates: { * MTLS: { * certificateId: "d7cdd17c-916f-4cb7-aabe-585eb382ec4e", * }, * }, * placement: { * mode: "smart", * }, * queueProducers: { * QUEUE_PRODUCER_BINDING: { * name: "some-queue", * }, * }, * r2Buckets: { * R2_BINDING: { * name: "some-bucket", * jurisdiction: "eu", * }, * }, * services: { * SERVICE_BINDING: { * service: "example-worker", * entrypoint: "MyHandler", * environment: "production", * }, * }, * usageModel: "standard", * vectorizeBindings: { * VECTORIZE: { * indexName: "my_index", * }, * }, * wranglerConfigHash: "abc123def456", * }, * production: { * aiBindings: { * AI_BINDING: { * projectId: "some-project-id", * }, * }, * alwaysUseLatestCompatibilityDate: false, * analyticsEngineDatasets: { * ANALYTICS_ENGINE_BINDING: { * dataset: "api_analytics", * }, * }, * browsers: { * BROWSER: {}, * }, * buildImageMajorVersion: 3, * compatibilityDate: "2025-01-01", * compatibilityFlags: ["url_standard"], * d1Databases: { * D1_BINDING: { * id: "445e2955-951a-43f8-a35b-a4d0c8138f63", * }, * }, * durableObjectNamespaces: { * DO_BINDING: { * namespaceId: "5eb63bbbe01eeed093cb22bb8f5acdc3", * }, * }, * envVars: { * foo: { * type: "plain_text", * value: "hello world", * }, * }, * failOpen: true, * hyperdriveBindings: { * HYPERDRIVE: { * id: "a76a99bc342644deb02c38d66082262a", * }, * }, * kvNamespaces: { * KV_BINDING: { * namespaceId: "5eb63bbbe01eeed093cb22bb8f5acdc3", * }, * }, * limits: { * cpuMs: 100, * }, * mtlsCertificates: { * MTLS: { * certificateId: "d7cdd17c-916f-4cb7-aabe-585eb382ec4e", * }, * }, * placement: { * mode: "smart", * }, * queueProducers: { * QUEUE_PRODUCER_BINDING: { * name: "some-queue", * }, * }, * r2Buckets: { * R2_BINDING: { * name: "some-bucket", * jurisdiction: "eu", * }, * }, * services: { * SERVICE_BINDING: { * service: "example-worker", * entrypoint: "MyHandler", * environment: "production", * }, * }, * usageModel: "standard", * vectorizeBindings: { * VECTORIZE: { * indexName: "my_index", * }, * }, * wranglerConfigHash: "abc123def456", * }, * }, * source: { * config: { * deploymentsEnabled: true, * owner: "my-org", * ownerId: "12345678", * pathExcludes: ["string"], * pathIncludes: ["string"], * prCommentsEnabled: true, * previewBranchExcludes: ["string"], * previewBranchIncludes: ["string"], * previewDeploymentSetting: "all", * productionBranch: "main", * productionDeploymentsEnabled: true, * repoId: "12345678", * repoName: "my-repo", * }, * type: "github", * }, * }); * ``` * * ## Import * * !> It is not possible to import a pages project with secret environment variables. If you have a secret environment variable, you must remove it from your project before importing it. * * ```sh * $ pulumi import cloudflare:index/pagesProject:PagesProject example '/' * ``` */ export declare class PagesProject extends pulumi.CustomResource { /** * Get an existing PagesProject 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?: PagesProjectState, opts?: pulumi.CustomResourceOptions): PagesProject; /** * Returns true if the given object is an instance of PagesProject. 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 PagesProject; /** * Identifier. */ readonly accountId: pulumi.Output; /** * Configs for the project build process. */ readonly buildConfig: pulumi.Output; /** * Most recent production deployment of the project. */ readonly canonicalDeployment: pulumi.Output; /** * When the project was created. */ readonly createdOn: pulumi.Output; /** * Configs for deployments in a project. */ readonly deploymentConfigs: pulumi.Output; /** * A list of associated custom domains for the project. */ readonly domains: pulumi.Output; /** * Framework the project is using. */ readonly framework: pulumi.Output; /** * Version of the framework the project is using. */ readonly frameworkVersion: pulumi.Output; /** * Most recent deployment of the project. */ readonly latestDeployment: pulumi.Output; /** * Name of the project. */ readonly name: pulumi.Output; /** * Name of the preview script. */ readonly previewScriptName: pulumi.Output; /** * Production branch of the project. Used to identify production deployments. */ readonly productionBranch: pulumi.Output; /** * Name of the production script. */ readonly productionScriptName: pulumi.Output; /** * Configs for the project source control. */ readonly source: pulumi.Output; /** * The Cloudflare subdomain associated with the project. */ readonly subdomain: pulumi.Output; /** * Whether the project uses functions. */ readonly usesFunctions: pulumi.Output; /** * Create a PagesProject 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: PagesProjectArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PagesProject resources. */ export interface PagesProjectState { /** * Identifier. */ accountId?: pulumi.Input; /** * Configs for the project build process. */ buildConfig?: pulumi.Input; /** * Most recent production deployment of the project. */ canonicalDeployment?: pulumi.Input; /** * When the project was created. */ createdOn?: pulumi.Input; /** * Configs for deployments in a project. */ deploymentConfigs?: pulumi.Input; /** * A list of associated custom domains for the project. */ domains?: pulumi.Input[]>; /** * Framework the project is using. */ framework?: pulumi.Input; /** * Version of the framework the project is using. */ frameworkVersion?: pulumi.Input; /** * Most recent deployment of the project. */ latestDeployment?: pulumi.Input; /** * Name of the project. */ name?: pulumi.Input; /** * Name of the preview script. */ previewScriptName?: pulumi.Input; /** * Production branch of the project. Used to identify production deployments. */ productionBranch?: pulumi.Input; /** * Name of the production script. */ productionScriptName?: pulumi.Input; /** * Configs for the project source control. */ source?: pulumi.Input; /** * The Cloudflare subdomain associated with the project. */ subdomain?: pulumi.Input; /** * Whether the project uses functions. */ usesFunctions?: pulumi.Input; } /** * The set of arguments for constructing a PagesProject resource. */ export interface PagesProjectArgs { /** * Identifier. */ accountId: pulumi.Input; /** * Configs for the project build process. */ buildConfig?: pulumi.Input; /** * Configs for deployments in a project. */ deploymentConfigs?: pulumi.Input; /** * Name of the project. */ name: pulumi.Input; /** * Production branch of the project. Used to identify production deployments. */ productionBranch: pulumi.Input; /** * Configs for the project source control. */ source?: pulumi.Input; }