Skip to content

Commit

Permalink
🐛 fix aws es domains resource (#2121)
Browse files Browse the repository at this point in the history
Signed-off-by: Marius Kimmina <[email protected]>
  • Loading branch information
mariuskimmina authored Oct 8, 2023
1 parent a37c90b commit 4417a8e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions providers/aws/resources/aws_es.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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")
}
Expand Down

0 comments on commit 4417a8e

Please sign in to comment.