Rename cluster_name to name in internal module
* Ensure consistency between AWS and GCP platforms
This commit is contained in:
parent
45b556c08f
commit
c112ee3829
|
@ -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
|
||||
}]
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ module "tempest-worker-pool" {
|
|||
security_groups = "${module.aws-tempest.worker_security_groups}"
|
||||
|
||||
# configuration
|
||||
cluster_name = "tempest-worker-pool"
|
||||
name = "tempest-worker-pool"
|
||||
kubeconfig = "${module.aws-tempest.kubeconfig}"
|
||||
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}" |
|
||||
| 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}" |
|
||||
| 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}" |
|
||||
| ssh_authorized_key | SSH public key for ~/.ssh_authorized_keys | "ssh-rsa AAAAB3NZ..." |
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
variable "name" {
|
||||
type = "string"
|
||||
description = "Unique name"
|
||||
description = "Unique name for instance group"
|
||||
}
|
||||
|
||||
variable "cluster_name" {
|
||||
|
|
Loading…
Reference in New Issue