Skip to content

Commit ec393fc

Browse files
authored
Merge pull request #1 from snafuz/main
Initial commit
2 parents 50ac66a + f67be9d commit ec393fc

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "vsc_instance" {
2020
instance_flex_memory_in_gbs = var.instance_flex_memory_in_gbs
2121
instance_flex_ocpus = var.instance_flex_ocpus
2222
# operating system parameters
23-
ssh_public_keys = var.ssh_public_keys != "" ? var.ssh_public_keys : file(var.ssh_public_key_path)
23+
ssh_public_keys = var.ssh_public_keys != "" ? var.ssh_public_keys : var.ssh_public_key_path != "" ? file(var.ssh_public_key_path) :""
2424
user_data = base64encode(data.template_file.cloud-config.rendered)
2525
# networking parameters
2626
public_ip = var.public_ip

release_files.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
{
2525
"src": "terraform/orm/provider_orm.tf",
26+
2627
"dst": "provider.tf"
2728
}
2829
]

variables.tf

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ variable "defined_tags" {
5858
}
5959

6060

61-
6261
# compute instance parameters
62+
6363
variable "shape" {
6464
description = "The shape of an instance."
6565
type = string
@@ -91,23 +91,20 @@ variable "instance_ad_number" {
9191
default = 1
9292
}
9393

94-
95-
9694
# operating system parameters
9795

98-
variable "ssh_public_key_path" {
99-
description = "Public SSH key file path"
100-
type = string
101-
default = ""
102-
103-
}
104-
96+
# if both ssh_public-keys and ssh_public_key_path are provided, ssh_public_keys takes priority
10597
variable "ssh_public_keys" {
10698
description = "Public SSH key(s) provided as string value"
10799
type = string
108100
default = ""
109101
}
110102

103+
variable "ssh_public_key_path" {
104+
description = "Public SSH key file path"
105+
type = string
106+
default = ""
107+
111108

112109
# networking parameters
113110

0 commit comments

Comments
 (0)