more ci/cd work, build worker and publish

This commit is contained in:
41666 2020-12-06 17:59:24 -05:00
parent 0b769913fb
commit 95a5732457
5 changed files with 185 additions and 9 deletions

View file

@ -26,6 +26,10 @@ terraform {
source = "hashicorp/null"
}
}
backend "gcs" {
bucket = "roleypoly-tfstate"
}
}
variable "cloudflare_email" {

View file

@ -40,6 +40,12 @@ variable "api_public_uri" {
description = "API Public Base Path"
}
variable "api_path_to_worker" {
type = string
description = "Path to worker JS, relative to this file/terraform folder."
default = "../worker/script.js"
}
variable "root_users" {
type = list(string)
description = "Root users to use for role elevation calculations"

View file

@ -12,7 +12,7 @@ resource "cloudflare_workers_kv_namespace" "guild_data" {
resource "cloudflare_worker_script" "backend" {
name = "roleypoly-backend-${var.environment_tag}"
content = file("${path.module}/../worker/script.js")
content = file("${path.module}/${var.api_path_to_worker}")
kv_namespace_binding {
name = "KV_SESSIONS"