polite-napkin-90098
07/28/2023, 7:57 PMNOTE on Security Groups and Security Group Rules: This provider currently provides a Security Group resource with ingress and egress rules defined in-line and a Security Group Rule resource which manages one or more ingress or egress rules. Both of these resource were added before AWS assigned a security group rule unique ID, and they do not work well in all scenarios using thedescription and tags attributes, which rely on the unique ID. The aws_vpc_security_group_egress_rule and aws_vpc_security_group_ingress_rule resources have been added to address these limitations and should be used for all new security group rules. You should not use the aws_vpc_security_group_egress_rule and aws_vpc_security_group_ingress_rule resources in conjunction with an aws.ec2.SecurityGroup resource with in-line rules or with aws.ec2.SecurityGroupRule resources defined for the same Security Group, as rule conflicts may occur and rules will be overwritten.
Which made some sense as to why I was having issues. But I can't find any docs for the aws_vpc_security_group_ingress_rule resource. How do I go about making one of those? and of course a matching aws_vpc_security_group_egress_rule?salmon-account-74572
07/28/2023, 8:30 PM_, err = ec2.NewSecurityGroupRule(ctx, "src-peer-cidr", &ec2.SecurityGroupRuleArgs{
Type: pulumi.String("ingress"),
FromPort: <http://pulumi.Int|pulumi.Int>(0),
ToPort: <http://pulumi.Int|pulumi.Int>(65535),
Protocol: pulumi.String("all"),
CidrBlocks: pulumi.StringArray{pulumi.String(netAddrMap[dstVpcRegion])},
SecurityGroupId: srcNodeSecGrpId,
})
polite-napkin-90098
07/31/2023, 2:42 PMsalmon-account-74572
07/31/2023, 2:46 PMpolite-napkin-90098
07/31/2023, 6:53 PMsalmon-account-74572
08/01/2023, 3:48 PM