Skip to content

Commit 5a5280e

Browse files
committed
Remove redundant id field from EC2 AMI block device mapping
1 parent 04f612b commit 5a5280e

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
lines changed

providers/aws/resources/aws.lr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3454,8 +3454,6 @@ private aws.ec2.image @defaults("ownerAlias id name") {
34543454

34553455
// Amazon EC2 image block device mapping
34563456
private aws.ec2.image.blockDeviceMapping @defaults("deviceName") {
3457-
// Internal ID for this block device mapping
3458-
id string
34593457
// Device name (e.g., /dev/sda1, /dev/xvda)
34603458
deviceName string
34613459
// Virtual device name for instance store (ephemeral0, ephemeral1, etc.)

providers/aws/resources/aws.lr.go

Lines changed: 2 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/aws/resources/aws_ec2.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ func createBlockDeviceMappings(runtime *plugin.Runtime, imageArn string, mapping
687687
mappingID := fmt.Sprintf("%s/device/%s", imageArn, deviceName)
688688

689689
args := map[string]*llx.RawData{
690-
"id": llx.StringData(mappingID),
690+
"__id": llx.StringData(mappingID),
691691
"deviceName": llx.StringDataPtr(mapping.DeviceName),
692692
"virtualName": llx.StringDataPtr(mapping.VirtualName),
693693
"noDevice": llx.BoolData(mapping.NoDevice != nil && *mapping.NoDevice != ""),
@@ -1224,14 +1224,6 @@ func (i *mqlAwsEc2Image) id() (string, error) {
12241224
return i.Arn.Data, nil
12251225
}
12261226

1227-
func (b *mqlAwsEc2ImageBlockDeviceMapping) id() (string, error) {
1228-
return b.Id.Data, nil
1229-
}
1230-
1231-
func (e *mqlAwsEc2ImageEbsBlockDevice) id() (string, error) {
1232-
return e.__id, nil
1233-
}
1234-
12351227
func initAwsEc2Image(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) {
12361228
if len(args) > 2 {
12371229
return args, nil, nil

0 commit comments

Comments
 (0)