added creation of bucket using variables
This commit is contained in:
parent
85cf6eeb1a
commit
35c44845d2
|
@ -257,13 +257,9 @@ tenant:
|
||||||
# - name: my-minio-bucket
|
# - name: my-minio-bucket
|
||||||
# objectLock: false # optional
|
# objectLock: false # optional
|
||||||
# region: us-east-1 # optional
|
# region: us-east-1 # optional
|
||||||
buckets:
|
buckets: [ ]
|
||||||
- name: workflow-logs
|
|
||||||
- name: binaries
|
|
||||||
- name: graph
|
|
||||||
|
|
||||||
|
|
||||||
# [ "workflow-logs", "binaries", "graph"]
|
|
||||||
###
|
###
|
||||||
# Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.
|
# Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.
|
||||||
#
|
#
|
||||||
|
|
27
main.tf
27
main.tf
|
@ -2,20 +2,21 @@ module "minio" {
|
||||||
source = "./modules/minio"
|
source = "./modules/minio"
|
||||||
kube_context = var.kube_context
|
kube_context = var.kube_context
|
||||||
namespace_prefix=var.namespace_prefix
|
namespace_prefix=var.namespace_prefix
|
||||||
|
buckets = var.minio_buckets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module "airflow" {
|
# module "airflow" {
|
||||||
source = "./modules/airflow"
|
# source = "./modules/airflow"
|
||||||
kube_context = var.kube_context
|
# kube_context = var.kube_context
|
||||||
admin_user = var.admin_user
|
# admin_user = var.admin_user
|
||||||
admin_password = var.admin_password
|
# admin_password = var.admin_password
|
||||||
namespace_prefix= var.namespace_prefix
|
# namespace_prefix= var.namespace_prefix
|
||||||
admin_hash = var.admin_hash
|
# admin_hash = var.admin_hash
|
||||||
env = var.env
|
# env = var.env
|
||||||
domain = var.domain
|
# domain = var.domain
|
||||||
s3_endpoint = var.s3_endpoint
|
# s3_endpoint = var.s3_endpoint
|
||||||
s3_key = var.s3_key
|
# s3_key = var.s3_key
|
||||||
s3_secret = var.s3_secret
|
# s3_secret = var.s3_secret
|
||||||
|
|
||||||
}
|
# }
|
||||||
|
|
|
@ -21,4 +21,26 @@ resource "helm_release" "minio_tenant" {
|
||||||
name = "ingress.console.host"
|
name = "ingress.console.host"
|
||||||
value = "console-minio.${var.domain}"
|
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"]
|
||||||
}
|
}
|
|
@ -22,3 +22,9 @@ variable "domain" {
|
||||||
type = string
|
type = string
|
||||||
default = "local-dataplatform"
|
default = "local-dataplatform"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "buckets" {
|
||||||
|
type = list(map(string))
|
||||||
|
default = [ ]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
10
variables.tf
10
variables.tf
|
@ -44,3 +44,13 @@ variable "s3_key" {
|
||||||
variable "s3_secret" {
|
variable "s3_secret" {
|
||||||
default = "minio123"
|
default = "minio123"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "minio_buckets" {
|
||||||
|
type = list(map(string))
|
||||||
|
default = [
|
||||||
|
{ name = "workflow-logs" },
|
||||||
|
{ name = "binaries" },
|
||||||
|
{ name = "graph" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue