f2b025a433
- Add cloud-run-soma.tf: soma-prod-us Cloud Run service in us-central1, neuron-soma-sa service account, soma Artifact Registry repo, Secret Manager secrets for HF token and operator key, serverless NEG, backend service, SSL cert - Add dns-gcp.tf: Cloudflare A record for ai.neurontechnologies.ai pointing to GCP LB IP; Cloudflare provider added to main.tf/variables.tf - Update load-balancer.tf: soma host rule + path matcher, soma SSL cert added to HTTPS proxy - Update outputs.tf: soma service URL and artifact registry URL outputs - Remove legion soma k8s manifests (Legion is gone) - Update AGENTS.md to reflect GCP as primary production environment
58 lines
2.0 KiB
Terraform
58 lines
2.0 KiB
Terraform
variable "project_id" {
|
|
description = "GCP project ID"
|
|
type = string
|
|
default = "neuron-785695"
|
|
}
|
|
|
|
variable "image_tag" {
|
|
description = "Docker image tag to deploy for the marketing site"
|
|
type = string
|
|
default = "latest"
|
|
}
|
|
|
|
variable "accounts_image_tag" {
|
|
description = "Docker image tag to deploy for the accounts service"
|
|
type = string
|
|
default = "latest"
|
|
}
|
|
|
|
variable "api_image_tag" {
|
|
description = "Docker image tag to deploy for the REST API (neuron-rest)"
|
|
type = string
|
|
default = "latest"
|
|
}
|
|
|
|
variable "cloudflare_zone_id_neurontechnologies" {
|
|
description = "Cloudflare zone ID for neurontechnologies.ai (look up from Legion Terraform state or Cloudflare dashboard)"
|
|
type = string
|
|
# Set this in terraform.tfvars — do not hardcode here.
|
|
# To find: cloudflare_zone.neurontechnologies_ai.id in the Legion Terraform state,
|
|
# or: curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=neurontechnologies.ai" -H "X-Auth-Email: andersonwilliam85@gmail.com" -H "X-Auth-Key: <key>"
|
|
}
|
|
|
|
variable "cloudflare_api_key" {
|
|
description = "Cloudflare global API key (from Vault: secret/cloudflare api_key)"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "cloudflare_email" {
|
|
description = "Cloudflare account email (from Vault: secret/cloudflare email)"
|
|
type = string
|
|
}
|
|
|
|
locals {
|
|
project_id = var.project_id
|
|
|
|
# Image refs per service
|
|
marketing_image = "us-central1-docker.pkg.dev/${var.project_id}/neuron-marketing/marketing:${var.image_tag}"
|
|
accounts_image = "us-central1-docker.pkg.dev/${var.project_id}/neuron-accounts/accounts:${var.accounts_image_tag}"
|
|
api_image = "us-central1-docker.pkg.dev/${var.project_id}/neuron-api/api:${var.api_image_tag}"
|
|
|
|
# Keep backward-compat alias (used in cloud-run.tf for marketing service)
|
|
image = local.marketing_image
|
|
|
|
# Static publishable key (not sensitive — lives in source)
|
|
stripe_publishable_key = "pk_live_51TPoHnJg9Fv1D3AUPMXnYyOJIVhn1FyH56zCMNnATo9tR7pO9lNDbXncp6VeDxm38qSdBHZPfqEBipUh3GZsWNyd00jvIO97E6"
|
|
}
|