v3/terraform/providers.tf
Katalina 3291f9aacc
big overhaul (#474)
* 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 :(
2022-01-31 20:35:22 -05:00

99 lines
1.7 KiB
HCL

terraform {
required_version = ">=0.14"
required_providers {
google = {
version = ">=3.74.0"
source = "hashicorp/google"
}
google-beta = {
version = ">=3.74.0"
source = "hashicorp/google"
}
cloudflare = {
version = ">=2.23.0"
source = "cloudflare/cloudflare"
}
random = {
version = ">=3.1.0"
source = "hashicorp/random"
}
null = {
version = ">=3.1.0"
source = "hashicorp/null"
}
local = {
version = ">=2.1.0"
source = "hashicorp/local"
}
tls = {
version = ">=3.1.0"
source = "hashicorp/tls"
}
discord-interactions = {
source = "roleypoly/discord-interactions"
version = ">=0.1.0"
}
}
backend "gcs" {
bucket = "roleypoly-tfstate"
}
}
variable "cloudflare_api_token" {
type = string
sensitive = true
}
variable "cloudflare_origin_ca_key" {
type = string
sensitive = true
}
variable "cloudflare_account_id" {
type = string
sensitive = true
}
variable "cloudflare_zone_id" {
type = string
sensitive = true
}
provider "cloudflare" {
api_token = var.cloudflare_api_token
account_id = var.cloudflare_account_id
api_user_service_key = var.cloudflare_origin_ca_key
}
variable "gcp_project" {
type = string
sensitive = true
}
variable "gcp_region" {
type = string
default = "us-east4"
}
provider "google" {
project = var.gcp_project
region = var.gcp_region
}
provider "google-beta" {
project = var.gcp_project
region = var.gcp_region
}
provider "discord-interactions" {
application_id = var.bot_client_id
bot_token = var.bot_token
}