Hi, having trouble implementing this interface to ...
# typescript
a
Hi, having trouble implementing this interface to specify a security group id as the source.
Copy code
export interface SecurityGroupRuleLocation {
    cidrBlocks?: pulumi.Input<pulumi.Input<string>[]>;
    ipv6CidrBlocks?: pulumi.Input<pulumi.Input<string>[]>;
    sourceSecurityGroupId?: pulumi.Input<string>;
}
Copy code
awsx.ec2.SecurityGroupRule.ingress(
  'instance-sg',
  InstanceSg,
  InstanceSg.id, // Type 'Output ' has no properties in common with type 'SecurityGroupRuleLocation'.
  new awsx.ec2.TcpPorts(8080),
)
s
InstanceSg.id
is an
Output<string>
which does not satisfy that interface. You need to change it to
Copy code
{sourceSecurityGroupId: InstanceSg.id}