From 4417a8e3316544e7e9e85284b1d3dab0858784cf Mon Sep 17 00:00:00 2001 From: Marius Kimmina <38843153+mariuskimmina@users.noreply.github.com> Date: Sun, 8 Oct 2023 11:23:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20aws=20es=20domains=20resou?= =?UTF-8?q?rce=20(#2121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marius Kimmina --- providers/aws/resources/aws_es.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/providers/aws/resources/aws_es.go b/providers/aws/resources/aws_es.go index 5fbcab7647..f359dea425 100644 --- a/providers/aws/resources/aws_es.go +++ b/providers/aws/resources/aws_es.go @@ -67,7 +67,7 @@ func (a *mqlAwsEs) getDomains(conn *connection.AwsConnection) []*jobpool.Job { for _, domain := range domains.DomainNames { // note: the api returns name and region here, so we just use that. // the arn is not returned until we get to the describe call - mqlDomain, err := CreateResource(a.MqlRuntime, "aws.es.domain", + mqlDomain, err := NewResource(a.MqlRuntime, "aws.es.domain", map[string]*llx.RawData{ "name": llx.StringData(convert.ToString(domain.DomainName)), "region": llx.StringData(regionVal), @@ -89,18 +89,6 @@ func initAwsEsDomain(runtime *plugin.Runtime, args map[string]*llx.RawData) (map return args, nil, nil } - // if len(args) == 0 { - // if ids := aruntime); ids != nil { - // args["name"] = ids.name - // args["arn"] = ids.arn - // if arn.IsARN(ids.arn) { - // if p, err := arn.Parse(ids.arn); err == nil { - // args["region"] = p.Region - // } - // } - // } - // } - if args["name"] == nil || args["region"] == nil { return nil, nil, errors.New("name and region required to fetch es domain") }