diff --git a/terraform/modules/cluster/key.tf b/terraform/modules/cluster/key.tf index e62e7189059e8b2574ec5c59eb4f8942da330252..c9967011af1ea7737834a75c8704ecf9e3559c9c 100644 --- a/terraform/modules/cluster/key.tf +++ b/terraform/modules/cluster/key.tf @@ -1,8 +1,8 @@ # Each cluster will either have a shared key, or their own # unique key. resource "openstack_compute_keypair_v2" "key" { - count = var.openstack_ssh_key == "" ? 1 : 0 - name = var.cluster_name + count = var.openstack_ssh_key == "" ? 1 : 0 + name = var.cluster_name } data "openstack_compute_keypair_v2" "key" { @@ -13,6 +13,6 @@ data "openstack_compute_keypair_v2" "key" { # set local variable to hold final key, either created or # loaded. locals { - key_name = var.openstack_ssh_key == "" ? openstack_compute_keypair_v2.key[0].name : data.openstack_compute_keypair_v2.key[0].name + key_name = var.openstack_ssh_key == "" ? openstack_compute_keypair_v2.key[0].name : data.openstack_compute_keypair_v2.key[0].name private_key = var.openstack_ssh_key == "" ? openstack_compute_keypair_v2.key[0].private_key : "" } diff --git a/terraform/modules/cluster/rancher.tf b/terraform/modules/cluster/rancher.tf index 7d4a6bfe60cfb785c07d5f07c95f57352c560055..3d325aaaf2ecce944003aac2cff5662b65ab6fad 100644 --- a/terraform/modules/cluster/rancher.tf +++ b/terraform/modules/cluster/rancher.tf @@ -97,7 +97,7 @@ resource "rancher2_cluster_role_template_binding" "admin_users" { cluster_id = local.kube_id role_template_id = "cluster-owner" user_principal_id = "openldap_user://uid=${each.value},ou=People,dc=ncsa,dc=illinois,dc=edu" - depends_on = [ openstack_compute_instance_v2.machine ] + depends_on = [openstack_compute_instance_v2.machine] lifecycle { ignore_changes = [ annotations, @@ -113,7 +113,7 @@ resource "rancher2_cluster_role_template_binding" "admin_groups" { cluster_id = local.kube_id role_template_id = "cluster-owner" user_principal_id = "openldap_group://cn=${each.value},ou=Groups,dc=ncsa,dc=illinois,dc=edu" - depends_on = [ openstack_compute_instance_v2.machine ] + depends_on = [openstack_compute_instance_v2.machine] lifecycle { ignore_changes = [ annotations, @@ -129,7 +129,7 @@ resource "rancher2_cluster_role_template_binding" "member_users" { cluster_id = local.kube_id role_template_id = "cluster-member" user_principal_id = "openldap_user://uid=${each.value},ou=People,dc=ncsa,dc=illinois,dc=edu" - depends_on = [ openstack_compute_instance_v2.machine ] + depends_on = [openstack_compute_instance_v2.machine] lifecycle { ignore_changes = [ annotations, @@ -145,7 +145,7 @@ resource "rancher2_cluster_role_template_binding" "member_groups" { cluster_id = local.kube_id role_template_id = "cluster-member" user_principal_id = "openldap_group://cn=${each.value},ou=Groups,dc=ncsa,dc=illinois,dc=edu" - depends_on = [ openstack_compute_instance_v2.machine ] + depends_on = [openstack_compute_instance_v2.machine] lifecycle { ignore_changes = [ annotations,