Skip to content

Commit 42b5847

Browse files
biscout42dimuon
andauthored
feat: update synthetics implementation according to Kibana 8.16 API changes (elastic#967)
* chore: add support 8.16.2 to go-kibana-rest and acc tests adds plan modifiers for the values, which Kibana sets by default, including alert field of a monitor add ssl fields to tcp / http monitors - implements elastic#916 Co-authored-by: Dmitry Onishchenko <[email protected]> --------- Co-authored-by: Dmitry Onishchenko <[email protected]>
1 parent 59a9ad5 commit 42b5847

File tree

9 files changed

+736
-233
lines changed

9 files changed

+736
-233
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## [Unreleased]
22

33
- Support 8.15.5 in acc tests ([#963](https://github.com/elastic/terraform-provider-elasticstack/pull/963)).
4+
- Support 8.16.2 in acc tests ([#964](https://github.com/elastic/terraform-provider-elasticstack/pull/964)).
5+
- Support several ssl fields in `elasticstack_kibana_synthetics_monitor` ([#967](https://github.com/elastic/terraform-provider-elasticstack/pull/967))
46

57
## [0.11.12] - 2024-12-16
68

CONTRIBUTING.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Typical development workflow
2+
3+
Fork the repo, work on an issue
4+
15
## Acceptance tests
26

37
```bash
@@ -6,5 +10,41 @@ make docker-testacc
610

711
Run a single test with terraform debug enabled:
812
```bash
9-
make docker-testacc TF_LOG=DEBUG TESTARGS='-run ^TestAccResourceDataStreamLifecycle$$'
10-
```
13+
env TF_LOG=DEBUG make docker-testacc TESTARGS='-run ^TestAccResourceDataStreamLifecycle$$'
14+
```
15+
16+
A way to forward debug logs to a file:
17+
```bash
18+
env TF_ACC_LOG_PATH=/tmp/tf.log TF_ACC_LOG=DEBUG TF_LOG=DEBUG make docker-testacc
19+
```
20+
21+
22+
## Update documentation
23+
24+
Update documentation templates in `./templates` directory and re-generate docs via:
25+
```bash
26+
make docs-generate
27+
```
28+
29+
## Update `./CHANGELOG.md`
30+
31+
List of previous commits is a good example of what should be included in the changelog.
32+
33+
34+
## Pull request
35+
36+
Format the code before pushing:
37+
```bash
38+
make fmt
39+
```
40+
41+
Check if the linting:
42+
```bash
43+
make lint
44+
```
45+
46+
Create a PR and check acceptance test matrix is green.
47+
48+
## Run provider with local terraform
49+
50+
TBD

docs/resources/kibana_synthetics_monitor.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ Optional:
144144
- `proxy_header` (String) Additional headers to send to proxies during CONNECT requests.. Raw JSON object, use `jsonencode` function to represent JSON
145145
- `proxy_url` (String) The URL of the proxy to use for this monitor.
146146
- `response` (String) Controls the indexing of the HTTP response body contents to the `http.response.body.contents` field.. Raw JSON object, use `jsonencode` function to represent JSON
147+
- `ssl_certificate` (String) Certificate.
148+
- `ssl_certificate_authorities` (List of String) The list of root certificates for verifications is required.
149+
- `ssl_key` (String, Sensitive) Certificate key.
150+
- `ssl_key_passphrase` (String, Sensitive) Key passphrase.
147151
- `ssl_supported_protocols` (List of String) List of allowed SSL/TLS versions.
148152
- `ssl_verification_mode` (String) Controls the verification of server certificates.
149153
- `username` (String) The username for authenticating with the server. The credentials are passed with the request.
@@ -174,6 +178,10 @@ Optional:
174178
- `check_send` (String) An optional payload string to send to the remote host.
175179
- `proxy_url` (String) The URL of the SOCKS5 proxy to use when connecting to the server. The value must be a URL with a scheme of `socks5://`. If the SOCKS5 proxy server requires client authentication, then a username and password can be embedded in the URL. When using a proxy, hostnames are resolved on the proxy server instead of on the client. You can change this behavior by setting the `proxy_use_local_resolver` option.
176180
- `proxy_use_local_resolver` (Boolean) A Boolean value that determines whether hostnames are resolved locally instead of being resolved on the proxy server. The default value is false, which means that name resolution occurs on the proxy server.
181+
- `ssl_certificate` (String) Certificate.
182+
- `ssl_certificate_authorities` (List of String) The list of root certificates for verifications is required.
183+
- `ssl_key` (String, Sensitive) Certificate key.
184+
- `ssl_key_passphrase` (String, Sensitive) Key passphrase.
177185
- `ssl_supported_protocols` (List of String) List of allowed SSL/TLS versions.
178186
- `ssl_verification_mode` (String) Controls the verification of server certificates.
179187

@@ -183,9 +191,4 @@ Import is supported using the following syntax:
183191

184192
```shell
185193
terraform import elasticstack_kibana_synthetics_monitor.my_monitor <space id>/<monitor_id>
186-
```
187-
188-
**NOTE:** Not all monitor fields are supported during the import due-to API limitation.
189-
Full field support could be implemented after this [kibana issue](https://github.com/elastic/kibana/issues/189906) is resolved.
190-
191-
Currently not supported fields during the import: `params`, `retest_on_failure`, `locations`, `http.proxy_header`, `http.username`, `http.password`, `http.check`, `http.response`, `tcp.check_send`, `tcp.check_receive` and monitor type `browser`
194+
```

0 commit comments

Comments
 (0)