mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-17 05:21:34 +02:00
Rename cluster_name to name in internal module
* Ensure consistency between AWS and GCP platforms
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
module "workers" {
|
||||
source = "workers"
|
||||
cluster_name = "${var.cluster_name}"
|
||||
name = "${var.cluster_name}"
|
||||
|
||||
# AWS
|
||||
vpc_id = "${aws_vpc.network.id}"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
variable "cluster_name" {
|
||||
variable "name" {
|
||||
type = "string"
|
||||
description = "Unique name"
|
||||
description = "Unique name instance group"
|
||||
}
|
||||
|
||||
variable "vpc_id" {
|
||||
|
@ -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
|
||||
}]
|
||||
}
|
||||
|
Reference in New Issue
Block a user