Skip to content

Add launch_template to aws_autoscaling_group data source #16289

Closed
@visit1985

Description

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

DescribeAutoScalingGroups can return a LaunchTemplateSpecification, which is currently not exposed in the aws_autoscaling_group data source. I would like to use this values to identify the aws_launch_template which is auto-generated when a aws_eks_node_group is created.

New or Affected Resource(s)

  • data source aws_autoscaling_group

Potential Terraform Configuration

resource "aws_eks_node_group" "ng" {
  count = var.availability_zone_count
  // ...
}

data "aws_autoscaling_group" "asg" {
  count = var.availability_zone_count
  name = aws_eks_node_group.ng[count.index].resources.0.autoscaling_groups.0.name
}

data "aws_launch_template" "lt" {
  count = var.availability_zone_count
  name = data.aws_autoscaling_group.asg[count.index].launch_template.name
}

References

https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAutoScalingGroups.html
https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_AutoScalingGroup.html
https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html

Metadata

Assignees

Labels

enhancementRequests to existing resources that expand the functionality or scope.service/autoscalingIssues and PRs that pertain to the autoscaling service.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions