Skip to content

Commit

Permalink
fix files
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi committed Oct 14, 2024
1 parent 4fcc9e0 commit 622b051
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
12 changes: 8 additions & 4 deletions examples/camunda-8.6-irsa/db.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
locals {
aurora_cluster_name = "cluster-name-pg-irsa" # Replace "cluster-name" with your cluster's name

aurora_master_username = "secret_user" # Replace with your Aurora username
aurora_master_password = "secretvalue%23" # Replace with your Aurora password

camunda_database = "camunda" # Name of your camunda database

# IRSA configuration
aurora_irsa_username = "secret_user_irsa" # This is the username that will be used for IRSA connection to the DB
camunda_webmodeler_service_account = "webmodeler-sa" # Replace with your Kubernetes ServiceAcccount that will be created for WebModeler
Expand All @@ -13,13 +18,12 @@ module "postgresql" {
engine_version = "15.8"
auto_minor_version_upgrade = false
cluster_name = local.aurora_cluster_name
default_database_name = "camunda"
default_database_name = local.camunda_database

availability_zones = ["${local.eks_cluster_region}a", "${local.eks_cluster_region}b", "${local.eks_cluster_region}c"]

# Supply your own secret values for username and password
username = "secret_user"
password = "secretvalue%23"
username = local.aurora_master_username
password = local.aurora_master_password

vpc_id = module.eks_cluster.vpc_id
subnet_ids = module.eks_cluster.private_subnet_ids
Expand Down
8 changes: 4 additions & 4 deletions examples/camunda-8.6-irsa/irsa-postgres-create-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
apiVersion: batch/v1
kind: Job
metadata:
name: postgres-client
name: create-irsa-user-db
labels:
app: postgres-client
app: create-irsa-user-db
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: postgres-client
- name: create-irsa-user-db
image: amazonlinux:latest
command:
- sh
Expand All @@ -22,7 +22,7 @@ spec:
set -o pipefail
echo "Installing dependencies..."
yum install -y curl postgresql15 unzip awscli-2
yum install -y postgresql15 unzip awscli-2
echo "Creating IRSA db user using admin user"
psql -h $AURORA_ENDPOINT -p $AURORA_PORT "sslmode=require dbname=$AURORA_DB_NAME user=$AURORA_USERNAME password=$AURORA_PASSWORD" \
Expand Down
5 changes: 3 additions & 2 deletions examples/camunda-8.6/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ locals {

aurora_master_username = "secret_user" # Replace with your Aurora username
aurora_master_password = "secretvalue%23" # Replace with your Aurora password

camunda_database = "camunda" # Name of your camunda database
}

module "postgresql" {
source = "git::https://github.com/camunda/camunda-tf-eks-module//modules/aurora?ref=2.6.0"
engine_version = "15.8"
auto_minor_version_upgrade = false
cluster_name = local.aurora_cluster_name
default_database_name = "camunda"
default_database_name = local.camunda_database

availability_zones = ["${local.eks_cluster_region}a", "${local.eks_cluster_region}b", "${local.eks_cluster_region}c"]

# Supply your own secret values for username and password
username = local.aurora_master_username
password = local.aurora_master_password

Expand Down

0 comments on commit 622b051

Please sign in to comment.