autumn-cli 0.7.0

CLI tool for the Autumn web framework
# outputs.tf — generated by `autumn release init --target gcp-cloud-run`

# local.service_url_host (also used for AUTUMN_SECURITY__TRUSTED_HOSTS__HOSTS
# in main.tf), not google_cloud_run_v2_service.this.uri — both resolve to the
# same hostname today, but the local is plan-time-derivable from the project
# number and never depends on the service resource actually having been
# created yet, matching what a real client's Host header carries from the
# very first successful deploy.
output "service_url" {
  description = "Stable public HTTPS URL of the deployed {{project_name}} Cloud Run service."
  value       = "https://${local.service_url_host}"
}

# The sanitized name Terraform actually gave the Cloud Run service
# (local.app_name_safe) — never the raw project name baked in at scaffold
# time. If `app_name` is later edited in terraform.tfvars, this output (and
# therefore gcp-deploy.yml, which reads it as a workflow variable rather
# than hardcoding a name) tracks the change automatically.
output "service_name" {
  description = "Sanitized name of the Cloud Run service (see local.app_name_safe)."
  value       = google_cloud_run_v2_service.this.name
}

output "artifact_registry_repository_url" {
  description = "Artifact Registry repository URL (used by `docker push`/`docker login` and the gcp-deploy.yml workflow)."
  value       = "${var.region}-docker.pkg.dev/${var.project_id}/${google_artifact_registry_repository.this.repository_id}"
}

output "migrate_job_name" {
  description = "Name of the one-shot Cloud Run Job that runs `autumn migrate`; gcp-deploy.yml updates its image and executes it before deploying a new image to the service."
  value       = google_cloud_run_v2_job.migrate.name
}

output "service_account_email" {
  description = "Email of the runtime service account shared by the Cloud Run service and the migration job."
  value       = google_service_account.cloud_run.email
}

output "sql_instance_connection_name" {
  description = "Cloud SQL instance connection name (project:region:instance), useful for `gcloud sql connect` or the Cloud SQL Auth Proxy during local debugging against the private instance."
  value       = google_sql_database_instance.this.connection_name
}

output "region" {
  description = "GCP region `terraform apply` provisioned into — used by every `gcloud` call in the deploy walkthrough/CI so they always target the same region Terraform used."
  value       = var.region
}

# `gcloud`'s "current project" is whatever `gcloud config get-value project`
# (or the operator's ambient shell state) happens to be set to — not
# necessarily this project. Every `gcloud run`/`gcloud sql` call in the
# deploy walkthrough must pass `--project` explicitly with this value, or it
# can silently target the wrong project (or fail to find the resources this
# apply just created) if the two ever diverge.
output "project_id" {
  description = "GCP project `terraform apply` provisioned into — pass as `--project` to every `gcloud` call in the deploy walkthrough so it never depends on gcloud's ambient current-project setting."
  value       = var.project_id
}