Use separate access keys per restic repository

PVE TBC
This commit is contained in:
Jake Howard 2024-12-02 22:28:57 +00:00
parent 55df3e8fa3
commit c66e9f368f
No known key found for this signature in database
GPG key ID: 57AFB45680EDD477
10 changed files with 111 additions and 87 deletions

View file

@ -64,6 +64,25 @@ resource "b2_application_key" "restic" {
]
}
resource "b2_application_key" "restic_repos" {
for_each = toset(["walker", "tang", "casey"])
key_name = "restic-${each.key}"
bucket_id = b2_bucket.restic.id
name_prefix = "${each.key}/"
capabilities = [
"readFiles",
"deleteFiles",
"listBuckets",
"listFiles",
"readBucketEncryption",
"readBuckets",
"shareFiles",
"writeBucketEncryption",
"writeFiles",
]
}
resource "b2_application_key" "infrastructure" {
key_name = "infrastructure"
capabilities = [