-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
feat: Add support for creating a security group along with the load balancer #273
feat: Add support for creating a security group along with the load balancer #273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments here and there...
main.tf
Outdated
name = var.security_group_use_name_prefix ? null : local.security_group_name | ||
name_prefix = var.security_group_use_name_prefix ? "${local.security_group_name}-" : null | ||
description = var.security_group_description | ||
vpc_id = data.aws_subnet.this[0].vpc_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already var.vpc_id
, so no need to use data-source aws_subnet.this
to fetch it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in 0ad1649
main.tf
Outdated
description = var.security_group_description | ||
vpc_id = data.aws_subnet.this[0].vpc_id | ||
|
||
tags = merge(var.tags, var.security_group_tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add Name
tag at the end, as we do for other resources already (like this one):
{
"Name" = ... (something like `var.security_group_use_name_prefix ? null : local.security_group_name` maybe)
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 0ad1649
subnets = data.aws_subnets.all.ids | ||
vpc_id = module.vpc.vpc_id | ||
subnets = module.vpc.public_subnets | ||
security_group_rules = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add back the line and the call to security-group
module as an example:
security_groups = [module.security_group.security_group_id]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-added in 0ad1649
examples/complete-alb/main.tf
Outdated
user_pool_id = aws_cognito_user_pool.this.id | ||
tags = { | ||
Example = local.name | ||
GithubRepo = "terraform-aws-eks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GithubRepo = "terraform-aws-eks" | |
GithubRepo = "terraform-aws-alb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops - how did that get there 😅
## [8.3.0](v8.2.2...v8.3.0) (2023-02-07) ### Features * Add support for creating a security group along with the load balancer ([#273](#273)) ([8232b47](8232b47))
This PR is included in version 8.3.0 🎉 |
please rollback or fix it.
|
Why is |
Could you elaborate on why this is a breaking change? I understand that there was an unfortunate bug which has since been patched in https://github.com/terraform-aws-modules/terraform-aws-alb/releases/tag/v8.3.1, but otherwise its not a breaking change |
My bad, it's not breaking change, I'm a bit strong with my words... Just that the change to this new version means that all users of the previous versions will have, on next apply, a creation of a security_group, which is useless, and which will also modify the loadbalancer for nothing. It would have been better to set |
Also broke our projects since we already had a security group and now the module wanted to create another one. So I second that you should set |
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. |
Description
Motivation and Context
Breaking Changes
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request