-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Upgrade to aws vpc security group rule #343
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
base: master
Are you sure you want to change the base?
feat: Upgrade to aws vpc security group rule #343
Conversation
|
@bryantbiggs Could I get your help in reviewing please? |
|
unfortunately, this is a massively disruptive change and it doesn't align with the types of changes we would most likely make today if we were to make this drastic of a change. specifically, changing from an array/list based data structure to a map would appear to simplify a lot of the prior logic that was designed at a time when maps/for_each/etc. were not readily available (or very well supported) in the language |
|
Hi @bryantbiggs, |
|
I haven't looked at the various implementations here in details to plot out what changes we would look to make, but in general the goal would be to update to the latest provider resources and methods for creating the infrastructure correctly (per AWS API and Terraform provider), simplify where we can, use stable data structures (maps instead of lists), etc. But the code changes are the easy part of the equation - the upgrade path and migration plus dealing with users is the more time consuming and arduous side of the process that comes with a disruptive change like this |
|
I'll see if I can suggest some things over the weekends, probably won't be able to take a look until then. |
Description
This PR changes the use of aws_security_group_rule to aws_vpc_security_ingress/egress_rule
Motivation and Context
As discussed in 327, switching to use aws_vpc_ingress/egress_rule will allow the usage of tags and is the recommended way going forward.
Breaking Changes
A full rename of variables, fields as its a change of resources, and to keep the naming pattern consistent.
Notably:
How Has This Been Tested?
examples/*to demonstrate and validate my change(s)examples/*projectsI tested the changes individually for each resources with multiple configurations (e.g. 2 prefix list * 3 ingress rules etc)
I do intend to squash my commits, please go through them individually as I find it easier to review.
My constraints while writing this: "aws_security_group" allows for multiple fields of multiple values, such as having prefix_list_ids and cidr_blocks="1.1.1.1/32,0.0.0.0/0", for aws_vpc_security_ingress, only one field and one value is supported.