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

Firewall dynamic block not working #166

Closed
mholleville opened this issue Mar 27, 2020 · 2 comments
Closed

Firewall dynamic block not working #166

mholleville opened this issue Mar 27, 2020 · 2 comments

Comments

@mholleville
Copy link

Hello,

I'm trying to use firewall module with example. But when I try terraform plan I have the following error :

Error: "allow": only one of `allow,deny` can be specified, but `allow,deny` were specified.

I think we have conflict with the dynamic blocks :

  dynamic "allow" {
    for_each = [for rule in each.value.rules : rule if each.value.action == "allow"]
    iterator = rule
    content {
      protocol = rule.value.protocol
      ports    = rule.value.ports
    }
  }

  dynamic "deny" {
    for_each = [for rule in each.value.rules : rule if each.value.action == "deny"]
    iterator = rule
    content {
      protocol = rule.value.protocol
      ports    = rule.value.ports
    }
  }
@mholleville
Copy link
Author

Issue --> hashicorp/terraform-plugin-sdk#280

@morgante
Copy link
Contributor

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

No branches or pull requests

2 participants