elegant-architect-38580
01/05/2023, 2:07 PMawsx:x:ec2:SecurityGroup:x:ec2:IngressSecurityGroupRule:ec2/securityGroupRule:SecurityGroupRule (<resource name>):
error: Preview failed: provider does not support importing resources; please try updating the 'awsx' plugin
billowy-army-68599
01/05/2023, 5:59 PMaws.ec2.SecurityGroup
elegant-architect-38580
01/05/2023, 6:08 PMpulumi import aws:ec2/securityGroupRule:SecurityGroupRule <name_of resource_set_by_pulumi_program> <import_statement>
billowy-army-68599
01/05/2023, 6:16 PMelegant-architect-38580
01/05/2023, 6:19 PMconst natGatewayPublicIps = getConfigSection<string[]>('natGatewayPublicIps');
natGatewayPublicIps.forEach((publicIp: string, index: number) => {
this.securityGroup.createIngressRule(`${this._serviceName}-nat-gateway-ingress-${index}`, {
fromPort: 443,
toPort: 443,
protocol: 'tcp',
cidrBlocks: [`${publicIp}/32`],
});
});
}
I need to import some additional IP's to the list which was click-opsed on the security groupbillowy-army-68599
01/05/2023, 6:21 PMelegant-architect-38580
01/05/2023, 6:23 PMbillowy-army-68599
01/05/2023, 6:24 PM--parent
flag but with awsx before v1 and what you’re doing it’s a not easy to explain over slackelegant-architect-38580
01/05/2023, 6:24 PMerror: No such resource "urn:pulumi:production::<stackname>::awsx:x:ec2:SecurityGroup:x:ec2:IngressSecurityGroupRule::<pulumi name of resource>" exists in the current state
Is this also because of the parent dependies? Doesn't look like pulumi state delete supports defining parentsbillowy-army-68599
01/05/2023, 7:56 PM$
in therepulumi state delete '<urn>'
'
instead of `"`”elegant-architect-38580
01/05/2023, 8:40 PM"
but added '
which fixed it for me