Skip to content

Commit a075df3

Browse files
committed
chore: Improve SSH key message
1 parent 08483d8 commit a075df3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/do-linux/main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,18 @@ variable "step3_do_admin_ssh_key" {
4242
description = <<-EOF
4343
Enter admin SSH key ID (some Droplet images require an SSH key to be set):
4444
45-
Note: Leaving this as zero will break Fedora images and notify root passwords via email.
45+
Can be set to zero.
46+
47+
Note: Setting this to zero will break Fedora images and notify root passwords via email.
4648
4749
$ doctl compute ssh-key list
4850
EOF
4951
sensitive = true
52+
53+
validation {
54+
condition = var.step3_do_admin_ssh_key >= 0
55+
error_message = "Invalid Digital Ocean SSH key ID, a number is required."
56+
}
5057
}
5158

5259
variable "droplet_image" {

0 commit comments

Comments
 (0)