Google App Engine Application
This page shows how to write Terraform for App Engine Application and write them securely.
google_app_engine_application (Terraform)
The Application in App Engine can be configured in Terraform with the resource name google_app_engine_application. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_app_engine_application" "default" {
location_id = "asia-northeast1"
}
resource "google_app_engine_application" "worker" {
resource "google_app_engine_application" "graphql" {
project = var.gcp_project
location_id = "us-central"
}
resource "google_app_engine_application" "ffmpeg" {
resource "google_app_engine_application" "app" {
project = "lab-devops-cloud-galindo"
location_id = "us-central"
}
resource "google_app_engine_application" "app" {
project = "lab-devops-cloud-diego"
location_id = "us-central"
}
resource "google_app_engine_application" "app" {
project = "lavdevopscloud-moisez"
location_id = "us-east1"
}
Parameters
-
app_idoptional computed - string
Identifier of the app.
-
auth_domainoptional computed - string
The domain to authenticate users with when using App Engine's User API.
-
code_bucketoptional computed - string
The GCS bucket code is being stored in for this app.
-
database_typeoptional computed - string -
default_bucketoptional computed - string
The GCS bucket content is being stored in for this app.
-
default_hostnameoptional computed - string
The default hostname for this app.
-
gcr_domainoptional computed - string
The GCR domain used for storing managed Docker images for this app.
-
idoptional computed - string -
location_idrequired - string
The location to serve the app from.
-
nameoptional computed - string
Unique name of the app.
-
projectoptional computed - string
The project ID to create the application under.
-
serving_statusoptional computed - string
The serving status of the app.
-
url_dispatch_ruleoptional computed - list of object
A list of dispatch rule blocks. Each block has a domain, path, and service field.
-
domain- string -
path- string -
service- string -
feature_settingslist block-
split_health_checksrequired - bool
-
-
iaplist block-
enabledoptional - bool
Adapted for use with the app
-
oauth2_client_idrequired - string
OAuth2 client ID to use for the authentication flow.
-
oauth2_client_secretrequired - string
OAuth2 client secret to use for the authentication flow. The SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
-
oauth2_client_secret_sha256optional computed - string
Hex-encoded SHA-256 hash of the client secret.
-
-
timeoutssingle block
Explanation in Terraform Registry
Allows creation and management of an App Engine application.
App Engine applications cannot be deleted once they're created; you have to delete the entire project to delete the application. Terraform will report the application has been successfully deleted; this is a limitation of Terraform, and will go away in the future. Terraform is not able to delete App Engine applications.
Warning: All arguments including
iap.oauth2_client_secretwill be stored in the raw state as plain-text. Read more about sensitive data in state.
Frequently asked questions
What is Google App Engine Application?
Google App Engine Application is a resource for App Engine of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google App Engine Application?
For Terraform, the mfykmn/go-training, yutaroyoshikawa/tipper-terraform and rafagalindo/devopslab-infra source code examples are useful. See the Terraform Example section for further details.