Skip to content
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 security groups options #53

Merged
merged 9 commits into from Feb 27, 2024

Conversation

QuentinBtd
Copy link
Contributor

what

Add security groups options

why

We can associate NLB with security groups (only at NLB creation)

references

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#security_groups

- Change the default value of the "security_group_enabled" variable from true to false

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
- Modify the `resource "aws_security_group_rule" "default_ingress"` block in `main.tf` to use `var.default_listener_ingress_cidr_blocks` and `var.default_listener_ingress_prefix_list_ids`
- Add a new variable `variable "security_group_ids"` in `variables.tf`
- Add a new variable `variable "default_listener_ingress_cidr_blocks"` in `variables.tf`
- Add a new variable `variable "default_listener_ingress_prefix_list_ids"` in `variables.tf`

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
- Add an output for the security group ID of the NLB

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
- Add `security_group_enabled = true` to `fixtures.us-east-2.tfvars`
- Add `security_group_enabled` variable to the `nlb` module in `main.tf`

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
@QuentinBtd QuentinBtd marked this pull request as ready for review January 29, 2024 16:17
@QuentinBtd QuentinBtd requested review from a team as code owners January 29, 2024 16:17
aknysh
aknysh previously requested changes Jan 29, 2024
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QuentinBtd thanks for the PR

Please address:

README.md is outdated. Please run the following commands locally and push the files:
  make init
  make github/init
  make readme

- Add `aws_security_group.default` resource
- Add `aws_security_group_rule.default_ingress` resource
- Add `aws_security_group_rule.egress` resource
- Add `aws_security_group_rule.tls_ingress` resource
- Add `input_default_listener_ingress_cidr_blocks` variable
- Add `input_default_listener_ingress_prefix_list_ids` variable
- Add `input_security_group_enabled` variable
- Add `input_security_group_ids` variable
- Add `input_tls_ingress_cidr_blocks` variable
- Add `input_tls_ingress_prefix_list_ids` variable
- Add `output_security_group_id` output

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
@aknysh
Copy link
Member

aknysh commented Jan 29, 2024

@QuentinBtd
Copy link
Contributor Author

@QuentinBtd sorry, please do it again, see https://github.com/cloudposse/terraform-aws-nlb/actions/runs/7699308430/job/20982416956?pr=53

I hadn't paid attention the first time, but;

make: gomplate: No such file or directory
make: *** [readme/build] Error 1

@QuentinBtd
Copy link
Contributor Author

Hello @aknysh
It works now. Can you run the workflow please?

@jamengual
Copy link

/terratest

- Add a complete license in the README file

Signed-off-by: Quentin BERTRAND <contact@quentinbertrand.fr>
@QuentinBtd
Copy link
Contributor Author

QuentinBtd commented Feb 20, 2024

README.md updated (again)

@milldr
Copy link
Sponsor Member

milldr commented Feb 20, 2024

/terratest

Copy link
Contributor

@dudymas dudymas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/terratest

@dudymas dudymas dismissed aknysh’s stale review February 27, 2024 13:52

Docs have been updated

@aknysh
Copy link
Member

aknysh commented Feb 27, 2024

/terratest

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @QuentinBtd

@aknysh aknysh merged commit 833e4a2 into cloudposse:main Feb 27, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants