Skip to content

Commit 14a05a2

Browse files
authored
fix: resolve Make generate_admin_password_or_ssh_key default to false or disable when password/key provided #152 (#166)
merge for testing
1 parent 95f74d8 commit 14a05a2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

variables.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,17 @@ GALLERY_APPLICATIONS
755755
}
756756

757757
variable "generate_admin_password_or_ssh_key" {
758-
type = bool
759-
default = true
758+
type = bool
759+
default = false
760760
description = "Set this value to true if the deployment should create a strong password for the admin user. If `os_type` is Linux, this will generate and store an SSH key as the default. However, setting `disable_password_authentication` to `false` will generate and store a password value instead of an ssh key."
761+
762+
validation {
763+
condition = !(var.generate_admin_password_or_ssh_key == true && var.admin_password != null)
764+
error_message = "If 'admin_password' is provided, 'generate_admin_password_or_ssh_key' must be set to false."
765+
}
761766
}
762767

768+
763769
variable "generated_secrets_key_vault_secret_config" {
764770
type = object({
765771
key_vault_resource_id = string

0 commit comments

Comments
 (0)