hello, I have a question with SecurityGroupIngress...
# general
b
hello, I have a question with SecurityGroupIngress. The example in the documentation shows the definition as:
Copy code
ingress=[aws.ec2.SecurityGroupIngressArgs(
        description="TLS from VPC",
        from_port=443,
        to_port=443,
        protocol="tcp",
        cidr_blocks=[aws_vpc["main"]["cidr_block"]],
        ipv6_cidr_blocks=[aws_vpc["main"]["ipv6_cidr_block"]],
    )]
If I want to have different rules, for example:
Copy code
ingress=[
                {
                    "description": "https inbound traffic",
                    "protocol": "tcp",
                    "from_port": 443,
                    "to_port": 443,
                    "security_groups": [securityGroup],
                },
                {
                    "description": "http inbound traffic",
                    "protocol": "tcp",
                    "from_port": 80,
                    "to_port": 80,
                    "security_groups": [securityGroup],
                },
            ],
can I pass several arguments like so many dictionaries in the SecurityGroupIngressArgs function?
Copy code
ingress=[

			aws.ec2.SecurityGroupIngressArgs(
                {
                    "description": "https inbound traffic",
                    "protocol": "tcp",
                    "from_port": 443,
                    "to_port": 443,
                    "security_groups": [securityGroup],
                },
                {
                    "description": "http inbound traffic",
                    "protocol": "tcp",
                    "from_port": 80,
                    "to_port": 80,
                    "security_groups": [securityGroup],
                },
            ],
            
            )
q
Looks like a use-case of securitygrouprule
d
Nope, you should end up with a list of the
Args
object instead
Looks like a use-case of securitygrouprule
This is a good goto. Generally found it more usable/flexible in Terraform