Skip to content

Commit

Permalink
Add check on <no value> config option value for the azure input `re…
Browse files Browse the repository at this point in the history
…source_manager_endpoint` (elastic#18890)

* change

* update changelog
  • Loading branch information
narph authored Jun 4, 2020
1 parent 7e9ae30 commit 8dda6e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
* iptables {pull}18756[18756]
* Checkpoint {pull}18754[18754]
- Preserve case of http.request.method. ECS prior to 1.6 specified normalizing to lowercase, which lost information. Affects filesets: apache/access, elasticsearch/audit, iis/access, iis/error, nginx/access, nginx/ingress_controller, aws/elb, suricata/eve, zeek/http. {issue}18154[18154] {pull}18359[18359]
- Adds check on `<no value>` config option value for the azure input `resource_manager_endpoint`. {pull}18890[18890]
- Okta module now requires objects instead of JSON strings for the `http_headers`, `http_request_body`, `pagination`, `rate_limit`, and `ssl` variables. {pull}18953[18953]

*Heartbeat*
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/azureeventhub/eph.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (a *azureInput) runWithEPH() error {

func getAzureEnvironment(overrideResManager string) (azure.Environment, error) {
// if no overrride is set then the azure public cloud is used
if overrideResManager == "" {
if overrideResManager == "" || overrideResManager == "<no value>" {
return azure.PublicCloud, nil
}
if env, ok := environments[overrideResManager]; ok {
Expand Down
4 changes: 4 additions & 0 deletions x-pack/filebeat/input/azureeventhub/eph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ func TestGetAzureEnvironment(t *testing.T) {
resMan = "http://management.invalidhybrid.com/"
env, err = getAzureEnvironment(resMan)
assert.Errorf(t, err, "invalid character 'F' looking for beginning of value")
resMan = "<no value>"
env, err = getAzureEnvironment(resMan)
assert.NoError(t, err)
assert.Equal(t, env, azure.PublicCloud)
}

0 comments on commit 8dda6e1

Please sign in to comment.