terraform-aws-modules / terraform-aws-vpn-gateway

Terraform module to create AWS VPN gateway resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/vpn-gateway/aws
Apache License 2.0
111 stars 154 forks source link

feat: Added Transit Gateway Attachment tagging #92

Closed jrkalf-cambrian closed 1 year ago

jrkalf-cambrian commented 1 year ago

Description

When creating a VPN gateway using the transit gateway option, it will not put a name to the transit gateway attachment created, nor will it place tags on the transit gateway attachments. This is a shortcoming in the terraform api, or the aws api. This is unknown to me.

In the transit gateway attachment id part of the Terraform VPN documentation, it's already described that aws_ec2_tag should be used.

I've added the code that should place the proper Name tag to the transit_gateway_attachment object. And if var.tags contains any values, it should run a for_each loop and attach those key/value pairs as well.

Motivation and Context

Why is it needed, proper tagging of AWS resources and proper visibility of objects in the AWS console.

Breaking Changes

Not to the best of my knowledge

How Has This Been Tested?

jrkalf-cambrian commented 1 year ago

I believe we can link this to an issue which was created in the wrong place: https://github.com/terraform-aws-modules/.github/issues/27

It had a similar request.

github-actions[bot] commented 1 year ago

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

jrkalf-cambrian commented 1 year ago

Is this going to be merged? @antonbabenko

StephenKing commented 1 year ago

Certainly, it doesn't apply the Default Tags of the AWS provider, but that's more a limitation of the provider (aws_ec2 resource should do that?), as I guess we can't even access those.

github-actions[bot] commented 1 year ago

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

jrkalf-cambrian commented 1 year ago

not stale. Please review @antonbabenko

github-actions[bot] commented 1 year ago

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

jrkalf-cambrian commented 1 year ago

Could you be so kind to review and don't let it auto expire @antonbabenko

antonbabenko commented 1 year ago

@jrkalf-cambrian Please fix the failing build and I will merge it.

jrkalf-cambrian commented 1 year ago

@antonbabenko ran the pre-commit run --all-files to update and commit all updated README.md files.

# pre-commit run --all-files
Terraform fmt............................................................Passed
Terraform validate.......................................................Passed
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
check for merge conflicts................................................Passed
fix end of files.........................................................Passed
jrkalf-cambrian commented 1 year ago

@antonbabenko frustrating change that the pre-commit hooks runs a different terraform AWS provider version number in GitHub actions than it runs on my local laptop. I made the manual update and it's should now match the exact code line the pre-commit hook in GitHub actions requires.

antonbabenko commented 1 year ago

This PR is included in version 3.7.0 :tada:

StephenKing commented 1 year ago

Certainly, it doesn't apply the Default Tags of the AWS provider, but that's more a limitation of the provider (aws_ec2 resource should do that?), as I guess we can't even access those.

actually I recently stumbled over data.aws_default_tags

github-actions[bot] commented 11 months ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.