diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index c115b9ef8f..8cff3d2b8e 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -6030,7 +6030,12 @@ func createAwsVpcRoutetable(runtime *plugin.Runtime, args map[string]*llx.RawDat return res, err } - // to override __id implement: id() (string, error) + if res.__id == "" { + res.__id, err = res.id() + if err != nil { + return nil, err + } + } if runtime.HasRecording { args, err = runtime.ResourceFromRecording("aws.vpc.routetable", res.__id) diff --git a/providers/aws/resources/aws_vpc.go b/providers/aws/resources/aws_vpc.go index 29aeb31d83..f828a16375 100644 --- a/providers/aws/resources/aws_vpc.go +++ b/providers/aws/resources/aws_vpc.go @@ -140,6 +140,10 @@ func (a *mqlAwsVpc) flowLogs() ([]interface{}, error) { return flowLogs, nil } +func (a *mqlAwsVpcRoutetable) id() (string, error) { + return a.Id.Data, nil +} + func (a *mqlAwsVpc) routeTables() ([]interface{}, error) { conn := a.MqlRuntime.Connection.(*connection.AwsConnection) vpcVal := a.Id.Data