Skip to content

feat: Additional tags to wide open security groups #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 17, 2020

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Jul 23, 2020

Description

Adds a new variable var.tags_sgs_additional to merge with the tags supplied on the security group resources that are open to the world. This is to add tags to those wide open security groups to pass our audits.

Motivation and Context

For auditing purposes

Closes #141

Breaking Changes

None

How Has This Been Tested?

Locally

@nitrocode nitrocode changed the title Additional tags to wide open security groups feat: Additional tags to wide open security groups Jul 23, 2020
@bryantbiggs
Copy link
Member

thanks @nitrocode - could you split this up to 3 tags since there are 3 security groups and name them:

  • alb_https_security_group_tags
  • alb_http_security_group_tags
  • atlantis_security_group_tags

and the variables can be defined similar to what has been done on the vpc module here

@nitrocode
Copy link
Member Author

Hi @bryantbiggs .

  • alb_https_security_group_tags
  • alb_http_security_group_tags
  • atlantis_security_group_tags

The way these are named, are you advocating to not do a merge on those resources' tags' regarding the tags variable and instead supplant var.tags for those resources ?

and the variables can be defined similar to what has been done on the vpc module here

If I used the example you linked to, the variable in this PR would be var.sgs_tags and would apply to all of the open-to-the-world security groups. Is that correct?

@bryantbiggs
Copy link
Member

bryantbiggs commented Jul 26, 2020

no no, I think merging is good. its common across the modules here, there is a default tags group and then individual tags per "resource". so if you look at like the VPC module as an example, you'll see they merge the default tags as well as tags for the specific resource like:

	tags = merge(var.tags, var.dhcp_options_tags)

so here with your PR I think it would be good to have something like:

# for alb_https security group
tags = merge(local.tags, var.alb_https_security_group_tags)
...
# for alb_http security group
tags = merge(local.tags, var.alb_http_security_group_tags)
...
# for atlantis security group
tags = merge(local.tags, var.atlantis_security_group_tags)

that way the each get the default tags with local.tags but then you can add/override with the specific tag variable provided at the end. what do you think about that?

@nitrocode
Copy link
Member Author

@bryantbiggs makes sense to me. I updated the changes to reflect your suggestions.

From previous comments by @antonbabenko, it looks like these PRs won't get any love until August #128 (comment).

@bryantbiggs
Copy link
Member

@nitrocode would you mind updating your branch with master - @antonbabenko 👍

@nitrocode
Copy link
Member Author

All set!

@antonbabenko antonbabenko merged commit 8ed9928 into terraform-aws-modules:master Aug 17, 2020
@antonbabenko
Copy link
Member

Thanks, @nitrocode !

v2.22.0 has been just released.

@nitrocode nitrocode deleted the add-sg-tags branch October 22, 2022 23:30
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thoughts on adding a tag to the public ingress security groups?
3 participants