You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is a way to pass tags to launch templates, but it defines those only for volumes.
My use case is deny IAM policy, which doesn't allow to call ec2:RunInstances without specifying certain tags for instance. I know there is way for ASG to pass tags to instance, but AWS Documentation states that:
In most cases, when an Auto Scaling group launches instances, it adds tags to the instances during resource creation rather than after the resource is created.
The exception is when you use a launch configuration to launch Spot Instances. For this scenario, your Auto Scaling group adds tags while the instances are in the Pending lifecycle state
if you need the Auto Scaling group to add tags to instances as part of the same API call that launches the Spot Instances, consider migrating to launch templates.
But currently there is no way to pass tags for instances down to launch templates.
In my case debugging of that took a lot of time because of terraform showing this error:
Error: Error creating AutoScaling Group: AccessDenied: You are not authorized to use launch template: lt-009a3ea50f5e2c231
status code: 403, request id: 2f09ef93-17a6-4b41-950d-03b3f194411d
on .terraform/modules/eks/terraform-aws-modules-terraform-aws-eks-dd06c59/workers_launch_template.tf line 3, in resource "aws_autoscaling_group" "workers_launch_template":
3: resource "aws_autoscaling_group" "workers_launch_template" {
So error was unclear, but cause of error was that missing instance tag in launch template.
What's the expected behavior?
One could specify instance tags via launch template
Thanks!
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I'm submitting a...
What is the current behavior?
Currently there is a way to pass tags to launch templates, but it defines those only for volumes.
My use case is deny IAM policy, which doesn't allow to call
ec2:RunInstances
without specifying certain tags for instance. I know there is way for ASG to pass tags to instance, but AWS Documentation states that:But currently there is no way to pass tags for instances down to launch templates.
In my case debugging of that took a lot of time because of terraform showing this error:
So error was unclear, but cause of error was that missing instance tag in launch template.
What's the expected behavior?
One could specify instance tags via launch template
Thanks!
The text was updated successfully, but these errors were encountered: