Rename cluster_name to name in internal module

* Ensure consistency between AWS and GCP platforms
This commit is contained in:
Dalton Hubble 2018-03-03 17:52:01 -08:00
parent 45b556c08f
commit c112ee3829
6 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
module "workers" { module "workers" {
source = "workers" source = "workers"
cluster_name = "${var.cluster_name}" name = "${var.cluster_name}"
# AWS # AWS
vpc_id = "${aws_vpc.network.id}" vpc_id = "${aws_vpc.network.id}"

View File

@ -1,6 +1,6 @@
# Network Load Balancer for Ingress # Network Load Balancer for Ingress
resource "aws_lb" "ingress" { resource "aws_lb" "ingress" {
name = "${var.cluster_name}-ingress" name = "${var.name}-ingress"
load_balancer_type = "network" load_balancer_type = "network"
internal = false internal = false
@ -34,7 +34,7 @@ resource "aws_lb_listener" "ingress-https" {
# Network Load Balancer target groups of instances # Network Load Balancer target groups of instances
resource "aws_lb_target_group" "workers-http" { resource "aws_lb_target_group" "workers-http" {
name = "${var.cluster_name}-workers-http" name = "${var.name}-workers-http"
vpc_id = "${var.vpc_id}" vpc_id = "${var.vpc_id}"
target_type = "instance" target_type = "instance"
@ -57,7 +57,7 @@ resource "aws_lb_target_group" "workers-http" {
} }
resource "aws_lb_target_group" "workers-https" { resource "aws_lb_target_group" "workers-https" {
name = "${var.cluster_name}-workers-https" name = "${var.name}-workers-https"
vpc_id = "${var.vpc_id}" vpc_id = "${var.vpc_id}"
target_type = "instance" target_type = "instance"

View File

@ -1,6 +1,6 @@
variable "cluster_name" { variable "name" {
type = "string" type = "string"
description = "Unique name" description = "Unique name instance group"
} }
variable "vpc_id" { variable "vpc_id" {

View File

@ -1,6 +1,6 @@
# Workers AutoScaling Group # Workers AutoScaling Group
resource "aws_autoscaling_group" "workers" { resource "aws_autoscaling_group" "workers" {
name = "${var.cluster_name}-worker ${aws_launch_configuration.worker.name}" name = "${var.name}-worker ${aws_launch_configuration.worker.name}"
# count # count
desired_capacity = "${var.count}" desired_capacity = "${var.count}"
@ -29,7 +29,7 @@ resource "aws_autoscaling_group" "workers" {
tags = [{ tags = [{
key = "Name" key = "Name"
value = "${var.cluster_name}-worker" value = "${var.name}-worker"
propagate_at_launch = true propagate_at_launch = true
}] }]
} }

View File

@ -25,7 +25,7 @@ module "tempest-worker-pool" {
security_groups = "${module.aws-tempest.worker_security_groups}" security_groups = "${module.aws-tempest.worker_security_groups}"
# configuration # configuration
cluster_name = "tempest-worker-pool" name = "tempest-worker-pool"
kubeconfig = "${module.aws-tempest.kubeconfig}" kubeconfig = "${module.aws-tempest.kubeconfig}"
ssh_authorized_key = "${var.ssh_authorized_key}" ssh_authorized_key = "${var.ssh_authorized_key}"
@ -54,7 +54,7 @@ The AWS internal `workers` module supports a number of [variables](https://githu
| vpc_id | Must be set to `vpc_id` output by cluster | "${module.cluster.vpc_id}" | | vpc_id | Must be set to `vpc_id` output by cluster | "${module.cluster.vpc_id}" |
| subnet_ids | Must be set to `subnet_ids` output by cluster | "${module.cluster.subnet_ids}" | | subnet_ids | Must be set to `subnet_ids` output by cluster | "${module.cluster.subnet_ids}" |
| security_groups | Must be set to `worker_security_groups` output by cluster | "${module.cluster.worker_security_groups}" | | security_groups | Must be set to `worker_security_groups` output by cluster | "${module.cluster.worker_security_groups}" |
| cluster_name | Unique name | "tempest-worker-pool" | | name | Unique name (distinct from cluster name) | "tempest-m5s" |
| kubeconfig | Must be set to `kubeconfig` output by cluster | "${module.cluster.kubeconfig}" | | kubeconfig | Must be set to `kubeconfig` output by cluster | "${module.cluster.kubeconfig}" |
| ssh_authorized_key | SSH public key for ~/.ssh_authorized_keys | "ssh-rsa AAAAB3NZ..." | | ssh_authorized_key | SSH public key for ~/.ssh_authorized_keys | "ssh-rsa AAAAB3NZ..." |

View File

@ -1,6 +1,6 @@
variable "name" { variable "name" {
type = "string" type = "string"
description = "Unique name" description = "Unique name for instance group"
} }
variable "cluster_name" { variable "cluster_name" {