@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
475 lines (474 loc) • 20.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Standard App Version resource to create a new version of standard GAE Application.
* Learn about the differences between the standard environment and the flexible environment
* at https://cloud.google.com/appengine/docs/the-appengine-environments.
* Currently supporting Zip and File Containers.
*
* To get more information about StandardAppVersion, see:
*
* * [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/appengine/docs/standard)
*
* ## Example Usage
*
* ### App Engine Standard App Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const customServiceAccount = new gcp.serviceaccount.Account("custom_service_account", {
* accountId: "my-account",
* displayName: "Custom Service Account",
* });
* const gaeApi = new gcp.projects.IAMMember("gae_api", {
* project: customServiceAccount.project,
* role: "roles/compute.networkUser",
* member: pulumi.interpolate`serviceAccount:${customServiceAccount.email}`,
* });
* const storageViewer = new gcp.projects.IAMMember("storage_viewer", {
* project: customServiceAccount.project,
* role: "roles/storage.objectViewer",
* member: pulumi.interpolate`serviceAccount:${customServiceAccount.email}`,
* });
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "appengine-static-content",
* location: "US",
* });
* const object = new gcp.storage.BucketObject("object", {
* name: "hello-world.zip",
* bucket: bucket.name,
* source: new pulumi.asset.FileAsset("./test-fixtures/hello-world.zip"),
* });
* const myappV1 = new gcp.appengine.StandardAppVersion("myapp_v1", {
* versionId: "v1",
* service: "myapp",
* runtime: "nodejs20",
* entrypoint: {
* shell: "node ./app.js",
* },
* deployment: {
* zip: {
* sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${bucket.name}/${object.name}`,
* },
* },
* envVariables: {
* port: "8080",
* },
* automaticScaling: {
* maxConcurrentRequests: 10,
* minIdleInstances: 1,
* maxIdleInstances: 3,
* minPendingLatency: "1s",
* maxPendingLatency: "5s",
* standardSchedulerSettings: {
* targetCpuUtilization: 0.5,
* targetThroughputUtilization: 0.75,
* minInstances: 2,
* maxInstances: 10,
* },
* },
* deleteServiceOnDestroy: true,
* serviceAccount: customServiceAccount.email,
* });
* const myappV2 = new gcp.appengine.StandardAppVersion("myapp_v2", {
* versionId: "v2",
* service: "myapp",
* runtime: "nodejs20",
* appEngineApis: true,
* entrypoint: {
* shell: "node ./app.js",
* },
* deployment: {
* zip: {
* sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${bucket.name}/${object.name}`,
* },
* },
* envVariables: {
* port: "8080",
* },
* basicScaling: {
* maxInstances: 5,
* },
* noopOnDestroy: true,
* serviceAccount: customServiceAccount.email,
* });
* ```
*
* ## Import
*
* StandardAppVersion can be imported using any of these accepted formats:
*
* * `apps/{{project}}/services/{{service}}/versions/{{version_id}}`
*
* * `{{project}}/{{service}}/{{version_id}}`
*
* * `{{service}}/{{version_id}}`
*
* When using the `pulumi import` command, StandardAppVersion can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default apps/{{project}}/services/{{service}}/versions/{{version_id}}
* ```
*
* ```sh
* $ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default {{project}}/{{service}}/{{version_id}}
* ```
*
* ```sh
* $ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default {{service}}/{{version_id}}
* ```
*/
export declare class StandardAppVersion extends pulumi.CustomResource {
/**
* Get an existing StandardAppVersion 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<pulumi.ID>, state?: StandardAppVersionState, opts?: pulumi.CustomResourceOptions): StandardAppVersion;
/**
* Returns true if the given object is an instance of StandardAppVersion. 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 StandardAppVersion;
/**
* Allows App Engine second generation runtimes to access the legacy bundled services.
*/
readonly appEngineApis: pulumi.Output<boolean | undefined>;
/**
* Automatic scaling is based on request rate, response latencies, and other application metrics.
* Structure is documented below.
*/
readonly automaticScaling: pulumi.Output<outputs.appengine.StandardAppVersionAutomaticScaling | undefined>;
/**
* Basic scaling creates instances when your application receives requests. Each instance will be shut down when the application becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
* Structure is documented below.
*/
readonly basicScaling: pulumi.Output<outputs.appengine.StandardAppVersionBasicScaling | undefined>;
/**
* If set to `true`, the service will be deleted if it is the last version.
*/
readonly deleteServiceOnDestroy: pulumi.Output<boolean | undefined>;
/**
* Code and application artifacts that make up this version.
* Structure is documented below.
*/
readonly deployment: pulumi.Output<outputs.appengine.StandardAppVersionDeployment>;
/**
* The entrypoint for the application.
* Structure is documented below.
*/
readonly entrypoint: pulumi.Output<outputs.appengine.StandardAppVersionEntrypoint>;
/**
* Environment variables available to the application.
*/
readonly envVariables: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* An ordered list of URL-matching patterns that should be applied to incoming requests.
* The first matching URL handles the request and other request handlers are not attempted.
* Structure is documented below.
*/
readonly handlers: pulumi.Output<outputs.appengine.StandardAppVersionHandler[]>;
/**
* A list of the types of messages that this application is able to receive.
* Each value may be one of: `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, `INBOUND_SERVICE_WARMUP`.
*/
readonly inboundServices: pulumi.Output<string[] | undefined>;
/**
* Instance class that is used to run this version. Valid values are
* AutomaticScaling: F1, F2, F4, F4_1G
* BasicScaling or ManualScaling: B1, B2, B4, B4_1G, B8
* Defaults to F1 for AutomaticScaling and B2 for ManualScaling and BasicScaling. If no scaling is specified, AutomaticScaling is chosen.
*/
readonly instanceClass: pulumi.Output<string>;
/**
* Configuration for third-party Python runtime libraries that are required by the application.
* Structure is documented below.
*/
readonly libraries: pulumi.Output<outputs.appengine.StandardAppVersionLibrary[] | undefined>;
/**
* A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
* Structure is documented below.
*/
readonly manualScaling: pulumi.Output<outputs.appengine.StandardAppVersionManualScaling | undefined>;
/**
* Full path to the Version resource in the API. Example, "v1".
*/
readonly name: pulumi.Output<string>;
/**
* If set to `true`, the application version will not be deleted.
*/
readonly noopOnDestroy: pulumi.Output<boolean | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Desired runtime. Example python27.
*/
readonly runtime: pulumi.Output<string>;
/**
* The version of the API in the given runtime environment.
* Please see the app.yaml reference for valid values at `https://cloud.google.com/appengine/docs/standard/<language>/config/appref`\
* Substitute `<language>` with `python`, `java`, `php`, `ruby`, `go` or `nodejs`.
*/
readonly runtimeApiVersion: pulumi.Output<string | undefined>;
/**
* AppEngine service resource
*/
readonly service: pulumi.Output<string>;
/**
* The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
*/
readonly serviceAccount: pulumi.Output<string>;
/**
* Whether multiple requests can be dispatched to this version at once.
*/
readonly threadsafe: pulumi.Output<boolean | undefined>;
/**
* Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names,"default", "latest", and any name with the prefix "ah-".
*/
readonly versionId: pulumi.Output<string | undefined>;
/**
* Enables VPC connectivity for standard apps.
* Structure is documented below.
*/
readonly vpcAccessConnector: pulumi.Output<outputs.appengine.StandardAppVersionVpcAccessConnector | undefined>;
/**
* Create a StandardAppVersion 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: StandardAppVersionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering StandardAppVersion resources.
*/
export interface StandardAppVersionState {
/**
* Allows App Engine second generation runtimes to access the legacy bundled services.
*/
appEngineApis?: pulumi.Input<boolean>;
/**
* Automatic scaling is based on request rate, response latencies, and other application metrics.
* Structure is documented below.
*/
automaticScaling?: pulumi.Input<inputs.appengine.StandardAppVersionAutomaticScaling>;
/**
* Basic scaling creates instances when your application receives requests. Each instance will be shut down when the application becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
* Structure is documented below.
*/
basicScaling?: pulumi.Input<inputs.appengine.StandardAppVersionBasicScaling>;
/**
* If set to `true`, the service will be deleted if it is the last version.
*/
deleteServiceOnDestroy?: pulumi.Input<boolean>;
/**
* Code and application artifacts that make up this version.
* Structure is documented below.
*/
deployment?: pulumi.Input<inputs.appengine.StandardAppVersionDeployment>;
/**
* The entrypoint for the application.
* Structure is documented below.
*/
entrypoint?: pulumi.Input<inputs.appengine.StandardAppVersionEntrypoint>;
/**
* Environment variables available to the application.
*/
envVariables?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* An ordered list of URL-matching patterns that should be applied to incoming requests.
* The first matching URL handles the request and other request handlers are not attempted.
* Structure is documented below.
*/
handlers?: pulumi.Input<pulumi.Input<inputs.appengine.StandardAppVersionHandler>[]>;
/**
* A list of the types of messages that this application is able to receive.
* Each value may be one of: `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, `INBOUND_SERVICE_WARMUP`.
*/
inboundServices?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Instance class that is used to run this version. Valid values are
* AutomaticScaling: F1, F2, F4, F4_1G
* BasicScaling or ManualScaling: B1, B2, B4, B4_1G, B8
* Defaults to F1 for AutomaticScaling and B2 for ManualScaling and BasicScaling. If no scaling is specified, AutomaticScaling is chosen.
*/
instanceClass?: pulumi.Input<string>;
/**
* Configuration for third-party Python runtime libraries that are required by the application.
* Structure is documented below.
*/
libraries?: pulumi.Input<pulumi.Input<inputs.appengine.StandardAppVersionLibrary>[]>;
/**
* A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
* Structure is documented below.
*/
manualScaling?: pulumi.Input<inputs.appengine.StandardAppVersionManualScaling>;
/**
* Full path to the Version resource in the API. Example, "v1".
*/
name?: pulumi.Input<string>;
/**
* If set to `true`, the application version will not be deleted.
*/
noopOnDestroy?: pulumi.Input<boolean>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Desired runtime. Example python27.
*/
runtime?: pulumi.Input<string>;
/**
* The version of the API in the given runtime environment.
* Please see the app.yaml reference for valid values at `https://cloud.google.com/appengine/docs/standard/<language>/config/appref`\
* Substitute `<language>` with `python`, `java`, `php`, `ruby`, `go` or `nodejs`.
*/
runtimeApiVersion?: pulumi.Input<string>;
/**
* AppEngine service resource
*/
service?: pulumi.Input<string>;
/**
* The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
*/
serviceAccount?: pulumi.Input<string>;
/**
* Whether multiple requests can be dispatched to this version at once.
*/
threadsafe?: pulumi.Input<boolean>;
/**
* Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names,"default", "latest", and any name with the prefix "ah-".
*/
versionId?: pulumi.Input<string>;
/**
* Enables VPC connectivity for standard apps.
* Structure is documented below.
*/
vpcAccessConnector?: pulumi.Input<inputs.appengine.StandardAppVersionVpcAccessConnector>;
}
/**
* The set of arguments for constructing a StandardAppVersion resource.
*/
export interface StandardAppVersionArgs {
/**
* Allows App Engine second generation runtimes to access the legacy bundled services.
*/
appEngineApis?: pulumi.Input<boolean>;
/**
* Automatic scaling is based on request rate, response latencies, and other application metrics.
* Structure is documented below.
*/
automaticScaling?: pulumi.Input<inputs.appengine.StandardAppVersionAutomaticScaling>;
/**
* Basic scaling creates instances when your application receives requests. Each instance will be shut down when the application becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
* Structure is documented below.
*/
basicScaling?: pulumi.Input<inputs.appengine.StandardAppVersionBasicScaling>;
/**
* If set to `true`, the service will be deleted if it is the last version.
*/
deleteServiceOnDestroy?: pulumi.Input<boolean>;
/**
* Code and application artifacts that make up this version.
* Structure is documented below.
*/
deployment: pulumi.Input<inputs.appengine.StandardAppVersionDeployment>;
/**
* The entrypoint for the application.
* Structure is documented below.
*/
entrypoint: pulumi.Input<inputs.appengine.StandardAppVersionEntrypoint>;
/**
* Environment variables available to the application.
*/
envVariables?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* An ordered list of URL-matching patterns that should be applied to incoming requests.
* The first matching URL handles the request and other request handlers are not attempted.
* Structure is documented below.
*/
handlers?: pulumi.Input<pulumi.Input<inputs.appengine.StandardAppVersionHandler>[]>;
/**
* A list of the types of messages that this application is able to receive.
* Each value may be one of: `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, `INBOUND_SERVICE_WARMUP`.
*/
inboundServices?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Instance class that is used to run this version. Valid values are
* AutomaticScaling: F1, F2, F4, F4_1G
* BasicScaling or ManualScaling: B1, B2, B4, B4_1G, B8
* Defaults to F1 for AutomaticScaling and B2 for ManualScaling and BasicScaling. If no scaling is specified, AutomaticScaling is chosen.
*/
instanceClass?: pulumi.Input<string>;
/**
* Configuration for third-party Python runtime libraries that are required by the application.
* Structure is documented below.
*/
libraries?: pulumi.Input<pulumi.Input<inputs.appengine.StandardAppVersionLibrary>[]>;
/**
* A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
* Structure is documented below.
*/
manualScaling?: pulumi.Input<inputs.appengine.StandardAppVersionManualScaling>;
/**
* If set to `true`, the application version will not be deleted.
*/
noopOnDestroy?: pulumi.Input<boolean>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Desired runtime. Example python27.
*/
runtime: pulumi.Input<string>;
/**
* The version of the API in the given runtime environment.
* Please see the app.yaml reference for valid values at `https://cloud.google.com/appengine/docs/standard/<language>/config/appref`\
* Substitute `<language>` with `python`, `java`, `php`, `ruby`, `go` or `nodejs`.
*/
runtimeApiVersion?: pulumi.Input<string>;
/**
* AppEngine service resource
*/
service: pulumi.Input<string>;
/**
* The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
*/
serviceAccount?: pulumi.Input<string>;
/**
* Whether multiple requests can be dispatched to this version at once.
*/
threadsafe?: pulumi.Input<boolean>;
/**
* Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names,"default", "latest", and any name with the prefix "ah-".
*/
versionId?: pulumi.Input<string>;
/**
* Enables VPC connectivity for standard apps.
* Structure is documented below.
*/
vpcAccessConnector?: pulumi.Input<inputs.appengine.StandardAppVersionVpcAccessConnector>;
}