terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
742 stars 1.83k forks source link

Adding tags to spot instances #392

Open shaked-tech opened 1 month ago

shaked-tech commented 1 month ago

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

Is your request related to a problem? Please describe.

When creating spot instances the tags are only added to the spot request.

Describe the solution you'd like.

It would be nice if there was a bool option to add the tags to the instances themselves, additionally, it could be valid that by default only the Name key would be added (as it is already set by default) because to be honest most time were looking at the instances themselves and not the spot requests

Describe alternatives you've considered.

The alternative I used is to loop through the Module instances and add tags to the instances manually using 'aws_ec2_tag' resource.

Additional context

I can open a PR if needed :) thanks in advance!

github-actions[bot] commented 5 days ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days