sguyennet / terraform-vsphere-kubespray

Deploy a Kubernetes HA cluster on VMware vSphere
https://blog.inkubate.io/install-and-manage-automatically-a-kubernetes-cluster-on-vmware-vsphere-with-terraform-and-kubespray/
Apache License 2.0
172 stars 88 forks source link

deployment issue with 'terraform plan' stage #21

Open AkideLiu opened 5 years ago

AkideLiu commented 5 years ago

terraform plan

var.vm_privilege_password Sudo or su password for the vSphere virtual machines

Enter a value:

Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage.

data.template_file.keepalived_master: Refreshing state... data.template_file.kubespray_k8s_cluster: Refreshing state... data.template_file.haproxy_backend[0]: Refreshing state... data.template_file.haproxy_backend[2]: Refreshing state... data.template_file.haproxy_backend[1]: Refreshing state... data.template_file.haproxy_hosts[1]: Refreshing state... data.template_file.kubespray_all: Refreshing state... data.template_file.kubespray_hosts_worker_list[1]: Refreshing state... data.template_file.haproxy_hosts[0]: Refreshing state... data.template_file.kubespray_hosts_worker_list[2]: Refreshing state... data.template_file.kubespray_hosts_worker_list[0]: Refreshing state... data.template_file.kubespray_hosts_master_list[2]: Refreshing state... data.template_file.haproxy: Refreshing state... data.template_file.kubespray_hosts_master_list[0]: Refreshing state... data.template_file.kubespray_hosts_master_list[1]: Refreshing state... data.template_file.kubespray_hosts_worker[1]: Refreshing state... data.template_file.kubespray_hosts_worker[0]: Refreshing state... data.template_file.keepalived_slave: Refreshing state... data.template_file.kubespray_hosts_worker[2]: Refreshing state...data.template_file.haproxy_hosts_list[0]: Refreshing state... data.template_file.kubespray_hosts_master[0]: Refreshing state... data.template_file.kubespray_hosts_master[1]: Refreshing state... data.template_file.kubespray_hosts_master[2]: Refreshing state... data.template_file.haproxy_hosts_list[1]: Refreshing state... data.vsphere_datacenter.dc: Refreshing state... data.vsphere_compute_cluster.cluster: Refreshing state... data.vsphere_network.network: Refreshing state... data.vsphere_datastore.datastore: Refreshing state... data.vsphere_virtual_machine.template: Refreshing state...


Error: Incorrect attribute value type

on vsphere-kubespray.tf line 482, in resource "vsphere_compute_cluster_vm_anti_affinity_rule" "master_anti_affinity_rule": 482: virtual_machine_ids = ["${vsphere_virtual_machine.master.*.id}"]

Inappropriate value for attribute "virtual_machine_ids": element 0: string required.

AkideLiu commented 5 years ago

482: virtual_machine_ids = "${vsphere_virtual_machine.master.*.id}" can fix this problem

AkideLiu commented 5 years ago

Plan: 22 to add, 0 to change, 0 to destroy.


Note: You didn't specify an "-out" parameter to save this plan, so Terraform can't guarantee that exactly these actions will be performed if "terraform apply" is subsequently run.