2021-12-24 18:20:22 +01:00
|
|
|
# Configure TVL resources hosted with GleSYS.
|
|
|
|
#
|
|
|
|
# Most importantly:
|
|
|
|
# - all of our DNS
|
|
|
|
# - object storage (e.g. backups)
|
|
|
|
|
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
glesys = {
|
|
|
|
source = "depot/glesys"
|
|
|
|
}
|
|
|
|
}
|
2021-12-24 18:51:25 +01:00
|
|
|
|
|
|
|
backend "s3" {
|
|
|
|
endpoint = "https://objects.dc-sto1.glesys.net"
|
2021-12-24 18:56:51 +01:00
|
|
|
bucket = "tvl-state"
|
|
|
|
key = "terraform/tvl-glesys"
|
|
|
|
region = "glesys"
|
2021-12-24 18:51:25 +01:00
|
|
|
|
|
|
|
skip_credentials_validation = true
|
2021-12-24 18:56:51 +01:00
|
|
|
skip_region_validation = true
|
|
|
|
skip_metadata_api_check = true
|
2021-12-24 18:51:25 +01:00
|
|
|
}
|
2021-12-24 18:20:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
provider "glesys" {
|
|
|
|
userid = "cl26117" # generated by GleSYS
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "glesys_objectstorage_instance" "tvl-backups" {
|
|
|
|
description = "tvl-backups"
|
2021-12-24 18:56:51 +01:00
|
|
|
datacenter = "dc-sto1"
|
2021-12-24 18:20:22 +01:00
|
|
|
}
|
2021-12-24 18:29:31 +01:00
|
|
|
|
|
|
|
resource "glesys_objectstorage_instance" "tvl-state" {
|
|
|
|
description = "tvl-state"
|
2021-12-24 18:56:51 +01:00
|
|
|
datacenter = "dc-sto1"
|
2021-12-24 18:29:31 +01:00
|
|
|
|
|
|
|
lifecycle {
|
2021-12-24 18:56:51 +01:00
|
|
|
ignore_changes = [accesskey]
|
2021-12-24 18:29:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "glesys_objectstorage_credential" "terraform-state" {
|
2021-12-24 18:56:51 +01:00
|
|
|
instanceid = glesys_objectstorage_instance.tvl-state.id
|
2021-12-24 18:29:31 +01:00
|
|
|
description = "key for terraform state"
|
|
|
|
}
|
2021-12-24 18:52:06 +01:00
|
|
|
|
|
|
|
resource "glesys_objectstorage_credential" "litestream" {
|
2021-12-24 18:56:51 +01:00
|
|
|
instanceid = glesys_objectstorage_instance.tvl-state.id
|
2021-12-24 18:52:06 +01:00
|
|
|
description = "key for litestream"
|
|
|
|
}
|