polite-napkin-90098
10/18/2024, 8:41 PMpolite-napkin-90098
10/18/2024, 8:44 PMconst dbSg = new aws.ec2.SecurityGroup(stackName, {
description: `security group for ${stackName}`,
vpcId: vpcId,
// let the admin sg have access to the db
ingress: [{
description: 'mysql in from the admin security group',
fromPort: 3306,
toPort: 3306,
protocol: 'tcp',
securityGroups: [ dbAdminSg ],
}],
tags: {
Name: `${stackName}`,
},
},{ provider: provider, ignoreChanges: ['ingress']});
I then exported the id from the aws.rds.Instance with
export const sg = database.vpcSecurityGroupIds[0];
Which works fine and exports the sg-#### id from that stack.polite-napkin-90098
10/18/2024, 8:45 PMconst dbIngress = new aws.ec2.SecurityGroupRule(`${stackName}-db`, {
type: 'ingress',
fromPort: 3306,
toPort: 3306,
protocol: 'tcp',
sourceSecurityGroupId: apiSg.id,
securityGroupId: stacks.dbStack.requireOutput('sg'),
},{ provider: vpc.awsProvider });
polite-napkin-90098
10/18/2024, 8:48 PMpolite-napkin-90098
10/18/2024, 8:50 PMpolite-napkin-90098
10/18/2024, 8:51 PMpolite-napkin-90098
10/18/2024, 8:54 PMsgr-abcdefghi01234561
and the pulumi ones
sgrule-12345678
and thus it is difficult to cross-reference the rules and know that the rule really doesn't exist in AWS and thus really should be removed from the stack.
I'm also concerned that a refresh doesn't seem to find the missing sg-rule.little-cartoon-10569
10/20/2024, 8:00 PM