Initial terraform code
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user