infra(storage): add GitLab registry and artifacts buckets
This commit is contained in:
@@ -15,3 +15,30 @@ resource "scaleway_object_bucket" "artifacts" {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
resource "scaleway_object_bucket" "gitlab_registry" {
|
||||
name = "${var.bucket_name_prefix}-gitlab-registry"
|
||||
region = var.region
|
||||
|
||||
versioning {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
resource "scaleway_object_bucket" "gitlab_artifacts" {
|
||||
name = "${var.bucket_name_prefix}-gitlab-artifacts"
|
||||
region = var.region
|
||||
|
||||
lifecycle_rule {
|
||||
enabled = true
|
||||
prefix = "tmp/"
|
||||
|
||||
expiration {
|
||||
days = 7
|
||||
}
|
||||
}
|
||||
|
||||
versioning {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,3 +7,18 @@ output "endpoint" {
|
||||
description = "S3-compatible endpoint URL for the bucket region"
|
||||
value = "https://s3.${var.region}.scw.cloud"
|
||||
}
|
||||
|
||||
output "artifacts_bucket_name" {
|
||||
description = "Name of the main artifacts bucket"
|
||||
value = scaleway_object_bucket.artifacts.name
|
||||
}
|
||||
|
||||
output "gitlab_registry_bucket_name" {
|
||||
description = "Name of the GitLab registry bucket"
|
||||
value = scaleway_object_bucket.gitlab_registry.name
|
||||
}
|
||||
|
||||
output "gitlab_artifacts_bucket_name" {
|
||||
description = "Name of the GitLab artifacts bucket"
|
||||
value = scaleway_object_bucket.gitlab_artifacts.name
|
||||
}
|
||||
|
||||
@@ -8,3 +8,9 @@ variable "bucket_name" {
|
||||
type = string
|
||||
default = "foxhunt-artifacts"
|
||||
}
|
||||
|
||||
variable "bucket_name_prefix" {
|
||||
description = "Prefix for additional buckets (e.g., foxhunt)"
|
||||
type = string
|
||||
default = "foxhunt"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user