Skip to content

Commit

Permalink
fix: Create random_password only when necessary (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored Jan 15, 2021
1 parent 850d404 commit ca48605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ locals {

# Random string to use as master password unless one is specified
resource "random_password" "master_password" {
count = var.create_cluster ? 1 : 0
count = var.create_cluster && var.password == "" && var.is_primary_cluster ? 1 : 0

length = 10
special = false
Expand Down

0 comments on commit ca48605

Please sign in to comment.