Skip to content

Commit

Permalink
Merge pull request #150 from opengovern/fix-information-service
Browse files Browse the repository at this point in the history
Fix information service
  • Loading branch information
artaasadi authored Nov 17, 2024
2 parents cc0e584 + 5ceba5b commit 74bcb3d
Showing 1 changed file with 9 additions and 28 deletions.
37 changes: 9 additions & 28 deletions pkg/steampipe/steampipe_config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package steampipe

import (
"errors"
"os"
"os/exec"
"path"
Expand All @@ -11,36 +10,18 @@ import (
"go.uber.org/zap"

"github.com/opengovern/og-util/pkg/config"
"github.com/opengovern/og-util/pkg/source"
)

func PopulateSteampipeConfig(elasticSearchConfig config.ElasticSearch, connector source.Type) error {
switch connector {
case source.CloudAWS:
err := BuildSpecFile("aws", elasticSearchConfig)
if err != nil {
return err
}
err = PopulateEnv(elasticSearchConfig)
if err != nil {
return err
}
case source.CloudAzure:
err := BuildSpecFile("azure", elasticSearchConfig)
if err != nil {
return err
}
err = BuildSpecFile("azuread", elasticSearchConfig)
if err != nil {
return err
}
err = PopulateEnv(elasticSearchConfig)
if err != nil {
return err
}
default:
return errors.New("error: invalid source type")
func PopulateSteampipeConfig(elasticSearchConfig config.ElasticSearch, steampipePluginName string) error {
err := BuildSpecFile(steampipePluginName, elasticSearchConfig)
if err != nil {
return err
}
err = PopulateEnv(elasticSearchConfig)
if err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 74bcb3d

Please sign in to comment.