Skip to content

Commit

Permalink
internal/elasticsearch: ignore empty base_url address (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
dobarx authored Feb 22, 2024
1 parent 92568f1 commit b687af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/elasticsearch/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func makeClient(pcfg cty.Value) (*es.Client, error) {
if pcfg.IsNull() {
return nil, fmt.Errorf("configuration is required")
}
if baseURL := pcfg.GetAttr("base_url"); !baseURL.IsNull() {
if baseURL := pcfg.GetAttr("base_url"); !baseURL.IsNull() && baseURL.AsString() != "" {
cfg.Addresses = []string{baseURL.AsString()}
}
if cloudID := pcfg.GetAttr("cloud_id"); !cloudID.IsNull() {
Expand Down

0 comments on commit b687af3

Please sign in to comment.