StandardAppVersionArgs

data class StandardAppVersionArgs(val appEngineApis: Output<Boolean>? = null, val automaticScaling: Output<StandardAppVersionAutomaticScalingArgs>? = null, val basicScaling: Output<StandardAppVersionBasicScalingArgs>? = null, val deleteServiceOnDestroy: Output<Boolean>? = null, val deployment: Output<StandardAppVersionDeploymentArgs>? = null, val entrypoint: Output<StandardAppVersionEntrypointArgs>? = null, val envVariables: Output<Map<String, String>>? = null, val handlers: Output<List<StandardAppVersionHandlerArgs>>? = null, val inboundServices: Output<List<String>>? = null, val instanceClass: Output<String>? = null, val libraries: Output<List<StandardAppVersionLibraryArgs>>? = null, val manualScaling: Output<StandardAppVersionManualScalingArgs>? = null, val noopOnDestroy: Output<Boolean>? = null, val project: Output<String>? = null, val runtime: Output<String>? = null, val runtimeApiVersion: Output<String>? = null, val service: Output<String>? = null, val serviceAccount: Output<String>? = null, val threadsafe: Output<Boolean>? = null, val versionId: Output<String>? = null, val vpcAccessConnector: Output<StandardAppVersionVpcAccessConnectorArgs>? = null) : ConvertibleToJava<StandardAppVersionArgs>

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:

Example Usage

