forked from WorksOnArm/OpenStackWorksOnArm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDistributeKeys.tf.off
More file actions
40 lines (32 loc) · 963 Bytes
/
DistributeKeys.tf.off
File metadata and controls
40 lines (32 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# copy the keys over to the controller to allow SSH access to the other nodes
#
resource "null_resource" "controller-distribute-keys" {
connection {
host = packet_device.controller.access_public_ipv4
private_key = file(var.cloud_ssh_key_path)
}
provisioner "file" {
source = var.cloud_ssh_key_path
destination = "openstack_rsa"
}
provisioner "file" {
source = var.cloud_ssh_public_key_path
destination = "openstack_rsa.pub"
}
}
# keep a set on the dashboard as a backup in case the controller is down
resource "null_resource" "dashboard-distribute-keys" {
connection {
host = packet_device.dashboard.access_public_ipv4
private_key = file(var.cloud_ssh_key_path)
}
provisioner "file" {
source = var.cloud_ssh_key_path
destination = "openstack_rsa"
}
provisioner "file" {
source = var.cloud_ssh_public_key_path
destination = "openstack_rsa.pub"
}
}