Hello folks, When i am trying to create Ingress/Eg...
# aws
a
Hello folks, When i am trying to create Ingress/Egress attribute of the SecurityGroup, it throws a following error
Copy code
ingress=[aws.ec2.SecurityGroupIngressArgs(
    AttributeError: module 'pulumi_aws.ec2' has no attribute 'SecurityGroupIngressArgs'
The code was referred from an Pulumi docs example.
Copy code
security_group = aws.ec2.SecurityGroup( # type: ignore
    "secgrp",
    description="Splunk Hybrid cloud security group",
    vpc_id=vpcid,
    ingress=[aws.ec2.SecurityGroupIngressArgs(
        description="TLS from VPC",
        from_port=443,
        to_port=443,
        protocol="tcp",
        cidr_blocks=["0.0.0.0/0"],
    )],
    egress=[aws.ec2.SecurityGroupEgressArgs(
        from_port=0,
        to_port=0,
        protocol="-1",
        cidr_blocks=["0.0.0.0/0"],
    )],
)
Any suggestions?
w
I don’t have a real answer for you. But I copied your security group declaration and was able to
pulumi up
without the error. So it seems it may be related to your environment?
1
b
@alert-raincoat-81485 I would suggest it's down to the version of pulumi-aws you are using
1
a
@witty-candle-66007 I would try that again. Thank you Mitch
@broad-dog-22463 Which pulumi version should i run to? The current version. i am running is 2.12.1 I saw the warning while running pulumi
A new version of Pulumi is available. To upgrade from version '2.12.1' to '2.14.0'
b
Pulumi-aws package is the potential issue here - what version are you running?
I’m betting it’s Pulumi-aws <3.2
a
The current version of pulumi-aws :3.13.0
b
Then there is bug for sure
Unless you’ve updated the requirements.txt and not actually ran a pip install to get the new packages
a
I have installed all requirements as well. But still let me follow up and try installing again from scratch.