-
Notifications
You must be signed in to change notification settings - Fork 159
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
Security Group: Egress rule with incorrect to_port takes 3 pulumi ups to correct. #3257
Comments
Thanks for letting us know @MitchellGerdisch. This looks like a combination of an upstream issue (hashicorp/terraform-provider-aws#34640) and a diff bug (that provides a partial work-around?). |
I'm not sure it is the same issue. |
I've went through the steps and it seems go better but not entirely satisfactory now.
So this is almost entirely what we want except the sequence created 2 Security Group instead of one. That is, validation failure here created an actual AWS security group and then didn't clean it up after it realized there is a problem: import pulumi
from pulumi_aws import ec2
security_group = ec2.SecurityGroup(
f"egress-test",
egress=[
ec2.SecurityGroupEgressArgs(
from_port=0, to_port=0, protocol="-1", cidr_blocks=["0.0.0.0/0"],
)
],
) Leaving this in the tracker for now, suspect this aspect reproduces upstream. |
|
What happened?
from_port=0
andto_port=65535
.pulumi up
from_port
andto_port
are set to 0.pulumi up
pulumi up
again (without any changes to the code) and note that it still shows a diff for theto_port
from 65535 to 0. And the update completes successfully.pulumi up
again and note the diff shows it is adding a complete egress rule and that the update completes successfully.pulumi up
shows no changes.Example
Output of
pulumi about
CLI
Version 3.101.1
Go Version go1.21.5
Go Compiler gc
Plugins
NAME VERSION
aws 6.18.0
python unknown
Host
OS darwin
Version 13.5
Arch x86_64
This project is written in python: executable='/Users/mitch/Downloads/wmg-sg/venv/bin/python3' version='3.11.3'
Current Stack: MitchGerdisch/xxxx/dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::xxxx::pulumi:pulumi:Stack::wmg-sg-dev
pulumi:providers:aws urn:pulumi:dev::xxxx::pulumi:providers:aws::default_6_18_0
aws:ec2/securityGroup:SecurityGroup urn:pulumi:dev::xxxx::aws:ec2/securityGroup:SecurityGroup::egress-test
Found no pending operations associated with dev
Backend
Name pulumi.com
Dependencies:
NAME VERSION
pip 23.3.2
pulumi_aws 6.18.0
setuptools 69.0.3
wheel 0.42.0
Additional context
I tested this with Terraform using the latest version of the aws provider and version 5.31.0 which is what the the Pulumi AWS provider is based on.
Terraform does not exhibit this behavior.
You get an error about the to_port=65535 like with Pulumi.
But after changing it to the correct value of 0 and doing a terraform apply, it updates correctly with no errors.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: