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" {
source = "workers"
cluster_name = "${var.cluster_name}"
name = "${var.cluster_name}"
# AWS
vpc_id = "${aws_vpc.network.id}"

View File

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

View File

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

View File

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