infra(storage): add GitLab registry and artifacts buckets

This commit is contained in:
jgrusewski
2026-02-24 23:21:06 +01:00
parent 019bc140d7
commit ce8eeba6fb
3 changed files with 48 additions and 0 deletions

View File

@@ -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
}
}

View File

@@ -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
}

View File

@@ -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"
}