Recomment user-data from master.

new-vpc
Curtis Wilson 4 years ago
parent 7c266ec4aa
commit bb80e8f3da

@ -12,25 +12,25 @@ terraform {
# cloud-init # cloud-init
################################################################################ ################################################################################
data "template_file" "master-node-user-datas" { # data "template_file" "master-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") # template = file("${path.module}/cloud_init.cfg")
vars = { # vars = {
admin-passwd = "${var.root-admin-passwd}" # admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}" # admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.vm-name-prefix}-master-${count.index}" # hostname = "${var.vm-name-prefix}-master-${count.index}"
} # }
count = var.master-nodes # count = var.master-nodes
} # }
#
data "template_file" "worker-node-user-datas" { # data "template_file" "worker-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") # template = file("${path.module}/cloud_init.cfg")
vars = { # vars = {
admin-passwd = "${var.root-admin-passwd}" # admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}" # admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.vm-name-prefix}-worker-${count.index}" # hostname = "${var.vm-name-prefix}-worker-${count.index}"
} # }
count = var.worker-nodes # count = var.worker-nodes
} # }
data "template_file" "amzn2-node-user-datas" { data "template_file" "amzn2-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") template = file("${path.module}/cloud_init.cfg")

Loading…
Cancel
Save