sparse-intern-71089
01/23/2019, 6:06 PMgentle-diamond-70147
01/23/2019, 6:32 PMsparse-tiger-67367
01/23/2019, 6:36 PMpublicSecurityGroup, err := ec2.NewSecurityGroup(ctx, "sg1", &ec2.SecurityGroupArgs{
Description: "For inter-security group traffic",
VpcId: vpc.ID(),
Ingress: []map[string]interface{}{
{
"protocol": "tcp",
"fromPort": 22,
"toPort": 22,
"cidrBlocks": []string{"0.0.0.0/0"},
},
},
})
privateSecurityGroup, err := ec2.NewSecurityGroup(ctx, "sg2", &ec2.SecurityGroupArgs{
Description: "For intra-security group traffic",
Ingress: []map[string]interface{}{
{
"protocol": "tcp",
"fromPort": 0,
"toPort": 65535,
"sourceSecurityGroupId": publicSecurityGroup.ID(),
},
},
})
gentle-diamond-70147
01/23/2019, 6:58 PMsecurityGroups
instead of sourceSecurityGroupId
gentle-diamond-70147
01/23/2019, 6:59 PMsourceSecurityGroupId
is used for SecurityGroupRule
resourcessparse-tiger-67367
01/24/2019, 6:02 PM