I can deploy my App Engine app without problems by gcloud app deploy command
With Terraform, deploy successfully but traffic allocation is 0%
I search official of Terraform for App Engine - standard app version, but it seems no option for setting traffic. If you know how to set this, please tell me. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/app_engine_standard_app_version
My main.tf code
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "<= 3.49"
}
}
}
provider "google" {
project = "{my-project}"
credentials = "{my-service-account-key.json}"
zone = "asia-northeast1-a"
}
resource "random_string" "random" {
length = 16
upper = false
special = false
# override_special = "/@£$"
}
output "version_id" {
value = random_string.random.id
}
resource "google_app_engine_standard_app_version" "default" {
version_id = random_string.random.id
project = "{my-project}"
service = "default"
runtime = "nodejs16"
instance_class = "F4_1G"
deployment {
zip {
source_url = "https://storage.googleapis.com/{my-bucket}/source.zip"
}
}
entrypoint {
shell = "yarn install && yarn start"
}
delete_service_on_destroy = true
}