Skip to content

Commit

Permalink
modules/aws/etcd/ignition: Drop hard-coded ignition_etcd_keys
Browse files Browse the repository at this point in the history
The local variable is from cd71f30 (Ignition assets, 2018-02-14,
coreos/tectonic-installer#2940), but it doesn't scale beyond three
etcd nodes.  This commit pivots to an approach that scales to an
arbitrary number of nodes, matching the scalable generation logic
we've had since 0c7ac90 (modules/*: trust CA certificates on the
nodes, 2017-11-22, coreos/tectonic-installer#2362).
  • Loading branch information
wking committed Jul 23, 2018
1 parent b669e57 commit 2bd7ddd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/aws/etcd/ignition.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
locals {
ignition_etcd_keys = ["ignition_etcd_0.json", "ignition_etcd_1.json", "ignition_etcd_2.json"]
}

data "ignition_config" "tnc" {
count = "${var.instance_count}"

Expand All @@ -13,7 +9,7 @@ data "ignition_config" "tnc" {

# Used for loading certificates
append {
source = "${format("s3://%s/%s", var.s3_bucket, local.ignition_etcd_keys[count.index])}"
source = "${format("s3://%s/ignition_etcd_%d.json", var.s3_bucket, count.index)}"

# TODO: add verification
}
Expand Down

0 comments on commit 2bd7ddd

Please sign in to comment.