Closed Remy-Mollandin-SK5 closed 1 year ago
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
This PR was automatically closed because of stale in 10 days
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
For now, module have been using a resource statement for each rule type (source_security_group, cidr_blocks, ipv6_cidr_blocks and self).
Using terraform 1.3 optional keywork with default, we should be able to simplify this logic and merge resources in a single map. It should also provide a more clear and concise source code.
Validation are enabled at the variable level to ensure at least one required field is set:
It moves the logic of rule default values from:
to:
It also gives a solution to #281 as prefix_list_ids are now handled at the rule level.
Motivation and Context
Making the module easier to use and less error prone by merging variables that are closely related. It also increase the maintainability as most of the default logic is now handled directly by Terraform.
Breaking Changes
This is breaking the current usage as the rule logic is now handled by a new variable. All the old ones is going to be removed and there is no possibility to handle the changes using
moved
statements.It would require a new major release and Terraform >= 1.3.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectsFor now only the
complete
example have been updated. The terraform apply is running fine in my personnal account.pre-commit run -a
on my pull requestpre-commit is installed and hooks enabled. However the
pre-commit run -a
command hang onterraform validate
. Hooks during commit are clear.