Skip to content

Commit

Permalink
fix: Create random_password only when necessary (terraform-aws-module…
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored and lsc committed Apr 27, 2021
1 parent af9a38f commit 16a01a8
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 16a01a8

Please sign in to comment.