Initial terraform code

This commit is contained in:
2024-09-24 15:28:19 +02:00
parent f445996797
commit 78ce7b2485
30 changed files with 3432 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
resource "random_string" "bucket_suffix" {
length = 8
lower = true
upper = false
special = false
}
resource "scaleway_object_bucket" "backup" {
name = "a13labs-backup-${random_string.bucket_suffix.result}"
project_id = var.scaleway_project_id
region = "fr-par"
lifecycle_rule {
id = "clean"
prefix = "gitea-backup/"
enabled = true
expiration {
days = local.cloud_backup_retention_days
}
}
lifecycle_rule {
id = "clean"
prefix = "wordpress-backup/"
enabled = true
expiration {
days = local.cloud_backup_retention_days
}
}
lifecycle_rule {
id = "clean"
prefix = "nextcloud-backup/"
enabled = true
expiration {
days = local.cloud_backup_retention_days
}
}
}
resource "scaleway_object_bucket" "nextcloud" {
name = "a13labs-nextcloud-${random_string.bucket_suffix.result}"
project_id = var.scaleway_project_id
region = "fr-par"
}