Skip to content

Commit

Permalink
refactor: remove user creation in examples
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Boros <[email protected]>
  • Loading branch information
gabor-boros committed Dec 20, 2024
1 parent f54a7a7 commit 8aac50c
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions infra-examples/digitalocean/main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
locals {
instances = [
"my-instance-1",
"my-instance-2",
"my-instance-3",
]
}

data "digitalocean_kubernetes_versions" "available_versions" {}

module "main_vpc" {
Expand Down Expand Up @@ -77,14 +69,6 @@ module "mongodb_database" {
database_maintenance_window_day = "sunday"
database_maintenance_window_time = "1:00"

database_users = {
for instance in toset(local.instances) :
instance => {
username = instance,
database = "${instance}-db"
}
}

# Database cluster firewalls cannot use VPC CIDR, therefore the access is
# limited to the k8s cluster
firewall_rules = [
Expand All @@ -95,13 +79,6 @@ module "mongodb_database" {
]
}

resource "digitalocean_database_db" "forum_database" {
for_each = toset(local.instances)

cluster_id = module.mongodb_database.cluster_id
name = "${each.key}-cs_comments_service"
}

resource "digitalocean_project" "project" {
name = var.kubernetes_cluster_name
description = "Open edX deployment using Harmony"
Expand Down

0 comments on commit 8aac50c

Please sign in to comment.