This commit is contained in:
parent
c2d661576b
commit
4c8129829f
1 changed files with 65 additions and 0 deletions
65
main.tf
65
main.tf
|
|
@ -1,3 +1,68 @@
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
kubernetes = {
|
||||||
|
source = "hashicorp/kubernetes"
|
||||||
|
version = "~> 2.26"
|
||||||
|
}
|
||||||
|
helm = {
|
||||||
|
source = "hashicorp/helm"
|
||||||
|
version = "~> 2.12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Eigener State-Pfad, damit sich MT5 und die Webseite nicht in die Quere kommen
|
||||||
|
backend "consul" {
|
||||||
|
address = "consul:8500"
|
||||||
|
path = "terraform/states/mt5_tf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Variablen ---------------------------------------------------------------
|
||||||
|
|
||||||
|
variable "app_version" {
|
||||||
|
type = string
|
||||||
|
default = "latest"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "image_repository" {
|
||||||
|
type = string
|
||||||
|
default = "gmag11/metatrader5_vnc"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vnc_user" {
|
||||||
|
type = string
|
||||||
|
default = "trader"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kommt aus TF_VAR_vnc_password (Secret MT5_VNC_PASSWORD)
|
||||||
|
variable "vnc_password" {
|
||||||
|
type = string
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "ingress_host" {
|
||||||
|
type = string
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Provider ----------------------------------------------------------------
|
||||||
|
|
||||||
|
provider "kubernetes" {
|
||||||
|
config_path = "./kind_kubeconfig"
|
||||||
|
host = "https://local-k3s-platform:6443"
|
||||||
|
insecure = true
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "helm" {
|
||||||
|
kubernetes {
|
||||||
|
config_path = "./kind_kubeconfig"
|
||||||
|
host = "https://local-k3s-platform:6443"
|
||||||
|
insecure = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- MetaTrader 5 Deployment -------------------------------------------------
|
||||||
|
|
||||||
resource "helm_release" "mt5" {
|
resource "helm_release" "mt5" {
|
||||||
name = "mt5"
|
name = "mt5"
|
||||||
chart = "./charts/mt5"
|
chart = "./charts/mt5"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue