hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.21k forks source link

resource/aws_security_group_rule: Add attribute `tags` #39759

Open gdavison opened 1 month ago

gdavison commented 1 month ago

Description

Security Group Rules support tagging. The data source aws_vpc_security_group_rule has an attribute tags, but the resource does not.

Affected Resource(s) and/or Data Source(s)

aws_security_group_rule

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

stefanfreitag commented 1 month ago

Hello @gdavison!

Thanks for reporting the issue. I had a closer look at the implementation of the data source and the resource you mentioned. It seems that the data source aws_vpc_security_group_rule is linked to

but not aws_security_group_rule. For example, tests point into that direction. Happy to have a closer look if required.

Is there any specific use case for having tags on the resource aws_security_group_rule? The current documentation available here states

Avoid using the aws_security_group_rule resource, as it struggles with managing multiple CIDR blocks, and, due to the historical lack of unique IDs, tags and descriptions.