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

foreach not supported by resource ucloud_security_group. #73

Open
hanyouqing opened this issue Sep 3, 2020 · 0 comments
Open

foreach not supported by resource ucloud_security_group. #73

hanyouqing opened this issue Sep 3, 2020 · 0 comments

Comments

@hanyouqing
Copy link

hanyouqing commented Sep 3, 2020

I have my own security group rule defined as a map in variables file, just like:

xxx_sg_rules = {
    beijing = [
      {
        "priority"    = "medium"
        "type"        = "ingress"
        "ip_protocol" = "icmp"
        "port_range"  = "1-65535"
        "source"      = "0.0.0.0/0"
        "policy"      = "accept"
        "description" = "ICMP"
      },
     {
     ........
     }
...

i'm trying to define rules in ucloud_security_group like:

foreach rule in xxx_sg_rules.beijing:
rules {
 port_range = rule.port_range
 .....
}

and got some errors, it seems like ucloud doesn't support foreach and for yet.

I'm using count as an alternative for now, if someone else has the same problem with me could have a try. (As ucloud_instance doesn't support bind mutiple security_group, this solution doesn't work, see #76)

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

1 participant