diff --git a/envs/local/minio-tenant.yaml b/envs/local/minio-tenant.yaml index ed643b5..fd64ea7 100644 --- a/envs/local/minio-tenant.yaml +++ b/envs/local/minio-tenant.yaml @@ -257,13 +257,9 @@ tenant: # - name: my-minio-bucket # objectLock: false # optional # region: us-east-1 # optional - buckets: - - name: workflow-logs - - name: binaries - - name: graph + buckets: [ ] + - - # [ "workflow-logs", "binaries", "graph"] ### # Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning. # diff --git a/main.tf b/main.tf index 6842df4..4c63dac 100644 --- a/main.tf +++ b/main.tf @@ -2,20 +2,21 @@ module "minio" { source = "./modules/minio" kube_context = var.kube_context namespace_prefix=var.namespace_prefix + buckets = var.minio_buckets } -module "airflow" { - source = "./modules/airflow" - kube_context = var.kube_context - admin_user = var.admin_user - admin_password = var.admin_password - namespace_prefix= var.namespace_prefix - admin_hash = var.admin_hash - env = var.env - domain = var.domain - s3_endpoint = var.s3_endpoint - s3_key = var.s3_key - s3_secret = var.s3_secret +# module "airflow" { +# source = "./modules/airflow" +# kube_context = var.kube_context +# admin_user = var.admin_user +# admin_password = var.admin_password +# namespace_prefix= var.namespace_prefix +# admin_hash = var.admin_hash +# env = var.env +# domain = var.domain +# s3_endpoint = var.s3_endpoint +# s3_key = var.s3_key +# s3_secret = var.s3_secret -} +# } diff --git a/modules/minio/minio-tenant.tf b/modules/minio/minio-tenant.tf index 9625d2e..e1b2211 100644 --- a/modules/minio/minio-tenant.tf +++ b/modules/minio/minio-tenant.tf @@ -21,4 +21,26 @@ resource "helm_release" "minio_tenant" { name = "ingress.console.host" value = "console-minio.${var.domain}" } + + dynamic "set" { + for_each = var.buckets + content { + name = "tenant.buckets[${set.key}].name" + value = set.value.name + } + } + + + # set { + # name = "tenant.buckets[0].name" + # value = "workflow-logs" + # } + + # set { + # name = "tenant.buckets[1].name" + # value = "binaries" + # } + + + # ,"binaries","graph","pippo"] } \ No newline at end of file diff --git a/modules/minio/variables.tf b/modules/minio/variables.tf index 100ac16..947eba5 100644 --- a/modules/minio/variables.tf +++ b/modules/minio/variables.tf @@ -22,3 +22,9 @@ variable "domain" { type = string default = "local-dataplatform" } + +variable "buckets" { + type = list(map(string)) + default = [ ] +} + diff --git a/variables.tf b/variables.tf index 2d8e276..207e4df 100644 --- a/variables.tf +++ b/variables.tf @@ -44,3 +44,13 @@ variable "s3_key" { variable "s3_secret" { default = "minio123" } + +variable "minio_buckets" { + type = list(map(string)) + default = [ + { name = "workflow-logs" }, + { name = "binaries" }, + { name = "graph" }, + ] +} +