bumpy-garden-89740
08/21/2020, 7:57 AMDiagnostics:
pulumi:pulumi:Stack (ss-servers-staging):
error: update failed
aws:ec2:SecurityGroupRule (EcsSecurityGroupHTTPinbound):
error: [WARN] A duplicate Security Group rule was found on (sg-0d4217ba67f301afc). This may be
a side effect of a now-fixed Terraform issue causing two security groups with
identical attributes but different source_security_group_ids to overwrite each
other in the state. See <https://github.com/hashicorp/terraform/pull/2376> for more
information and instructions for recovery. Error message: the specified rule "peer: 0.0.0.0/0, TCP, from port: 80, to port: 80, ALLOW" already exists
I see issue https://github.com/pulumi/pulumi-awsx/issues/293 , but I still have no idea how to solve this or find workaround.export const createSecurityGroup = (name: string): awsx.ec2.SecurityGroup => new awsx.ec2
.SecurityGroup(`${ name }-${ env }-sg`, {
description: 'EcsSecurityGroup',
ingress: [
{
fromPort: 80,
toPort: 80,
protocol: 'tcp',
cidrBlocks: [ '0.0.0.0/0' ],
description: 'EcsSecurityGroupHTTPinbound'
},
{
fromPort: 22,
toPort: 22,
protocol: 'tcp',
cidrBlocks: [ '0.0.0.0/0' ],
description: 'EcsSecurityGroupSSHinbound'
},
{
fromPort: 443,
toPort: 443,
protocol: 'tcp',
cidrBlocks: [ '0.0.0.0/0' ],
description: 'ALBSecurityGroupInHttpsWorld'
},
{
fromPort: 31000,
toPort: 61000,
protocol: 'tcp',
cidrBlocks: [ '0.0.0.0/0' ],
description: 'EcsSecurityGroupALBports'
},
{ fromPort: 80, toPort: 80, protocol: 'tcp', self: true, description: 'EcsSecurityGroupInHttpAuthProxy' },
{ fromPort: 443, toPort: 443, protocol: 'tcp', self: true, description: 'EcsSecurityGroupInHttpsAuthProxy' },
]
});
bright-policeman-55860
08/25/2020, 5:51 PMopts=pulumi.ResourceOptions(delete_before_replace=True,