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_id
optional computed - string
Identifier of the app.
-
auth_domain
optional computed - string
The domain to authenticate users with when using App Engine's User API.
-
code_bucket
optional computed - string
The GCS bucket code is being stored in for this app.
-
database_type
optional computed - string -
default_bucket
optional computed - string
The GCS bucket content is being stored in for this app.
-
default_hostname
optional computed - string
The default hostname for this app.
-
gcr_domain
optional computed - string
The GCR domain used for storing managed Docker images for this app.
-
id
optional computed - string -
location_id
required - string
The location to serve the app from.
-
name
optional computed - string
Unique name of the app.
-
project
optional computed - string
The project ID to create the application under.
-
serving_status
optional computed - string
The serving status of the app.
-
url_dispatch_rule
optional 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_settings
list block-
split_health_checks
required - bool
-
-
iap
list block-
enabled
optional - bool
Adapted for use with the app
-
oauth2_client_id
required - string
OAuth2 client ID to use for the authentication flow.
-
oauth2_client_secret
required - 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_sha256
optional computed - string
Hex-encoded SHA-256 hash of the client secret.
-
-
timeouts
single 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_secret
will 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.