Closed lyricnz closed 1 month ago
Why does the InstrumentedEC2 resource get created with an EBS-volume-looking ARN? Rather than using this.resource()?
this.resource()
https://github.com/Innablr/revolver/blob/develop/drivers/ec2.ts#L230
return ec2Instances.map( (xi) => new InstrumentedEc2(xi, `arn:aws:ec2:${this.accountConfig.region}:${this.accountId}:volume/${xi.InstanceId}`), ); } resource(obj: InstrumentedResource): ToolingInterface { return new InstrumentedEc2(obj.resource, obj.resourceArn); } }
Also, what is point of ebsTag() method? Seems duplicate of tag()? And unused?
class InstrumentedEc2 extends ToolingInterface { ... tag(key: string) { const tag = this.resource.Tags.find((xt: Tag) => xt.Key === key); if (tag !== undefined) { return tag.Value; } } ebsTag(key: string) { const tag = this.resource.Tags.find((xt: Tag) => xt.Key === key); if (tag !== undefined) { return tag.Value; } }
Why does the InstrumentedEC2 resource get created with an EBS-volume-looking ARN? Rather than using
this.resource()
?https://github.com/Innablr/revolver/blob/develop/drivers/ec2.ts#L230
Also, what is point of ebsTag() method? Seems duplicate of tag()? And unused?