Skip to content

Commit

Permalink
added storage/onpremise/rabbitmq
Browse files Browse the repository at this point in the history
terraform fmt  -recursive
  • Loading branch information
egermaneau-aneo authored and jdongo-aneo committed Feb 15, 2024
1 parent 73136de commit 9b86275
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
54 changes: 54 additions & 0 deletions storage/onpremise/rabbitmq/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

resource "kubernetes_namespace" "rabbitmq" {
metadata {
name = var.namespace
}
}

resource "helm_release" "rabbitmq" {
name = "rabbitmq"
namespace = kubernetes_namespace.rabbitmq.metadata[0].name
chart = "rabbitmq"
repository = var.helm_chart_repository
version = var.helm_chart_version

set {
name = "image.rabbitmq.repository"
value = var.docker_image.rabbitmq.image
}

set {
name = "image.rabbitmq.tag"
value = var.docker_image.rabbitmq.tag
}

set {
name = "rabbitmq.service.type"
value = var.service_type
}

set {
name = "defaultUsername"
value = "admin"
}

set {
name = "defaultPassword"
value = "admin"
}

# Parameter Description Default
# image.rabbitmq.repository The image of RabbitMQ container rabbitmq
# image.rabbitmq.tag The tag of the RabbitMQ image 3.8.1-alpine
# image.rabbitmq.pullPolicy The pull policy of the RabbitMQ image IfNotPresent
# extraPlugins Extra plugins enabled []
# extraConfigurations Extra configurations to append to rabbitmq.conf ``
# advancedConfigurations advanced.config ``
# defaultUsername The username of default user to interact with RabbitMQ admin
# defaultPassword The password of default user to interact with RabbitMQ password
# service.type The service type, can be ClusterIP, or NodePort ClusterIP

}



33 changes: 33 additions & 0 deletions storage/onpremise/rabbitmq/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Namespace
variable "namespace" {
description = "Namespace for Chaos Mesh"
type = string
}

variable "service_type" {
description = "service type : ClusterIP,LoadBalancer,NodePort"
type = string
}

# Docker image
variable "docker_image" {
description = "Docker image for RabbitMQ"
type = object({
rabbitmq = object({
image = string
tag = string
})
})
}

# Repository of Chaos Mesh helm chart
variable "helm_chart_repository" {
description = "Path to helm chart repository for Chaos Mesh"
type = string
}

# Version of helm chart
variable "helm_chart_version" {
description = "Version of chart helm for Chaos Mesh"
type = string
}
9 changes: 9 additions & 0 deletions storage/onpremise/rabbitmq/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.0"
required_providers {
helm = {
source = "hashicorp/helm"
version = ">= 2.10.1"
}
}
}

0 comments on commit 9b86275

Please sign in to comment.