mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
* miniflare init * feat(api): add tests * chore: more tests, almost 100% * add sessions/state spec * add majority of routes and datapaths, start on interactions * nevermind, no interactions * nevermind x2, tweetnacl is bad but SubtleCrypto has what we need apparently * simplify interactions verify * add brute force interactions tests * every primary path API route is refactored! * automatically import from legacy, or die trying. * check that we only fetch legacy once, ever * remove old-src, same some historic pieces * remove interactions & worker-utils package, update misc/types * update some packages we don't need specific pinning for anymore * update web references to API routes since they all changed * fix all linting issues, upgrade most packages * fix tests, divorce enzyme where-ever possible * update web, fix integration issues * pre-build api * fix tests * move api pretest to api package.json instead of CI * remove interactions from terraform, fix deploy side configs * update to tf 1.1.4 * prevent double writes to worker in GCS, port to newer GCP auth workflow * fix api.tf var refs, upgrade node action * change to curl-based script upload for worker script due to terraform provider limitations * oh no, cloudflare freaked out :(
103 lines
2.4 KiB
HCL
103 lines
2.4 KiB
HCL
variable "environment_tag" {
|
|
type = string
|
|
description = "Environment to deploy. One of: stage, prod"
|
|
|
|
validation {
|
|
condition = var.environment_tag == "stage" || var.environment_tag == "prod" || var.environment_tag == "test"
|
|
error_message = "You must set environment_tag to one of: test, stage, or prod."
|
|
}
|
|
}
|
|
|
|
variable "ui_regions" {
|
|
type = list(string)
|
|
description = "Cloud Run regions to deploy UI to"
|
|
}
|
|
|
|
variable "ui_tag" {
|
|
type = string
|
|
description = ":tag or @sha265: of *-docker.pkg.dev/roleypoly/roleypoly/ui"
|
|
default = ""
|
|
}
|
|
|
|
variable "bot_client_id" {
|
|
type = string
|
|
description = "Bot Client ID"
|
|
}
|
|
|
|
variable "bot_client_secret" {
|
|
type = string
|
|
description = "Bot Client Secret"
|
|
sensitive = true
|
|
}
|
|
|
|
variable "bot_import_token" {
|
|
type = string
|
|
description = "Bot Import Token"
|
|
sensitive = true
|
|
}
|
|
|
|
variable "bot_token" {
|
|
type = string
|
|
description = "Bot Client Secret"
|
|
sensitive = true
|
|
}
|
|
|
|
variable "ui_public_uri" {
|
|
type = string
|
|
description = "UI Public Base Path"
|
|
}
|
|
|
|
variable "ui_hostnames" {
|
|
type = list(string)
|
|
description = "Hostnames to allow web UI requests from, e.g. roleypoly.com, web-prod.roleypoly.com"
|
|
}
|
|
|
|
variable "api_public_uri" {
|
|
type = string
|
|
description = "API Public Base Path"
|
|
}
|
|
|
|
variable "path_to_worker" {
|
|
type = string
|
|
description = "Path to API worker JS, relative to this file/terraform folder."
|
|
default = "worker-dist/index.mjs"
|
|
}
|
|
|
|
variable "root_users" {
|
|
type = list(string)
|
|
description = "Root users to use for role elevation calculations"
|
|
}
|
|
|
|
variable "deploy_bot" {
|
|
type = bool
|
|
default = false
|
|
description = "Bot is an optional piece of the system. It's only typically deployed in prod."
|
|
}
|
|
|
|
variable "bot_instance_size" {
|
|
type = string
|
|
default = "f1-micro"
|
|
description = "Google Compute Engine VM size"
|
|
}
|
|
|
|
variable "bot_tag" {
|
|
type = string
|
|
default = ""
|
|
description = ":tag or @sha265: of ghcr.io/roleypoly/bot"
|
|
}
|
|
|
|
variable "worker_tag" {
|
|
type = string
|
|
default = ""
|
|
description = "Usually the commit hash, this invalidates some secrets that can always be rotated"
|
|
}
|
|
|
|
variable "allowed_callback_hosts" {
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "discord_public_key" {
|
|
type = string
|
|
description = "Discord Interactions Public Key"
|
|
}
|