mirror of
https://github.com/immich-app/geoshenanigans.git
synced 2026-09-30 13:23:08 +08:00
feat: add tigris terraform provider and mise config (#236)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
[tools]
|
||||
opentofu = "1.11.5"
|
||||
terragrunt = "0.99.4"
|
||||
|
||||
[tasks.tg]
|
||||
run = "op run '--env-file={{config_root}}/deployment/.env' -- terragrunt"
|
||||
description = "Wrapper for terragrunt"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[tasks."tg:fmt"]
|
||||
run = "mise run tg hclfmt"
|
||||
description = "Format terragrunt files"
|
||||
|
||||
[tasks.tf]
|
||||
run = "mise run tg run --all"
|
||||
description = "Wrapper for terragrunt run-all"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[tasks."tf:fmt"]
|
||||
run = "tofu fmt -recursive deployment/"
|
||||
description = "Format terraform files"
|
||||
|
||||
[tasks."tf:init"]
|
||||
run = "mise run tf init -- -reconfigure"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[tasks."tf:plan"]
|
||||
run = "mise run tf plan"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[tasks."tf:apply"]
|
||||
run = "mise run tf apply"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[tasks."tf:destroy"]
|
||||
run = "mise run tf destroy"
|
||||
dir = "{{cwd}}"
|
||||
|
||||
[settings]
|
||||
experimental = true
|
||||
idiomatic_version_file_enable_tools = []
|
||||
@@ -9,4 +9,7 @@ export TF_VAR_grafana_url="op://tf_$ENVIRONMENT/MONITORING_GRAFANA_URL/password"
|
||||
export TF_VAR_tigris_read_key_id="op://tf/TIGRIS_READ_KEY_ID/password"
|
||||
export TF_VAR_tigris_read_access_key="op://tf/TIGRIS_READ_ACCESS_KEY/password"
|
||||
|
||||
export TF_VAR_tigris_admin_access_key="op://tf/TIGRIS_ADMIN_KEY_ID/password"
|
||||
export TF_VAR_tigris_admin_secret_key="op://tf/TIGRIS_ADMIN_ACCESS_KEY/password"
|
||||
|
||||
export TF_VAR_env=$ENVIRONMENT
|
||||
|
||||
@@ -36,3 +36,25 @@ provider "registry.opentofu.org/cloudflare/cloudflare" {
|
||||
"zh:ee964a6573d399a5dd22ce328fb38ca1207797a02248f14b2e4913ee390e7803",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.opentofu.org/tigrisdata/tigris" {
|
||||
version = "1.1.3"
|
||||
hashes = [
|
||||
"h1:x3JPdCEL0lTm0I8b9XFH5csYc4vo50JvHBW62OB7IDo=",
|
||||
"zh:3be395ec0dee5e38513b1bfcacf528019074fa0cbe6d6609079ee895e79efaa4",
|
||||
"zh:3c507d01b0d3cc1b4bd03441ade85ff6f1f18e3e2bfaa4ec83d45de0e2140124",
|
||||
"zh:68ddda3ba2438c29c0a232bf2c912e59ccda863721af03e736516819d839638f",
|
||||
"zh:6f45e9971cd1c5234e892ecdf5c322a2b0f9690be93b367d5f1e8dd3b6cd1231",
|
||||
"zh:71b44de2410987e6fcdde6694bfd5ee6181aff888ae35c39141e584ccb5c7c71",
|
||||
"zh:96785b246ffacc1dcae03e504930d1394980139a6b05661edf69736f503857ae",
|
||||
"zh:addb533d391d07b2d9e583ffc9540cdd8e591a7e098baa254183baba31cf13da",
|
||||
"zh:b0b7cd2d2c6961f3e89bc16426d9a04653337286374c70e27035e3152858451c",
|
||||
"zh:bca97a5e3e8167476e32563f32c576ea956c9f96dcfabc2b1fe6cf9231ffba62",
|
||||
"zh:c41bb2d56ff9a5052c89d0a73ade4fd6fdd35b109710b1836c2f65af34ac3d50",
|
||||
"zh:c839b9194c675e74500683aee6bd6112c35e977f20b815886c73c6c96d578269",
|
||||
"zh:cd29c2a8e9f7e4da07f5967fd5989bf1be4dc38236cf289c1d427f614ddfbfc0",
|
||||
"zh:cfa805d80f845d6013f42150823bee6919fe95195f65e8fcebd164a5f11a5534",
|
||||
"zh:f809ab383cca0a5f83072981c64208cbd7fa67e986a86ee02dd2c82333221e32",
|
||||
"zh:fc0b577f1b2f362eaf528264f4a180c1d9c6ae3b72c46bedbbf5ddf60e5588be",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -9,5 +9,8 @@ terraform {
|
||||
source = "cloudflare/cloudflare"
|
||||
version = "4.52.5"
|
||||
}
|
||||
tigris = {
|
||||
source = "tigrisdata/tigris"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
provider "cloudflare" {
|
||||
api_token = data.terraform_remote_state.api_keys_state.outputs.terraform_key_cloudflare_account
|
||||
}
|
||||
|
||||
provider "tigris" {
|
||||
access_key = var.tigris_admin_access_key
|
||||
secret_key = var.tigris_admin_secret_key
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
import {
|
||||
to = tigris_bucket.tiles_geo
|
||||
id = "tiles-geo"
|
||||
}
|
||||
|
||||
resource "tigris_bucket" "tiles_geo" {
|
||||
bucket = "tiles-geo"
|
||||
default_storage_tier = "STANDARD"
|
||||
enable_snapshot = false
|
||||
|
||||
location {
|
||||
type = "dual"
|
||||
regions = [
|
||||
"fra",
|
||||
"gru",
|
||||
"hkg",
|
||||
"iad",
|
||||
"jnb",
|
||||
"lhr",
|
||||
"nrt",
|
||||
"ord",
|
||||
"sin",
|
||||
"sjc",
|
||||
"syd",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
import {
|
||||
to = tigris_bucket.reverse_geocoding
|
||||
id = "geoshenanigans-reverse-geocoding"
|
||||
}
|
||||
|
||||
resource "tigris_bucket" "reverse_geocoding" {
|
||||
bucket = "geoshenanigans-reverse-geocoding"
|
||||
default_storage_tier = "STANDARD"
|
||||
enable_snapshot = false
|
||||
|
||||
location {
|
||||
type = "dual"
|
||||
regions = [
|
||||
"ams",
|
||||
"fra",
|
||||
"gru",
|
||||
"iad",
|
||||
"jnb",
|
||||
"lhr",
|
||||
"nrt",
|
||||
"ord",
|
||||
"sin",
|
||||
"sjc",
|
||||
"syd",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -2,3 +2,6 @@ variable "cloudflare_account_id" {}
|
||||
variable "tf_state_postgres_conn_str" {}
|
||||
|
||||
variable "tiles_build_dir" {}
|
||||
|
||||
variable "tigris_admin_access_key" {}
|
||||
variable "tigris_admin_secret_key" {}
|
||||
|
||||
Reference in New Issue
Block a user