feat: add backup bucket
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
b9f3259f6a
commit
00ae60fb07
3 changed files with 54 additions and 43 deletions
35
buckets.tf
35
buckets.tf
|
|
@ -1,3 +1,38 @@
|
|||
# Bucket for backups
|
||||
resource "b2_bucket" "backups" {
|
||||
bucket_name = "lvdb-backups"
|
||||
bucket_type = "allPrivate"
|
||||
}
|
||||
|
||||
# Application key for backups bucket
|
||||
resource "b2_application_key" "restic" {
|
||||
bucket_id = b2_bucket.backups.id
|
||||
key_name = "restic"
|
||||
capabilities = [
|
||||
"deleteFiles",
|
||||
"listAllBucketNames",
|
||||
"listBuckets",
|
||||
"listFiles",
|
||||
"readBucketEncryption",
|
||||
"readBucketReplications",
|
||||
"readBuckets",
|
||||
"readFiles",
|
||||
"shareFiles",
|
||||
"writeBucketEncryption",
|
||||
"writeBucketReplications",
|
||||
"writeFiles"
|
||||
]
|
||||
}
|
||||
|
||||
output "restic_application_key" {
|
||||
value = b2_application_key.restic.application_key
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
output "restic_application_key_id" {
|
||||
value = b2_application_key.restic.application_key_id
|
||||
}
|
||||
|
||||
# Bucket for storage of nix cache
|
||||
resource "cloudflare_r2_bucket" "attic" {
|
||||
account_id = var.account_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue