Skip to content

Commit

Permalink
add password
Browse files Browse the repository at this point in the history
  • Loading branch information
outductor committed Oct 2, 2023
1 parent a8860b0 commit 97a15f9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions terraform/onp_cluster_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,34 @@ resource "helm_release" "onp_minecraft_mariadb_monitoring_password" {
]
}
}

resource "random_password" "minecraft__pr_review_mariadb_password" {
length = 16
special = false // MariaDBのパスワードがぶっ壊れて困るので記号を含めない
}

resource "helm_release" "onp_minecraft__pr_review_mariadb_password" {
depends_on = [helm_release.onp_cluster_clustersecret]

repository = "https://giganticminecraft.github.io/seichi_infra/"
chart = "raw-resources"
name = "mariadb-pr-review-password-raw-resource"
namespace = "kube-system"
version = "0.3.0"

set_list {
name = "manifests"
value = [<<-EOS
kind: ClusterSecret
apiVersion: clustersecret.io/v1
metadata:
namespace: clustersecret
name: mariadb-pr-review-password
matchNamespace:
- seichi-debug-minecraft-on-seichiassist-pr-*
data:
mcserver-password: ${base64encode(random_password.minecraft__pr_review_mariadb_password.result)}
EOS
]
}
}

0 comments on commit 97a15f9

Please sign in to comment.