Skip to content

Commit

Permalink
there is a potential in tf modules...
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier2p committed Sep 9, 2023
1 parent 23f171e commit b2bcfe4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ target/
*.hcl
tool
services
docker
docker
forge/
5 changes: 0 additions & 5 deletions hosts/exegol/databases/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ terraform {
}
}
}

provider "docker" {
# can be the port in remote connection
host = "unix:///var/run/docker.sock"
}
11 changes: 0 additions & 11 deletions hosts/exegol/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,3 @@ provider "docker" {
# can be the port in remote connection
host = "unix:///var/run/docker.sock"
}

module "database" {
source = "./databases"

password_mariadb = var.password_mariadb
password_surrealdb = var.password_surrealdb
storage_mariadb = var.storage_mariadb
storage_surrealdb = var.storage_surrealdb
user_surrealdb = var.user_surrealdb
network = docker_network.main.name
}
14 changes: 14 additions & 0 deletions hosts/exegol/modules.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module "database" {
source = "./databases"

providers = {
docker = docker
}

password_mariadb = var.password_mariadb
password_surrealdb = var.password_surrealdb
storage_mariadb = var.storage_mariadb
storage_surrealdb = var.storage_surrealdb
user_surrealdb = var.user_surrealdb
network = docker_network.main.name
}
8 changes: 8 additions & 0 deletions hosts/scariff/modules.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module "monitoring" {
source = "./monitoring"

providers = {
docker = docker
}

network = docker_network.main.name
hostname = var.hostname
path_config = var.path_config
Expand All @@ -15,6 +19,10 @@ module "monitoring" {
# module "media" {
# source = "./media"

# providers = {
# docker = docker
# }

# network = docker_network.main.name
# hostname = var.hostname
# path_config = var.path_config
Expand Down
10 changes: 5 additions & 5 deletions hosts/scariff/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ terraform {
}
}

provider "docker" {
# can be the port in remote connection
host = "unix:///var/run/docker.sock"
# host = "tcp://${var.host}:2375"
}
# provider "docker" {
# # can be the port in remote connection
# host = "unix:///var/run/docker.sock"
# # host = "tcp://${var.host}:2375"
# }

0 comments on commit b2bcfe4

Please sign in to comment.