mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-25 10:08:25 +02:00
added output for asg
This commit is contained in:
@@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
||||
### Added
|
||||
|
||||
- security group id can be provided for either/both of the cluster and the workers. If not provided, security groups will be created with sufficient rules to allow cluster-worker communication. - kudos to @tanmng on the idea ⭐
|
||||
- outputs of security group ids and worker ASG arns added for working with these resources outside the module.
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -116,3 +116,4 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
|
||||
| config_map_aws_auth | A kubernetes configuration to authenticate to this EKS cluster. |
|
||||
| kubeconfig | kubectl config file contents for this EKS cluster. |
|
||||
| worker_security_group_id | Security group ID attached to the EKS workers. |
|
||||
| workers_asg_arns | IDs of the autoscaling groups containing workers. |
|
||||
|
||||
@@ -39,6 +39,11 @@ output "kubeconfig" {
|
||||
value = "${data.template_file.kubeconfig.rendered}"
|
||||
}
|
||||
|
||||
output "workers_asg_arns" {
|
||||
description = "IDs of the autoscaling groups containing workers."
|
||||
value = "${aws_autoscaling_group.workers.*.arn}"
|
||||
}
|
||||
|
||||
output "worker_security_group_id" {
|
||||
description = "Security group ID attached to the EKS workers."
|
||||
value = "${local.worker_security_group_id}"
|
||||
|
||||
@@ -17,7 +17,7 @@ resource "aws_autoscaling_group" "workers" {
|
||||
}
|
||||
|
||||
resource "aws_launch_configuration" "workers" {
|
||||
name_prefix = "${var.cluster_name}-${lookup(var.worker_groups[count.index], "name", count.index)}-"
|
||||
name = "${var.cluster_name}-${lookup(var.worker_groups[count.index], "name", count.index)}"
|
||||
associate_public_ip_address = true
|
||||
security_groups = ["${local.worker_security_group_id}"]
|
||||
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
|
||||
|
||||
Reference in New Issue
Block a user