Skip to content

Commit

Permalink
Add allow_root_ssh_pwauth
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-39 committed Jul 25, 2023
1 parent 7592b22 commit ee593cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ chpasswd:
expire: False
%{endif~}
%{if var.allow_root_ssh_pwauth != null && var.allow_root_ssh_pwauth == true}
bootcmd:
- 'echo "PermitRootLogin yes" >> /etc/ssh/sshd_config.d/99-allow-root-ssh-pwauth.conf'
%{endif}
EOT
}

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ variable "disable_root" {
default = true
}

variable "allow_root_ssh_pwauth" {
type = bool
default = false
}

variable "root_password" {
type = string
default = ""
Expand Down

0 comments on commit ee593cf

Please sign in to comment.