Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Dormitzer
e4da973d13 Add new spaces bucket for backups 2022-05-12 15:17:07 -04:00
Jeremy Dormitzer
ee4b876302 Update do-spaces DO plugin version 2022-05-12 15:16:55 -04:00
7 changed files with 90 additions and 17 deletions

34
mgmt/do-spaces/terraform/.terraform.lock.hcl Executable file → Normal file
View File

@ -2,22 +2,24 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/digitalocean/digitalocean" {
version = "2.3.0"
constraints = "~> 2.3.0"
version = "2.19.0"
constraints = "~> 2.19.0"
hashes = [
"h1:Kmcj3ajzt/lSQkbQwcjzUNK2RXXcHNDCs44LfDhZnaM=",
"zh:1c0f68715cf0b84ab40ab08aa59232037325cffc2896ba109cae73c81ab021e9",
"zh:306599aec6637c92349abb069d8fea3ebac58f52f61707956320a405f57e4a84",
"zh:31db532f05e55cb52d61c12c10197dca48dc8809a4f9cc4a935d3161546968ca",
"zh:3dba438c0167e5dcf09115f8d2c33c0a821e6b27e83ec6ccaac5fcb557a50bbb",
"zh:770c906ab3eeb5c24c5b8bbcca3b18f137d5ac817bd73fa5c9146eb4a9d891d6",
"zh:9221f2d275c776382234882d534a1147db04a8be490c023eb08c9a1e579db021",
"zh:a4e25e5dd2ad06de6c7148a270b1178b6298846405ce66b9b4ca51ea35b66907",
"zh:b3c5555e0c55efaa91de245e6d69e7140665554d2365db2f664802a36b59e0a8",
"zh:c510655b6c5de0227babba5a8bb66a8c3d92af94e080ec1c39bde9509a2aa1a6",
"zh:d04a135d9bf32c1a55abaaeb719903f4f67797434dd6d9f3219245f62a9a66be",
"zh:dd5b99bec9425eb670be5d19b17336d0fa9b894649dac77eac532e4c626616f5",
"zh:e57614fb9f3fbf774a9258a197840f40d0f343e8183eef7a842286a87cfc48d7",
"zh:fee52e736edc5ef4088cedae6507790f35e4ee8a078bff1ef894a51dd65d058d",
"h1:z3FmDpOuKq+bOYgFE5MtFpXjOL2gAbtutL4jeAd9rJE=",
"zh:01cee85343dee2dfc01499e19ef4e56b0c9260eee0a47329231cf500c07b4386",
"zh:099eeddf9baf9c282430231da501a8b96b3fb28507ce3b78e3a185cc9d4b3860",
"zh:191e090e8553355d91842163737d71051aeb499c8ddb23d2e8aae9dab2f8a1a5",
"zh:25356abb47769270730b0ddb0a3eb89aec637395cdcb77c309d23e55839e4461",
"zh:28876afb75ba5367d20e508e05c7657f90922142ff80d8a81a4d68b3381adb86",
"zh:404a304e37c3dec8017318b16ab701553e5242dc2460211346a9dd39242709a6",
"zh:40f53111b01fc78fdc7a6ba47a80d51c9a45e77e5b7d7d5bcae3a0c6f58ffbdf",
"zh:48f212068234df3dcfe5544c96b10403b15a190203742756d7d0573ee0857c17",
"zh:5189fe4fffdbff5c280f6741f55b2de9cb2b8c653cda0b2339c28cd1e3bc7884",
"zh:a7d5840ca789a03a285c67d2838af4d8687c99f3e8fac4ce56fcd23802a66156",
"zh:c0bd3c4555e5d7e6c96d3add3ddd8e41aa0df9e4a4518ad3b7f1d726a4e0a9f4",
"zh:d70a903a6d75533aa4713e255c9c967ec453195f2209439981f015f203805a6e",
"zh:db8110736bd47f99213d72309ebb720718a80b15ddd46e34a8ee9b2125903079",
"zh:e2180f334506601e0a6af8863159cc719ce584fdb23bd45ddc120f33d22cec19",
"zh:eb515a24d231e7f1ef344b9b88fa2071f760ec34fbb47d80bbacdf7e35f3daca",
]
}

View File

@ -2,7 +2,7 @@ terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.3.0"
version = "~> 2.19.0"
}
}

View File

@ -0,0 +1,25 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/digitalocean/digitalocean" {
version = "2.19.0"
constraints = "~> 2.19.0"
hashes = [
"h1:z3FmDpOuKq+bOYgFE5MtFpXjOL2gAbtutL4jeAd9rJE=",
"zh:01cee85343dee2dfc01499e19ef4e56b0c9260eee0a47329231cf500c07b4386",
"zh:099eeddf9baf9c282430231da501a8b96b3fb28507ce3b78e3a185cc9d4b3860",
"zh:191e090e8553355d91842163737d71051aeb499c8ddb23d2e8aae9dab2f8a1a5",
"zh:25356abb47769270730b0ddb0a3eb89aec637395cdcb77c309d23e55839e4461",
"zh:28876afb75ba5367d20e508e05c7657f90922142ff80d8a81a4d68b3381adb86",
"zh:404a304e37c3dec8017318b16ab701553e5242dc2460211346a9dd39242709a6",
"zh:40f53111b01fc78fdc7a6ba47a80d51c9a45e77e5b7d7d5bcae3a0c6f58ffbdf",
"zh:48f212068234df3dcfe5544c96b10403b15a190203742756d7d0573ee0857c17",
"zh:5189fe4fffdbff5c280f6741f55b2de9cb2b8c653cda0b2339c28cd1e3bc7884",
"zh:a7d5840ca789a03a285c67d2838af4d8687c99f3e8fac4ce56fcd23802a66156",
"zh:c0bd3c4555e5d7e6c96d3add3ddd8e41aa0df9e4a4518ad3b7f1d726a4e0a9f4",
"zh:d70a903a6d75533aa4713e255c9c967ec453195f2209439981f015f203805a6e",
"zh:db8110736bd47f99213d72309ebb720718a80b15ddd46e34a8ee9b2125903079",
"zh:e2180f334506601e0a6af8863159cc719ce584fdb23bd45ddc120f33d22cec19",
"zh:eb515a24d231e7f1ef344b9b88fa2071f760ec34fbb47d80bbacdf7e35f3daca",
]
}

View File

@ -0,0 +1,14 @@
provider "digitalocean" {
token = var.do_token
spaces_access_id = var.spaces_access_id
spaces_secret_key = var.spaces_secret_key
}
resource "digitalocean_spaces_bucket" "jdormit_backup" {
name = "jdormit-backup"
region = "nyc3"
lifecycle {
prevent_destroy = true
}
}

View File

@ -0,0 +1,3 @@
output "jdormit_backup_bucket_urn" {
value = digitalocean_spaces_bucket.jdormit_backup.urn
}

View File

@ -0,0 +1,18 @@
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.19.0"
}
}
backend "s3" {
skip_credentials_validation = true
skip_metadata_api_check = true
# Need to specify an AWS region to stop Terraform complaining
region = "us-east-1"
endpoint = "nyc3.digitaloceanspaces.com"
bucket = "jdormit-tf-state"
key = "prod/backup.tfstate"
}
}

View File

@ -0,0 +1,11 @@
variable "do_token" {
type = string
}
variable "spaces_access_id" {
type = string
}
variable "spaces_secret_key" {
type = string
}