Skip to content

Commit

Permalink
Merge pull request #20 from utilitywarehouse/parameterise-coreos-image
Browse files Browse the repository at this point in the history
Add variable for coreos image
  • Loading branch information
ffilippopoulos authored Aug 29, 2019
2 parents 89011c7 + 56ea863 commit a22b6b0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cfssl.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ resource "google_compute_instance" "cfssl" {

boot_disk {
initialize_params {
image = "projects/coreos-cloud/global/images/family/coreos-stable"
image = var.coreos_image
}

auto_delete = true
Expand Down
2 changes: 1 addition & 1 deletion etcd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ resource "google_compute_instance" "etcd" {

boot_disk {
initialize_params {
image = "projects/coreos-cloud/global/images/family/coreos-stable"
image = var.coreos_image
}

auto_delete = true
Expand Down
2 changes: 1 addition & 1 deletion masters.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ resource "google_compute_instance_template" "master" {
can_ip_forward = true

disk {
source_image = "projects/coreos-cloud/global/images/family/coreos-stable"
source_image = var.coreos_image
auto_delete = true
boot = true
disk_size_gb = "50"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Common
variable "coreos_image" {
description = "The coreos image to use. Default to the latest from the stable channel"
default = "projects/coreos-cloud/global/images/family/coreos-stable"
}

variable "cluster_name" {
description = "An identifier for the cluster"
}
Expand Down
2 changes: 1 addition & 1 deletion workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "google_compute_instance_template" "worker" {
can_ip_forward = true

disk {
source_image = "projects/coreos-cloud/global/images/family/coreos-stable"
source_image = var.coreos_image
auto_delete = true
boot = true
disk_size_gb = "50"
Expand Down

0 comments on commit a22b6b0

Please sign in to comment.