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

Add support for http observability on vault_cluster resource #671

Merged
merged 36 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
37baf59
Added fields and validation for
jaireddjawed Oct 30, 2023
43619f5
Added tests for http observability
jaireddjawed Oct 30, 2023
01b6283
Noted http observability provider
jaireddjawed Oct 30, 2023
d62f5b4
Ran go generate
jaireddjawed Oct 30, 2023
41460bd
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Oct 30, 2023
b0a09af
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 1, 2023
9de6e27
renamed missingParamsError
jaireddjawed Nov 2, 2023
026ac0c
updated http_bearer_token, http_basic_user, and http_basic_password t…
jaireddjawed Nov 2, 2023
bad8ace
Specified allowed values for http_codec
jaireddjawed Nov 2, 2023
fd25524
validate that http_codec
jaireddjawed Nov 2, 2023
bd1b490
validated httpMethod so ensure
jaireddjawed Nov 2, 2023
439a809
added strings.toUpper for httpMethod and httpCodec
jaireddjawed Nov 2, 2023
b97bbc3
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 2, 2023
3fd4d79
Merge branch 'jaireddjawed-hcpv-http' of github.com:hashicorp/terrafo…
jaireddjawed Nov 2, 2023
f5c4771
updated http_basic_user
jaireddjawed Nov 2, 2023
230d250
separated http validation into separate function
jaireddjawed Nov 2, 2023
b73f1b3
added comment to validateHTTPAuth
jaireddjawed Nov 2, 2023
4fd2cf7
changed validateHttpAuth to validateHTTPAuth
jaireddjawed Nov 2, 2023
9103005
return httpConfigError last in validateHttpAuth
jaireddjawed Nov 6, 2023
071d2ee
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 7, 2023
4927342
renamed missingParamError to invalidProviderConfigError
jaireddjawed Nov 7, 2023
143659a
Ran 'go generate'
jaireddjawed Nov 7, 2023
4538814
removed httpConfigError from
jaireddjawed Nov 7, 2023
6fadcac
Made sure that httpBasicAuth is
jaireddjawed Nov 7, 2023
1d42aec
fixed remaining minor changes
jaireddjawed Nov 7, 2023
c2a86b3
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 10, 2023
6f57829
made order of http and newrelic
jaireddjawed Nov 14, 2023
4ba3f1a
added changelog file
jaireddjawed Nov 14, 2023
3068162
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 16, 2023
91653ec
Added HTTP back into emptyConfig
jaireddjawed Nov 16, 2023
71cc220
Merge branch 'jaireddjawed-hcpv-http' of github.com:hashicorp/terrafo…
jaireddjawed Nov 16, 2023
0702e17
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 16, 2023
3e90a4e
Removed 660 from changelog
jaireddjawed Nov 17, 2023
85d4152
Merge branch 'jaireddjawed-hcpv-http' of github.com:hashicorp/terrafo…
jaireddjawed Nov 17, 2023
b6e9575
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Nov 28, 2023
5a9d822
Merge branch 'main' into jaireddjawed-hcpv-http
jaireddjawed Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/660.txt
jaireddjawed marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Add custom http endpoints as an observability provider for streaming audit logs and metrics from HCP Vault clusters.
```
3 changes: 3 additions & 0 deletions .changelog/671.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Add custom http endpoints as an observability provider for streaming audit logs and metrics from HCP Vault clusters.
```
20 changes: 20 additions & 0 deletions docs/data-sources/vault_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ Read-Only:
- `elasticsearch_user` (String) ElasticSearch user for streaming audit logs
- `grafana_endpoint` (String) Grafana endpoint for streaming audit logs
- `grafana_user` (String) Grafana user for streaming audit logs
- `http_basic_password` (String) HTTP basic authentication password for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user is also provided
- `http_basic_user` (String) HTTP basic authentication username for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_password is also provided
- `http_bearer_token` (String) HTTP bearer authentication token for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided
- `http_codec` (String) HTTP codec for streaming audit logs, allowed values are JSON and NDJSON
- `http_compression` (Boolean) HTTP compression flag for streaming audit logs
- `http_headers` (Map of String) HTTP headers for streaming audit logs
- `http_method` (String) HTTP payload method for streaming audit logs, allowed values are PATCH, POST, or PUT
- `http_payload_prefix` (String) HTTP payload prefix for streaming audit logs
- `http_payload_suffix` (String) HTTP payload suffix for streaming audit logs
- `http_uri` (String) HTTP URI for streaming audit logs
- `newrelic_account_id` (String) NewRelic Account ID for streaming audit logs
- `newrelic_license_key` (String) NewRelic license key for streaming audit logs
- `newrelic_region` (String) NewRelic region for streaming audit logs, allowed values are "US" and "EU"
Expand Down Expand Up @@ -113,6 +123,16 @@ Read-Only:
- `elasticsearch_user` (String) ElasticSearch user for streaming metrics
- `grafana_endpoint` (String) Grafana endpoint for streaming metrics
- `grafana_user` (String) Grafana user for streaming metrics
- `http_basic_password` (String) HTTP basic authentication password for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user is also provided
- `http_basic_user` (String) HTTP basic authentication username for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_password is also provided
- `http_bearer_token` (String) HTTP bearer authentication token for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided
- `http_codec` (String) HTTP codec for streaming metrics, allowed values are JSON and NDJSON
- `http_compression` (Boolean) HTTP compression flag for streaming metrics
- `http_headers` (Map of String) HTTP headers for streaming metrics
- `http_method` (String) HTTP payload method for streaming metrics, allowed values are PATCH, POST, or PUT
- `http_payload_prefix` (String) HTTP payload prefix for streaming metrics
- `http_payload_suffix` (String) HTTP payload suffix for streaming metrics
- `http_uri` (String) HTTP URI for streaming metrics
- `newrelic_account_id` (String) NewRelic Account ID for streaming metrics
- `newrelic_license_key` (String) NewRelic license key for streaming metrics
- `newrelic_region` (String) NewRelic region for streaming metrics, allowed values are "US" and "EU"
Expand Down
20 changes: 20 additions & 0 deletions docs/resources/vault_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ Optional:
- `grafana_endpoint` (String) Grafana endpoint for streaming audit logs
- `grafana_password` (String, Sensitive) Grafana password for streaming audit logs
- `grafana_user` (String) Grafana user for streaming audit logs
- `http_basic_password` (String, Sensitive) HTTP basic authentication password for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user is also provided
- `http_basic_user` (String) HTTP basic authentication username for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_password is also provided
- `http_bearer_token` (String, Sensitive) HTTP bearer authentication token for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided
- `http_codec` (String) HTTP codec for streaming audit logs, allowed values are JSON and NDJSON
- `http_compression` (Boolean) HTTP compression flag for streaming audit logs
- `http_headers` (Map of String) HTTP headers for streaming audit logs
- `http_method` (String) HTTP payload method for streaming audit logs, , allowed values are PATCH, POST, or PUT
- `http_payload_prefix` (String) HTTP payload prefix for streaming audit logs
- `http_payload_suffix` (String) HTTP payload suffix for streaming audit logs
- `http_uri` (String) HTTP URI for streaming audit logs
- `newrelic_account_id` (String) NewRelic Account ID for streaming audit logs
- `newrelic_license_key` (String, Sensitive) NewRelic license key for streaming audit logs
- `newrelic_region` (String) NewRelic region for streaming audit logs, allowed values are "US" and "EU"
Expand Down Expand Up @@ -136,6 +146,16 @@ Optional:
- `grafana_endpoint` (String) Grafana endpoint for streaming metrics
- `grafana_password` (String, Sensitive) Grafana password for streaming metrics
- `grafana_user` (String) Grafana user for streaming metrics
- `http_basic_password` (String) HTTP basic authentication password for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user is also specified
- `http_basic_user` (String) HTTP basic authentication username for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_password is also specified
- `http_bearer_token` (String, Sensitive) HTTP bearer authentication token for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided
- `http_codec` (String) HTTP codec for streaming metrics, allowed values are JSON and NDJSON
- `http_compression` (Boolean) HTTP compression flag for streaming metrics
- `http_headers` (Map of String) HTTP headers for streaming metrics
- `http_method` (String) HTTP payload method for streaming metrics, allowed values are PATCH, POST, or PUT
- `http_payload_prefix` (String) HTTP payload prefix for streaming metrics
- `http_payload_suffix` (String) HTTP payload suffix for streaming metrics
- `http_uri` (String) HTTP URI for streaming metrics
- `newrelic_account_id` (String) NewRelic Account ID for streaming metrics
- `newrelic_license_key` (String, Sensitive) NewRelic license key for streaming metrics
- `newrelic_region` (String) NewRelic region for streaming metrics, allowed values are "US" and "EU"
Expand Down
100 changes: 100 additions & 0 deletions internal/providersdkv2/data_source_vault_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,56 @@ If a project is not configured in the HCP Provider config block, the oldest proj
Type: schema.TypeString,
Computed: true,
},
"http_basic_user": {
Description: "HTTP basic authentication username for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_password is also provided",
Type: schema.TypeString,
Computed: true,
},
"http_basic_password": {
Description: "HTTP basic authentication password for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user is also provided",
Type: schema.TypeString,
Computed: true,
},
"http_bearer_token": {
Description: "HTTP bearer authentication token for streaming metrics, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided",
Type: schema.TypeString,
Computed: true,
},
"http_headers": {
Description: "HTTP headers for streaming metrics",
Type: schema.TypeMap,
Computed: true,
},
"http_codec": {
Description: "HTTP codec for streaming metrics, allowed values are JSON and NDJSON",
Type: schema.TypeString,
Computed: true,
},
"http_compression": {
Description: "HTTP compression flag for streaming metrics",
Type: schema.TypeBool,
Computed: true,
},
"http_method": {
Description: "HTTP payload method for streaming metrics, allowed values are PATCH, POST, or PUT",
Type: schema.TypeString,
Computed: true,
},
"http_payload_prefix": {
Description: "HTTP payload prefix for streaming metrics",
Type: schema.TypeString,
Computed: true,
},
"http_payload_suffix": {
Description: "HTTP payload suffix for streaming metrics",
Type: schema.TypeString,
Computed: true,
},
"http_uri": {
Description: "HTTP URI for streaming metrics",
Type: schema.TypeString,
Computed: true,
},
"newrelic_account_id": {
Description: "NewRelic Account ID for streaming metrics",
Type: schema.TypeString,
Expand Down Expand Up @@ -291,6 +341,56 @@ If a project is not configured in the HCP Provider config block, the oldest proj
Type: schema.TypeString,
Computed: true,
},
"http_basic_user": {
Description: "HTTP basic authentication username for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_password is also provided",
Type: schema.TypeString,
Computed: true,
},
"http_basic_password": {
Description: "HTTP basic authentication password for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user is also provided",
Type: schema.TypeString,
Computed: true,
},
"http_bearer_token": {
Description: "HTTP bearer authentication token for streaming audit logs, one of the two available authentication methods, can be specified only if http_basic_user and http_basic_password are not provided",
Type: schema.TypeString,
Computed: true,
},
"http_headers": {
Description: "HTTP headers for streaming audit logs",
Type: schema.TypeMap,
Computed: true,
},
"http_codec": {
Description: "HTTP codec for streaming audit logs, allowed values are JSON and NDJSON",
Type: schema.TypeString,
Computed: true,
},
"http_compression": {
Description: "HTTP compression flag for streaming audit logs",
Type: schema.TypeBool,
Computed: true,
},
"http_method": {
Description: "HTTP payload method for streaming audit logs, allowed values are PATCH, POST, or PUT",
Type: schema.TypeString,
Computed: true,
},
"http_payload_prefix": {
Description: "HTTP payload prefix for streaming audit logs",
Type: schema.TypeString,
Computed: true,
},
"http_payload_suffix": {
Description: "HTTP payload suffix for streaming audit logs",
Type: schema.TypeString,
Computed: true,
},
"http_uri": {
Description: "HTTP URI for streaming audit logs",
Type: schema.TypeString,
Computed: true,
},
"newrelic_account_id": {
Description: "NewRelic Account ID for streaming audit logs",
Type: schema.TypeString,
Expand Down
Loading