mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-19 15:21:18 +02:00
added output for asg
This commit is contained in:
@@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Added
|
### 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 ⭐
|
- 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
|
### 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. |
|
| config_map_aws_auth | A kubernetes configuration to authenticate to this EKS cluster. |
|
||||||
| kubeconfig | kubectl config file contents for this EKS cluster. |
|
| kubeconfig | kubectl config file contents for this EKS cluster. |
|
||||||
| worker_security_group_id | Security group ID attached to the EKS workers. |
|
| 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}"
|
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" {
|
output "worker_security_group_id" {
|
||||||
description = "Security group ID attached to the EKS workers."
|
description = "Security group ID attached to the EKS workers."
|
||||||
value = "${local.worker_security_group_id}"
|
value = "${local.worker_security_group_id}"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ resource "aws_autoscaling_group" "workers" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_launch_configuration" "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
|
associate_public_ip_address = true
|
||||||
security_groups = ["${local.worker_security_group_id}"]
|
security_groups = ["${local.worker_security_group_id}"]
|
||||||
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
|
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
|
||||||
|
|||||||
Reference in New Issue
Block a user