tvl-depot/ops/glesys/main.tf
Vincent Ambo 228138395b feat(ops/glesys): Import DNS records for tvl.fyi
These records were previously configured manually in the GleSYS web UI
during our DNS outage (b/155).

Note that I could not find a way to `terraform import` these records
and have instead recreated the set and then cleaned up in the UI.

Since we often point things at whitby, I have extracted variables for
its IPs in this change.

Change-Id: I09fda94d3734e8aaa278fa858e160d046740da1e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4714
Tested-by: BuildkiteCI
Autosubmit: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
2021-12-27 16:42:53 +00:00

62 lines
1.3 KiB
HCL

# Configure TVL resources hosted with GleSYS.
#
# Most importantly:
# - all of our DNS
# - object storage (e.g. backups)
terraform {
required_providers {
glesys = {
source = "depot/glesys"
}
}
backend "s3" {
endpoint = "https://objects.dc-sto1.glesys.net"
bucket = "tvl-state"
key = "terraform/tvl-glesys"
region = "glesys"
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
}
}
provider "glesys" {
userid = "cl26117" # generated by GleSYS
}
resource "glesys_objectstorage_instance" "tvl-backups" {
description = "tvl-backups"
datacenter = "dc-sto1"
}
resource "glesys_objectstorage_instance" "tvl-state" {
description = "tvl-state"
datacenter = "dc-sto1"
lifecycle {
ignore_changes = [accesskey]
}
}
resource "glesys_objectstorage_credential" "terraform-state" {
instanceid = glesys_objectstorage_instance.tvl-state.id
description = "key for terraform state"
}
resource "glesys_objectstorage_credential" "litestream" {
instanceid = glesys_objectstorage_instance.tvl-state.id
description = "key for litestream"
}
variable "whitby_ipv4" {
type = string
default = "49.12.129.211"
}
variable "whitby_ipv6" {
type = string
default = "2a01:4f8:242:5b21:0:feed:edef:beef"
}