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

net-vpc-firewall turning off default rules #1030

Closed
eliamaldini opened this issue Dec 1, 2022 · 3 comments · Fixed by #1031
Closed

net-vpc-firewall turning off default rules #1030

eliamaldini opened this issue Dec 1, 2022 · 3 comments · Fixed by #1031

Comments

@eliamaldini
Copy link
Collaborator

eliamaldini commented Dec 1, 2022

Hi Team,
it seems that on the net-vpc-firewall module there is an issue when you try to turn off the default routes.

According to the the variable description: "... Set the variable or individual members to null to disable." it is possible to disable the default routes in these two ways:

default_rules_config = null

or

default_rules_config = {
    admin_ranges = null
    https_ranges = null
    ssh_ranges   = null
  }

but both of them didn't work and the default routes are always applied.

The only way that it works is by adding disabled = true.

Thanks

@ludoo
Copy link
Collaborator

ludoo commented Dec 1, 2022

Yep, documentation is incorrect, good catch. This is what we should say there:

Set var.default_rules_config.disabled = true to disable all

tf plan -var project_id=foo -var network=bar \
  -var default_rules_config='{disabled=true}'

Changes to Outputs:
  + default_rules = {
      + admin = []
      + http  = []
      + https = []
      + ssh   = []
    }
  + rules         = {}

or set individual rules to the empty list to disable them individually

tf plan -var project_id=foo -var network=bar \
  -var default_rules_config='{http_ranges=[], https_ranges=[], ssh_ranges=[]}'

Changes to Outputs:
  + default_rules = {
      + admin = []
      + http  = []
      + https = []
      + ssh   = []
    }
  + rules         = {}

@ludoo ludoo self-assigned this Dec 1, 2022
@ludoo
Copy link
Collaborator

ludoo commented Dec 1, 2022

Actually, the README is super clear on this already
image

@ludoo ludoo closed this as completed Dec 1, 2022
@ludoo ludoo added wontfix This will not be worked on on:modules and removed wontfix This will not be worked on labels Dec 1, 2022
@ludoo
Copy link
Collaborator

ludoo commented Dec 1, 2022

Actually it's the variable description which needs updating, sending a PR now.

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

Successfully merging a pull request may close this issue.

2 participants