aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-nomad-vpp-device/fdio
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2024-01-25 07:37:31 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2024-01-25 07:44:34 +0000
commit6067078db338b930972ad6f183a4c75d2cf9214a (patch)
treeeb93118dc9c6a2b3ee742a5e4914e061ec581c65 /fdio.infra.terraform/terraform-nomad-vpp-device/fdio
parent7b03d44e6761ee27a0fead3401f9b2d04d95f709 (diff)
feat(terraform): Migrating old structures
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch> Change-Id: Ib953739b4d34a7f803bff54cec92a2130fcbbc66
Diffstat (limited to 'fdio.infra.terraform/terraform-nomad-vpp-device/fdio')
-rw-r--r--fdio.infra.terraform/terraform-nomad-vpp-device/fdio/main.tf15
-rw-r--r--fdio.infra.terraform/terraform-nomad-vpp-device/fdio/providers.tf13
-rw-r--r--fdio.infra.terraform/terraform-nomad-vpp-device/fdio/variables.tf47
-rw-r--r--fdio.infra.terraform/terraform-nomad-vpp-device/fdio/versions.tf9
4 files changed, 84 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/main.tf b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/main.tf
new file mode 100644
index 0000000000..96666e6e89
--- /dev/null
+++ b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/main.tf
@@ -0,0 +1,15 @@
+module "vpp-device" {
+ providers = {
+ nomad = nomad.yul1
+ }
+ source = "../"
+
+ # nomad
+ datacenters = ["yul1"]
+ job_name = "prod-device-csit-shim"
+ group_count = "1"
+ cpu = "1500"
+ memory = "4096"
+ image_aarch64 = "fdiotools/csit_shim-ubuntu2004:2021_03_02_143938_UTC-aarch64"
+ image_x86_64 = "fdiotools/csit_shim-ubuntu2004:2021_03_04_142103_UTC-x86_64"
+} \ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/providers.tf b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/providers.tf
new file mode 100644
index 0000000000..42a6a45ce0
--- /dev/null
+++ b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/providers.tf
@@ -0,0 +1,13 @@
+provider "nomad" {
+ address = var.nomad_provider_address
+ alias = "yul1"
+ # ca_file = var.nomad_provider_ca_file
+ # cert_file = var.nomad_provider_cert_file
+ # key_file = var.nomad_provider_key_file
+}
+
+provider "vault" {
+ address = var.vault_provider_address
+ skip_tls_verify = var.vault_provider_skip_tls_verify
+ token = var.vault_provider_token
+} \ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/variables.tf b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/variables.tf
new file mode 100644
index 0000000000..569ba29c87
--- /dev/null
+++ b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/variables.tf
@@ -0,0 +1,47 @@
+variable "nomad_acl" {
+ description = "Nomad ACLs enabled/disabled."
+ type = bool
+ default = false
+}
+
+variable "nomad_provider_address" {
+ description = "FD.io Nomad cluster address."
+ type = string
+ default = "http://10.30.51.23:4646"
+}
+
+variable "nomad_provider_ca_file" {
+ description = "A local file path to a PEM-encoded certificate authority."
+ type = string
+ default = "/etc/nomad.d/ssl/nomad-ca.pem"
+}
+
+variable "nomad_provider_cert_file" {
+ description = "A local file path to a PEM-encoded certificate."
+ type = string
+ default = "/etc/nomad.d/ssl/nomad-cli.pem"
+}
+
+variable "nomad_provider_key_file" {
+ description = "A local file path to a PEM-encoded private key."
+ type = string
+ default = "/etc/nomad.d/ssl/nomad-cli-key.pem"
+}
+
+variable "vault_provider_address" {
+ description = "Vault cluster address."
+ type = string
+ default = "http://10.30.51.23:8200"
+}
+
+variable "vault_provider_skip_tls_verify" {
+ description = "Verification of the Vault server's TLS certificate."
+ type = bool
+ default = false
+}
+
+variable "vault_provider_token" {
+ description = "Vault root token."
+ type = string
+ sensitive = true
+} \ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/versions.tf b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/versions.tf
new file mode 100644
index 0000000000..82b792fd72
--- /dev/null
+++ b/fdio.infra.terraform/terraform-nomad-vpp-device/fdio/versions.tf
@@ -0,0 +1,9 @@
+terraform {
+ required_providers {
+ nomad = {
+ source = "hashicorp/nomad"
+ version = ">= 1.4.19"
+ }
+ }
+ required_version = ">= 1.3.7"
+} \ No newline at end of file