Minor cleanup for zones, docs, and outputs
* Spread across all zones, regardless of UP/DOWN state * Remove unused outputs of private IPs
This commit is contained in:
parent
47a9989927
commit
c6ec6596d8
|
@ -200,7 +200,7 @@ Learn about [version pinning](concepts.md#versioning), maintenance, and [addons]
|
|||
| os_image | OS image for compute instances | "coreos-stable-1465-6-0-v20170817" |
|
||||
| asset_dir | Path to a directory where generated assets should be placed (contains secrets) | "/home/user/.secrets/clusters/yavin" |
|
||||
|
||||
Check the list of valid [zones](https://cloud.google.com/compute/docs/regions-zones/regions-zones) and list Container Linux [images](https://cloud.google.com/compute/docs/images) with `gcloud compute images list | grep coreos`.
|
||||
Check the list of valid [regions](https://cloud.google.com/compute/docs/regions-zones/regions-zones) and list Container Linux [images](https://cloud.google.com/compute/docs/images) with `gcloud compute images list | grep coreos`.
|
||||
|
||||
#### DNS Zone
|
||||
|
||||
|
|
|
@ -15,9 +15,8 @@ resource "google_dns_record_set" "etcds" {
|
|||
}
|
||||
|
||||
# Zones in the region
|
||||
data "google_compute_zones" "available" {
|
||||
data "google_compute_zones" "all" {
|
||||
region = "${var.region}"
|
||||
status = "UP"
|
||||
}
|
||||
|
||||
# Controller instances
|
||||
|
@ -25,7 +24,7 @@ resource "google_compute_instance" "controllers" {
|
|||
count = "${var.count}"
|
||||
|
||||
name = "${var.cluster_name}-controller-${count.index}"
|
||||
zone = "${element(data.google_compute_zones.available.names, count.index)}"
|
||||
zone = "${element(data.google_compute_zones.all.names, count.index)}"
|
||||
machine_type = "${var.machine_type}"
|
||||
|
||||
metadata {
|
||||
|
|
|
@ -30,7 +30,7 @@ resource "google_compute_target_pool" "controllers" {
|
|||
name = "${var.cluster_name}-controller-pool"
|
||||
|
||||
instances = [
|
||||
"${formatlist("%s/%s", google_compute_instance.controllers.*.zone, google_compute_instance.controllers.*.name)}"
|
||||
"${formatlist("%s/%s", google_compute_instance.controllers.*.zone, google_compute_instance.controllers.*.name)}",
|
||||
]
|
||||
|
||||
health_checks = [
|
||||
|
|
|
@ -5,7 +5,3 @@ output "etcd_fqdns" {
|
|||
output "ipv4_public" {
|
||||
value = ["${google_compute_instance.controllers.*.network_interface.0.access_config.0.assigned_nat_ip}"]
|
||||
}
|
||||
|
||||
output "ipv4_private" {
|
||||
value = ["${google_compute_instance.controllers.*.network_interface.0.address}"]
|
||||
}
|
||||
|
|
|
@ -2,10 +2,6 @@ output "controllers_ipv4_public" {
|
|||
value = ["${module.controllers.ipv4_public}"]
|
||||
}
|
||||
|
||||
output "controllers_ipv4_private" {
|
||||
value = ["${module.controllers.ipv4_private}"]
|
||||
}
|
||||
|
||||
output "ingress_static_ip" {
|
||||
value = "${module.workers.ingress_static_ip}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue