Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
platforms/azure: added ssh key to etcd (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
sozercan authored and Sergiusz Urbaniak committed May 10, 2017
1 parent 8882b6b commit dc30418
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
9 changes: 7 additions & 2 deletions modules/azure/etcd/etcd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ resource "azurerm_virtual_machine" "etcd_node" {
os_profile {
computer_name = "etcd"
admin_username = "core"
admin_password = "Microsoft123!"
admin_password = ""
custom_data = "${base64encode("${data.ignition_config.etcd.*.rendered[count.index]}")}"
}

os_profile_linux_config {
disable_password_authentication = false
disable_password_authentication = true

ssh_keys {
path = "/home/core/.ssh/authorized_keys"
key_data = "${file(var.public_ssh_key)}"
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/azure/etcd/ignition.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data "ignition_user" "core" {
name = "core"

ssh_authorized_keys = [
"${file(var.ssh_key)}",
"${file(var.public_ssh_key)}",
]
}

Expand Down
2 changes: 1 addition & 1 deletion modules/azure/etcd/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ variable "cluster_name" {
type = "string"
}

variable "ssh_key" {
variable "public_ssh_key" {
type = "string"
}

Expand Down
2 changes: 1 addition & 1 deletion platforms/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module "etcd" {
etcd_count = "${var.tectonic_etcd_count}"
base_domain = "${var.tectonic_base_domain}"
cluster_name = "${var.tectonic_cluster_name}"
ssh_key = "${var.tectonic_azure_ssh_key}"
public_ssh_key = "${var.tectonic_azure_ssh_key}"
virtual_network = "${module.vnet.vnet_id}"
subnet = "${module.vnet.master_subnet}"
}
Expand Down
2 changes: 2 additions & 0 deletions platforms/azure/tectonic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ module "tectonic" {
source = "../../modules/tectonic"
platform = "azure"

master_count = "${var.tectonic_master_count}"

base_address = "${var.tectonic_azure_use_custom_fqdn == "true" ? "${var.tectonic_cluster_name}.${var.tectonic_base_domain}" : module.masters.ingress_internal_fqdn}"
kube_apiserver_url = "${var.tectonic_azure_use_custom_fqdn == "true" ? "https://${var.tectonic_cluster_name}-k8s.${var.tectonic_base_domain}:443" : "https://${module.masters.api_internal_fqdn}:443"}"

Expand Down

0 comments on commit dc30418

Please sign in to comment.