(terraform): change name of private SSH keys

This commit is contained in:
Sean Knox 2018-04-02 13:32:27 -07:00
Родитель c367c448fb
Коммит f976908eb3
4 изменённых файлов: 9 добавлений и 13 удалений

Просмотреть файл

@ -23,9 +23,9 @@ export DIR_KUBECONFIG := .kube
#
export AZURE_LOCATION ?= westus2
export CLUSTER_NAME ?= mycluster
export CLUSTER_NAME ?= foobarbaz
export AZURE_VM_KEY_NAME ?= acstack-$(CLUSTER_NAME)
export AZURE_VM_KEY_NAME ?= $(CLUSTER_NAME)
export AZURE_VM_KEY_PATH := ${DIR_KEY_PAIR}/${AZURE_VM_KEY_NAME}.pem
export AZURE_VHD_URI ?= https://acstackimages.blob.core.windows.net/system/Microsoft.Compute/Images/acs-vhds/acstack-1522643166-osDisk.629d7109-82a1-4835-8b08-35e22931e261.vhd
export INTERNAL_TLD := ${CLUSTER_NAME}.acs
@ -57,7 +57,7 @@ export PKI_IP ?= 10.0.10.9
## generate key-pair, variables and then `terraform apply`
all: prereqs create-keypair create-certs init apply
@echo "${GREEN}✓ terraform portion of 'make all' has completed ${NC}\n"
@$(MAKE) post-terraform
# @$(MAKE) post-terraform
.PHONY: post-terraform
post-terraform:

Просмотреть файл

@ -1,7 +1,3 @@
data "azurerm_resource_group" "image" {
name = "ACStackImages"
}
resource "azurerm_public_ip" "bastion" {
name = "bastion"
location = "${ var.location }"
@ -79,11 +75,11 @@ resource "azurerm_virtual_machine" "bastion" {
}
data "template_file" "ssh-private-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem" )}"
}
data "template_file" "ssh-pub-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem.pub" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem.pub" )}"
}
resource "null_resource" "dummy_dependency" {

Просмотреть файл

@ -142,11 +142,11 @@ data "template_file" "cloud-config" {
}
data "template_file" "ssh-private-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem" )}"
}
data "template_file" "ssh-pub-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem.pub" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem.pub" )}"
}
resource "null_resource" "dummy_dependency" {

Просмотреть файл

@ -138,11 +138,11 @@ data "template_file" "cloud-config" {
}
data "template_file" "ssh-private-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem" )}"
}
data "template_file" "ssh-pub-key" {
template = "${ file( "${ path.module }/../../.keypair/acstack-${ var.name }.pem.pub" )}"
template = "${ file( "${ path.module }/../../.keypair/${ var.name }.pem.pub" )}"
}
resource "null_resource" "dummy_dependency" {