Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed HttpCodec Check #781

Merged
merged 10 commits into from
Apr 4, 2024
4 changes: 4 additions & 0 deletions .changelog/781.txt
jaireddjawed marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
Whenever an http provider was added for audit logs, httpMethod was being checked to see if it was "JSON" or "NDJSON",
when it should have been httpCodec.
```
2 changes: 1 addition & 1 deletion internal/providersdkv2/resource_vault_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ func getValidObservabilityConfig(config map[string]interface{}) (*vaultmodels.Ha
invalidProviderConfigError = diag.Errorf("http configuration is invalid: allowed values for http_method are only \"POST\", \"PUT\", or \"PATCH\"")
}

if strings.ToUpper(httpMethod) != "JSON" && strings.ToUpper(httpMethod) != "NDJSON" {
if strings.ToUpper(httpCodec) != "JSON" && strings.ToUpper(httpCodec) != "NDJSON" {
invalidProviderConfigError = diag.Errorf("http configuration is invalid: allowed values for http_codec are only \"JSON\" or \"NDJSON\"")
jaireddjawed marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down