Fix net-firewall-policy factory name and action #1614
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the net-firewall-policy module factory implementation doesn't enable customisation of the rule action, nor does it
plan
correctly due to a missing name attribute.Customisable action - the action for egress and ingress rules generated using the factory is hardcoded to "deny" and "allow" respectively. The previous
net-vpc-firewall-policy
module allowed customisation but set deny egress and allow ingress by default, which has been replicated in this PR rather than requiring an explicit action which the HFW set up in thefolder
module required.Missing attribute - while the rules passed via
.tfvars
have a name/direction appended inmain.tf
the factory rules do not. As the direction for factory rules is assigned infactory.tf
, this PR adds the name there too.