generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [OIP-880]: updated custom healthsource for grafana loki (#677)
* feat: [OIP-880]: updated custom healthsource for graphana loki * feat: [OIP-880]: updated category tags. * feat: [OIP-880]: updated change log and dependency
- Loading branch information
Showing
12 changed files
with
721 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
```release-note:enhancement | ||
platform_connector_customhealthsource.md Added documentation for custom health connector | ||
resource.tf Example of loki health source with custom health source connector added | ||
provider.go : Added new data source harness_platform_connector_customhealthsource | ||
custom_health_data_source.go Schema and CRUD of custom health source connector | ||
custom_health_data_source_test.go Test for Schema and CRUD of custom health source connector | ||
customhealthsource.go Schema and CRUD of custom health source connector | ||
customhealthsource_test.go Test for Schema and CRUD of custom health source connector | ||
``` |
60 changes: 60 additions & 0 deletions
60
docs/data-sources/platform_connector_customhealthsource.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "harness_platform_connector_customhealthsource Data Source - terraform-provider-harness" | ||
subcategory: "Next Gen" | ||
description: |- | ||
Datasource for looking up a Custom Health source connector. | ||
--- | ||
|
||
# harness_platform_connector_customhealthsource (Data Source) | ||
|
||
Datasource for looking up a Custom Health source connector. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `identifier` (String) Unique identifier of the resource. | ||
|
||
### Optional | ||
|
||
- `name` (String) Name of the resource. | ||
- `org_id` (String) Unique identifier of the organization. | ||
- `project_id` (String) Unique identifier of the project. | ||
|
||
### Read-Only | ||
|
||
- `delegate_selectors` (Set of String) Tags to filter delegates for connection. | ||
- `description` (String) Description of the resource. | ||
- `headers` (Set of Object) Headers. (see [below for nested schema](#nestedatt--headers)) | ||
- `id` (String) The ID of this resource. | ||
- `method` (String) HTTP Verb Method for the API Call | ||
- `params` (Set of Object) Parameters. (see [below for nested schema](#nestedatt--params)) | ||
- `tags` (Set of String) Tags to associate with the resource. | ||
- `url` (String) URL of the Custom Health source server. | ||
- `validation_body` (String) Body to be sent with the API Call | ||
- `validation_path` (String) Path to be added to the base URL for the API Call | ||
|
||
<a id="nestedatt--headers"></a> | ||
### Nested Schema for `headers` | ||
|
||
Read-Only: | ||
|
||
- `encrypted_value_ref` (String) | ||
- `key` (String) | ||
- `value` (String) | ||
- `value_encrypted` (Boolean) | ||
|
||
|
||
<a id="nestedatt--params"></a> | ||
### Nested Schema for `params` | ||
|
||
Read-Only: | ||
|
||
- `encrypted_value_ref` (String) | ||
- `key` (String) | ||
- `value` (String) | ||
- `value_encrypted` (Boolean) |
102 changes: 102 additions & 0 deletions
102
docs/resources/platform_connector_customhealthsource.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "harness_platform_connector_customhealthsource Resource - terraform-provider-harness" | ||
subcategory: "Next Gen" | ||
description: |- | ||
Resource for creating a Custom Health source connector. | ||
--- | ||
|
||
# harness_platform_connector_customhealthsource (Resource) | ||
|
||
Resource for creating a Custom Health source connector. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Authentication mechanism as username and password | ||
resource "harness_platform_connector_customhealthsource" "test" { | ||
identifier = "identifier" | ||
name = "name" | ||
description = "test" | ||
tags = ["foo:bar"] | ||
url = "https://prometheus.com/" | ||
delegate_selectors = ["harness-delegate"] | ||
method = "GET" | ||
validation_path = "loki/api/v1/labels" | ||
headers { | ||
encrypted_value_ref = "account.doNotDeleteHSM" | ||
value_encrypted = true | ||
key = "key" | ||
value = "value" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `identifier` (String) Unique identifier of the resource. | ||
- `method` (String) HTTP Verb Method for the API Call | ||
- `name` (String) Name of the resource. | ||
- `url` (String) URL of the Custom Healthsource controller. | ||
|
||
### Optional | ||
|
||
- `delegate_selectors` (Set of String) Tags to filter delegates for connection. | ||
- `description` (String) Description of the resource. | ||
- `headers` (Block Set) Headers. (see [below for nested schema](#nestedblock--headers)) | ||
- `org_id` (String) Unique identifier of the organization. | ||
- `params` (Block Set) Parameters (see [below for nested schema](#nestedblock--params)) | ||
- `project_id` (String) Unique identifier of the project. | ||
- `tags` (Set of String) Tags to associate with the resource. | ||
- `validation_body` (String) Body to be sent with the API Call | ||
- `validation_path` (String) Path to be added to the base URL for the API Call | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--headers"></a> | ||
### Nested Schema for `headers` | ||
|
||
Required: | ||
|
||
- `key` (String) Key. | ||
|
||
Optional: | ||
|
||
- `encrypted_value_ref` (String) Reference to the Harness secret containing the encrypted value. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}. | ||
- `value` (String) Value. | ||
- `value_encrypted` (Boolean) Encrypted value. | ||
|
||
|
||
<a id="nestedblock--params"></a> | ||
### Nested Schema for `params` | ||
|
||
Required: | ||
|
||
- `key` (String) Key. | ||
|
||
Optional: | ||
|
||
- `encrypted_value_ref` (String) Reference to the Harness secret containing the encrypted value. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}. | ||
- `value` (String) Value. | ||
- `value_encrypted` (Boolean) Encrypted value. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Import account level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <connector_id> | ||
|
||
# Import org level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <ord_id>/<connector_id> | ||
|
||
# Import project level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <org_id>/<project_id>/<connector_id> | ||
``` |
8 changes: 8 additions & 0 deletions
8
examples/resources/harness_platform_connector_customhealthsource/import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Import account level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <connector_id> | ||
|
||
# Import org level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <ord_id>/<connector_id> | ||
|
||
# Import project level elasticsearch connector | ||
terraform import harness_platform_connector_customhealthsource.example <org_id>/<project_id>/<connector_id> |
18 changes: 18 additions & 0 deletions
18
examples/resources/harness_platform_connector_customhealthsource/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Authentication mechanism as username and password | ||
resource "harness_platform_connector_customhealthsource" "test" { | ||
identifier = "identifier" | ||
name = "name" | ||
description = "test" | ||
tags = ["foo:bar"] | ||
|
||
url = "https://prometheus.com/" | ||
delegate_selectors = ["harness-delegate"] | ||
method = "GET" | ||
validation_path = "loki/api/v1/labels" | ||
headers { | ||
encrypted_value_ref = "account.doNotDeleteHSM" | ||
value_encrypted = true | ||
key = "key" | ||
value = "value" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.