From d8c8e0a3f2ae77ca92aec8055f2fe6829adcb7dd Mon Sep 17 00:00:00 2001 From: Jim Ehrismann Date: Wed, 8 Jul 2020 14:56:16 -0400 Subject: [PATCH] Signed-off-by: Jim Ehrismann add tf files from mcc that were not included in WinRM update Signed-off-by: Jim Ehrismann --- examples/terraform/aws/main.tf | 14 +++++++------- .../terraform/aws/modules/windows_worker/main.tf | 2 +- .../aws/modules/windows_worker/variables.tf | 4 ---- examples/terraform/aws/variables.tf | 3 +++ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/terraform/aws/main.tf b/examples/terraform/aws/main.tf index aad42d0..f6617c4 100644 --- a/examples/terraform/aws/main.tf +++ b/examples/terraform/aws/main.tf @@ -50,45 +50,45 @@ module "windows_workers" { security_group_id = module.common.security_group_id image_id = module.common.windows_2019_image_id kube_cluster_tag = module.common.kube_cluster_tag - ssh_key = var.cluster_name instance_profile_name = module.common.instance_profile_name worker_type = var.worker_type + windows_administrator_password = var.windows_administrator_password } locals { managers = [ for host in module.masters.machines : { address = host.public_ip - role = host.tags["Role"] - privateInterface = "ens5" ssh = { user = "ubuntu" keyPath = "./ssh_keys/${var.cluster_name}.pem" } + role = host.tags["Role"] + privateInterface = "ens5" } ] workers = [ for host in module.workers.machines : { address = host.public_ip - role = host.tags["Role"] - privateInterface = "ens5" ssh = { user = "ubuntu" keyPath = "./ssh_keys/${var.cluster_name}.pem" } + role = host.tags["Role"] + privateInterface = "ens5" } ] windows_workers = [ for host in module.windows_workers.machines : { address = host.public_ip - role = host.tags["Role"] - privateInterface = "Ethernet 2" winRM = { user = "Administrator" password = var.windows_administrator_password useHTTPS = true insecure = true } + role = host.tags["Role"] + privateInterface = "Ethernet 2" } ] } diff --git a/examples/terraform/aws/modules/windows_worker/main.tf b/examples/terraform/aws/modules/windows_worker/main.tf index 483edf2..b4059d6 100644 --- a/examples/terraform/aws/modules/windows_worker/main.tf +++ b/examples/terraform/aws/modules/windows_worker/main.tf @@ -15,7 +15,6 @@ locals { subnet_count = length(var.subnet_ids) } - resource "aws_instance" "ucp_worker" { count = var.worker_count @@ -84,6 +83,7 @@ Start-Service WinRM EOF + lifecycle { ignore_changes = [ami] } diff --git a/examples/terraform/aws/modules/windows_worker/variables.tf b/examples/terraform/aws/modules/windows_worker/variables.tf index ac191b9..910fbcd 100644 --- a/examples/terraform/aws/modules/windows_worker/variables.tf +++ b/examples/terraform/aws/modules/windows_worker/variables.tf @@ -14,10 +14,6 @@ variable "image_id" {} variable "kube_cluster_tag" {} -variable "ssh_key" { - description = "SSH key name" -} - variable "worker_count" { default = 0 } diff --git a/examples/terraform/aws/variables.tf b/examples/terraform/aws/variables.tf index 655acca..ec4b5ce 100644 --- a/examples/terraform/aws/variables.tf +++ b/examples/terraform/aws/variables.tf @@ -42,3 +42,6 @@ variable "master_volume_size" { variable "worker_volume_size" { default = 100 } + +variable "windows_administrator_password" { +}