App Engine Standard App Version

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.appengine.StandardAppVersion;
import com.pulumi.gcp.appengine.StandardAppVersionArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionEntrypointArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionDeploymentArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionDeploymentZipArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionAutomaticScalingArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionBasicScalingArgs;
import com.pulumi.asset.FileAsset;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var customServiceAccount = new Account("customServiceAccount", AccountArgs.builder()
.accountId("my-account")
.displayName("Custom Service Account")
.build());
var gaeApi = new IAMMember("gaeApi", IAMMemberArgs.builder()
.project(customServiceAccount.project())
.role("roles/compute.networkUser")
.member(customServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
var storageViewer = new IAMMember("storageViewer", IAMMemberArgs.builder()
.project(customServiceAccount.project())
.role("roles/storage.objectViewer")
.member(customServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
var bucket = new Bucket("bucket", BucketArgs.builder()
.location("US")
.build());
var object = new BucketObject("object", BucketObjectArgs.builder()
.bucket(bucket.name())
.source(new FileAsset("./test-fixtures/hello-world.zip"))
.build());
var myappV1 = new StandardAppVersion("myappV1", StandardAppVersionArgs.builder()
.versionId("v1")
.service("myapp")
.runtime("nodejs10")
.entrypoint(StandardAppVersionEntrypointArgs.builder()
.shell("node ./app.js")
.build())
.deployment(StandardAppVersionDeploymentArgs.builder()
.zip(StandardAppVersionDeploymentZipArgs.builder()
.sourceUrl(Output.tuple(bucket.name(), object.name()).applyValue(values -> {
var bucketName = values.t1;
var objectName = values.t2;
return String.format("https://storage.googleapis.com/%s/%s", bucketName,objectName);
}))
.build())
.build())
.envVariables(Map.of("port", "8080"))
.automaticScaling(StandardAppVersionAutomaticScalingArgs.builder()
.maxConcurrentRequests(10)
.minIdleInstances(1)
.maxIdleInstances(3)
.minPendingLatency("1s")
.maxPendingLatency("5s")
.standardSchedulerSettings(StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs.builder()
.targetCpuUtilization(0.5)
.targetThroughputUtilization(0.75)
.minInstances(2)
.maxInstances(10)
.build())
.build())
.deleteServiceOnDestroy(true)
.serviceAccount(customServiceAccount.email())
.build());
var myappV2 = new StandardAppVersion("myappV2", StandardAppVersionArgs.builder()
.versionId("v2")
.service("myapp")
.runtime("nodejs10")
.appEngineApis(true)
.entrypoint(StandardAppVersionEntrypointArgs.builder()
.shell("node ./app.js")
.build())
.deployment(StandardAppVersionDeploymentArgs.builder()
.zip(StandardAppVersionDeploymentZipArgs.builder()
.sourceUrl(Output.tuple(bucket.name(), object.name()).applyValue(values -> {
var bucketName = values.t1;
var objectName = values.t2;
return String.format("https://storage.googleapis.com/%s/%s", bucketName,objectName);
}))
.build())
.build())
.envVariables(Map.of("port", "8080"))
.basicScaling(StandardAppVersionBasicScalingArgs.builder()
.maxInstances(5)
.build())
.noopOnDestroy(true)
.serviceAccount(customServiceAccount.email())
.build());
}
}

Import

StandardAppVersion can be imported using any of these accepted formats

$ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default apps/{{project}}/services/{{service}}/versions/{{version_id}}
$ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default {{project}}/{{service}}/{{version_id}}
$ pulumi import gcp:appengine/standardAppVersion:StandardAppVersion default {{service}}/{{version_id}}

Constructors

Link copied to clipboard
constructor(appEngineApis: Output<Boolean>? = null, automaticScaling: Output<StandardAppVersionAutomaticScalingArgs>? = null, basicScaling: Output<StandardAppVersionBasicScalingArgs>? = null, deleteServiceOnDestroy: Output<Boolean>? = null, deployment: Output<StandardAppVersionDeploymentArgs>? = null, entrypoint: Output<StandardAppVersionEntrypointArgs>? = null, envVariables: Output<Map<String, String>>? = null, handlers: Output<List<StandardAppVersionHandlerArgs>>? = null, inboundServices: Output<List<String>>? = null, instanceClass: Output<String>? = null, libraries: Output<List<StandardAppVersionLibraryArgs>>? = null, manualScaling: Output<StandardAppVersionManualScalingArgs>? = null, noopOnDestroy: Output<Boolean>? = null, project: Output<String>? = null, runtime: Output<String>? = null, runtimeApiVersion: Output<String>? = null, service: Output<String>? = null, serviceAccount: Output<String>? = null, threadsafe: Output<Boolean>? = null, versionId: Output<String>? = null, vpcAccessConnector: Output<StandardAppVersionVpcAccessConnectorArgs>? = null)

Properties

Link copied to clipboard
val appEngineApis: Output<Boolean>? = null

Allows App Engine second generation runtimes to access the legacy bundled services.

Link copied to clipboard

Automatic scaling is based on request rate, response latencies, and other application metrics. Structure is documented below.

Link copied to clipboard

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.

Link copied to clipboard
val deleteServiceOnDestroy: Output<Boolean>? = null

If set to true, the service will be deleted if it is the last version.

Link copied to clipboard

Code and application artifacts that make up this version. Structure is documented below.

Link copied to clipboard

The entrypoint for the application. Structure is documented below.

Link copied to clipboard
val envVariables: Output<Map<String, String>>? = null

Environment variables available to the application.

Link copied to clipboard

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.

Link copied to clipboard
val inboundServices: Output<List<String>>? = null

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.

Link copied to clipboard
val instanceClass: Output<String>? = null

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.

Link copied to clipboard

Configuration for third-party Python runtime libraries that are required by the application. Structure is documented below.

Link copied to clipboard

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.

Link copied to clipboard
val noopOnDestroy: Output<Boolean>? = null

If set to true, the application version will not be deleted.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val runtime: Output<String>? = null

Desired runtime. Example python27.

Link copied to clipboard
val runtimeApiVersion: Output<String>? = null

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.

Link copied to clipboard
val service: Output<String>? = null

AppEngine service resource

Link copied to clipboard
val serviceAccount: Output<String>? = null

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.

Link copied to clipboard
val threadsafe: Output<Boolean>? = null

Whether multiple requests can be dispatched to this version at once.

Link copied to clipboard
val versionId: Output<String>? = null

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-".

Link copied to clipboard

Enables VPC connectivity for standard apps. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): StandardAppVersionArgs