revert to old structure
This commit is contained in:
parent
a495f53751
commit
bb841ad2a3
15 changed files with 321 additions and 243 deletions
|
|
@ -1,37 +1,46 @@
|
|||
module "project" {
|
||||
source = "../project"
|
||||
|
||||
name = "project-1"
|
||||
organization_id = var.organization_id
|
||||
owner_email = "maximilian.schlenz@stackit.cloud"
|
||||
}
|
||||
|
||||
module "security_groups" {
|
||||
source = "../security-group"
|
||||
|
||||
for_each = var.security_groups
|
||||
|
||||
project_id = var.project_id
|
||||
project_id = module.project.project_id
|
||||
name = each.value.name
|
||||
description = each.value.description
|
||||
rules = each.value.rules
|
||||
}
|
||||
|
||||
module "postgres" {
|
||||
source = "../postgres"
|
||||
# module "postgres" {
|
||||
# source = "../postgres"
|
||||
|
||||
for_each = var.postgres_instances
|
||||
# for_each = var.postgres_instances
|
||||
|
||||
project_id = var.project_id
|
||||
name = each.value.name
|
||||
ver = each.value.version
|
||||
flavor = each.value.flavor
|
||||
storage = each.value.storage
|
||||
replicas = each.value.replicas
|
||||
acl = each.value.acl
|
||||
backup_schedule = each.value.backup_schedule
|
||||
users = each.value.users
|
||||
databases = each.value.databases
|
||||
}
|
||||
# project_id = module.project.project_id
|
||||
# name = each.value.name
|
||||
# ver = each.value.version
|
||||
# flavor = each.value.flavor
|
||||
# storage = each.value.storage
|
||||
# replicas = each.value.replicas
|
||||
# acl = each.value.acl
|
||||
# backup_schedule = each.value.backup_schedule
|
||||
# users = each.value.users
|
||||
# databases = each.value.databases
|
||||
# }
|
||||
|
||||
module "net" {
|
||||
depends_on = [module.security_groups]
|
||||
source = "../network"
|
||||
|
||||
for_each = var.networks
|
||||
|
||||
project_id = var.project_id
|
||||
project_id = module.project.project_id
|
||||
name = each.value.name
|
||||
|
||||
ipv4_nameservers = each.value.ipv4_nameservers
|
||||
|
|
@ -42,25 +51,28 @@ module "net" {
|
|||
nic_allowed_addresses = each.value.nic_allowed_addresses
|
||||
nic_labels = each.value.nic_labels
|
||||
nic_security = each.value.nic_security
|
||||
nic_security_group_ids = each.value.nic_security_group_ids
|
||||
|
||||
nic_security_group_ids = [
|
||||
module.security_groups["ssh_ingress_group"].security_group_id,
|
||||
]
|
||||
}
|
||||
|
||||
module "ske" {
|
||||
source = "../ske"
|
||||
# module "ske" {
|
||||
# source = "../ske"
|
||||
|
||||
for_each = var.ske_clusters
|
||||
# for_each = var.ske_clusters
|
||||
|
||||
project_id = var.project_id
|
||||
name = each.value.name
|
||||
kubernetes_version_min = each.value.kubernetes_version_min
|
||||
node_pools = each.value.node_pools
|
||||
}
|
||||
# project_id = module.project.project_id
|
||||
# name = each.value.name
|
||||
# kubernetes_version_min = each.value.kubernetes_version_min
|
||||
# node_pools = each.value.node_pools
|
||||
# }
|
||||
|
||||
module "observability" {
|
||||
source = "../observability"
|
||||
# module "observability" {
|
||||
# source = "../observability"
|
||||
|
||||
for_each = var.observability_instances
|
||||
project_id = var.project_id
|
||||
name = each.value.name
|
||||
plan_name = each.value.plan_name
|
||||
}
|
||||
# for_each = var.observability_instances
|
||||
# project_id = module.project.project_id
|
||||
# name = each.value.name
|
||||
# plan_name = each.value.plan_name
|
||||
# }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
region = "eu01"
|
||||
service_account_token = ""
|
||||
# project_id = "b25685da-5954-4382-b654-62abd9f0ef77"
|
||||
project_id = ""
|
||||
organization_id = "03a34540-3c1a-4794-b2c6-7111ecf824ef"
|
||||
service_account_key_path = "/Users/schlenz/sa-key-dd5fa2c9-1651-4da7-8404-9ac4fe9bc3d5.json"
|
||||
|
||||
security_groups = {
|
||||
|
|
@ -23,126 +24,129 @@ security_groups = {
|
|||
]
|
||||
},
|
||||
|
||||
web_traffic_group = {
|
||||
name = "web-traffic-group"
|
||||
description = "ALLOW WEB TRAFFIC ingress"
|
||||
rules = [
|
||||
{ description = "ALLOW ALL 80"
|
||||
direction = "ingress"
|
||||
ether_type = "IPv4"
|
||||
ip_range = "0.0.0.0/0"
|
||||
protocol = {
|
||||
name = "tcp"
|
||||
}
|
||||
port_range = {
|
||||
min = 80
|
||||
max = 80
|
||||
}
|
||||
},
|
||||
{ description = "ALLOW ALL 443"
|
||||