Skip to content

Commit

Permalink
Merge pull request #11 from avinava-mycelium/MEXNODE-512-cl-static-ex…
Browse files Browse the repository at this point in the history
…ternal-i-ps

Adding optional config to choose startup script
  • Loading branch information
avinava-mycelium authored Nov 28, 2022
2 parents d4c33f0 + 4d71532 commit 1b4453a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "google_compute_instance" "this" {
node = var.node_name
type = var.node_type
source = var.node_source
startup-script-url = "${var.startup_script_prefix}${var.node_name}-${var.node_type}-${var.startup_script_suffix}" // deployment script for application stored in a private bucket
startup-script-url = var.is_gen_startup_script ? var.vm_startup_script : "${var.startup_script_prefix}${var.node_name}-${var.node_type}-${var.startup_script_suffix}" // deployment script for application stored in a private bucket
}

service_account {
Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,13 @@ variable "startup_script_suffix" {
description = "script name suffix"
default = "startup.sh"
}

variable "is_gen_startup_script" {
description = "boolean to check if we want to go with particular script or generic one"
default = false
}

variable "vm_startup_script" {
description = "Generic startup script for VM"
default = "gs://myc-infra-scripts/startup-scripts/vm-startup-1.sh"
}

0 comments on commit 1b4453a

Please sign in to comment.