Skip to content

Commit 2a1cbe8

Browse files
authored
made ssh key optional (#39)
Signed-off-by: Ali Mukadam <[email protected]>
1 parent 8de8934 commit 2a1cbe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compute.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "oci_core_instance" "bastion" {
3838
}
3939

4040
metadata = {
41-
ssh_authorized_keys = var.ssh_public_key != "" ? var.ssh_public_key : file(var.ssh_public_key_path)
41+
ssh_authorized_keys = (var.ssh_public_key != "") ? var.ssh_public_key : (var.ssh_public_key_path != "none") ? file(var.ssh_public_key_path) : ""
4242
user_data = data.cloudinit_config.bastion.rendered
4343
}
4444

0 commit comments

Comments
 (0)