Skip to content

feat: Add Conditional Support for policy_variables in Policy Module #8

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

Closed

Conversation

irussak3
Copy link

@irussak3 irussak3 commented Jan 6, 2025

This PR introduces conditional support for the policy_variables block in the policy module. This allows users to enable or disable the policy_variables block dynamically based on input variables. Additionally, it adds the required variables to both the policy module and the main module to ensure seamless integration.

Changes in modules/policy

  1. main.tf
    Added a dynamic block for policy_variables that is created only if policy_variable_enabled is set to true.
    The block includes:
    rule_variables with a customizable key.
    An ip_set for specifying a list of IP ranges.

  2. variables.tf

Added new input variables:
policy_variable_enabled (boolean) - Toggles the creation of the policy_variables block.
rule_variable_key (string) - Specifies the key for rule_variables (e.g., HOME_NET).
rule_variable_definition (list of strings) - Specifies the IP ranges for the ip_set.

Changes in Main Module

  1. main.tf
    Passed the policy_variable_enabled, policy_rule_variable_key, and policy_rule_variable_definition variables to the policy module.

  2. variables.tf
    Added new input variables to match those in the policy module:

policy_variable_enabled
policy_rule_variable_key
policy_rule_variable_definition

Testing
Tested the updated policy module locally.
Confirmed that the policy_variables block is created only when policy_variable_enabled is true.
Verified that the input variables are correctly passed from the main module to the policy module.

@irussak3 irussak3 changed the title Add Conditional Support for policy_variables in Policy Module V1.0.2:Add Conditional Support for policy_variables in Policy Module Jan 6, 2025
@irussak3 irussak3 changed the title V1.0.2:Add Conditional Support for policy_variables in Policy Module feat - Add Conditional Support for policy_variables in Policy Module Jan 6, 2025
@irussak3 irussak3 changed the title feat - Add Conditional Support for policy_variables in Policy Module feat Add Conditional Support for policy_variables in Policy Module Jan 6, 2025
@irussak3 irussak3 changed the title feat Add Conditional Support for policy_variables in Policy Module feat: Add Conditional Support for policy_variables in Policy Module Jan 6, 2025
@irussak3 irussak3 mentioned this pull request Jan 6, 2025
@irussak3
Copy link
Author

@antonbabenko Do you know when this might get merged?

Copy link

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

@github-actions github-actions bot added the stale label Mar 30, 2025
@jonyroda97
Copy link

(remove stale label)

@github-actions github-actions bot removed the stale label Mar 31, 2025
Copy link

github-actions bot commented May 1, 2025

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

@github-actions github-actions bot added the stale label May 1, 2025
Copy link

This PR was automatically closed because of stale in 10 days

@antonbabenko
Copy link
Member

This issue has been resolved in version 2.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants