Skip to content

Commit

Permalink
docs: update service integrations docs
Browse files Browse the repository at this point in the history
  • Loading branch information
staceysalamon-aiven authored and Serpentiel committed Apr 10, 2024
1 parent 167fd5a commit fd32881
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 82 deletions.
33 changes: 16 additions & 17 deletions docs/data-sources/service_integration.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_service_integration Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Service Integration data source provides information about the existing Aiven Service Integration.
Gets information about an Aiven service integration.
---

# aiven_service_integration (Data Source)
The Service Integration data source provides information about the existing Aiven Service Integration.

Service Integration defines an integration between two Aiven services or between Aiven service and an external
integration endpoint. Integration could be for example sending metrics from Kafka service to an M3DB service,
getting metrics from an M3Db service to a Grafana service to show dashboards, sending logs from any service to
OpenSearch, etc.
Gets information about an Aiven service integration.

## Example Usage

```terraform
data "aiven_service_integration" "myintegration" {
project = aiven_project.myproject.project
destination_service_name = "<DESTINATION_SERVICE_NAME>"
integration_type = "datadog"
source_service_name = "<SOURCE_SERVICE_NAME>"
data "aiven_service_integration" "example_integration" {
project = data.aiven_project.example_project.project
destination_service_name = aiven_m3db.example_m3db.service_name
integration_type = "metrics"
source_service_name = aiven_kafka.example_kafka.service_name
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `destination_service_name` (String) Destination service for the integration (if any)
- `destination_service_name` (String) Destination service for the integration.
- `integration_type` (String) Type of the service integration. Possible values: `alertmanager`, `autoscaler`, `caching`, `cassandra_cross_service_cluster`, `clickhouse_credentials`, `clickhouse_kafka`, `clickhouse_postgresql`, `dashboard`, `datadog`, `datasource`, `external_aws_cloudwatch_logs`, `external_aws_cloudwatch_metrics`, `external_elasticsearch_logs`, `external_google_cloud_logging`, `external_opensearch_logs`, `flink`, `flink_external_bigquery`, `flink_external_kafka`, `internal_connectivity`, `jolokia`, `kafka_connect`, `kafka_connect_postgresql`, `kafka_logs`, `kafka_mirrormaker`, `logs`, `m3aggregator`, `m3coordinator`, `metrics`, `opensearch_cross_cluster_replication`, `opensearch_cross_cluster_search`, `prometheus`, `read_replica`, `rsyslog`, `schema_registry_proxy`, `stresstester`, `thanoscompactor`, `thanosquery`, `thanosstore`, `vector`, `vmalert`
- `project` (String) Project the integration belongs to
- `project` (String) Project the integration belongs to.
- `source_service_name` (String) Source service for the integration (if any)

### Read-Only

- `clickhouse_kafka_user_config` (List of Object) ClickhouseKafka user configurable settings (see [below for nested schema](#nestedatt--clickhouse_kafka_user_config))
- `clickhouse_postgresql_user_config` (List of Object) ClickhousePostgresql user configurable settings (see [below for nested schema](#nestedatt--clickhouse_postgresql_user_config))
- `datadog_user_config` (List of Object) Datadog user configurable settings (see [below for nested schema](#nestedatt--datadog_user_config))
- `destination_endpoint_id` (String) Destination endpoint for the integration (if any)
- `destination_endpoint_id` (String) Destination endpoint for the integration.
- `external_aws_cloudwatch_logs_user_config` (List of Object) ExternalAwsCloudwatchLogs user configurable settings (see [below for nested schema](#nestedatt--external_aws_cloudwatch_logs_user_config))
- `external_aws_cloudwatch_metrics_user_config` (List of Object) ExternalAwsCloudwatchMetrics user configurable settings (see [below for nested schema](#nestedatt--external_aws_cloudwatch_metrics_user_config))
- `external_elasticsearch_logs_user_config` (List of Object) ExternalElasticsearchLogs user configurable settings (see [below for nested schema](#nestedatt--external_elasticsearch_logs_user_config))
- `external_opensearch_logs_user_config` (List of Object) ExternalOpensearchLogs user configurable settings (see [below for nested schema](#nestedatt--external_opensearch_logs_user_config))
- `id` (String) The ID of this resource.
- `integration_id` (String) Service Integration Id at aiven
- `integration_id` (String) The ID of the Aiven service integration.
- `kafka_connect_user_config` (List of Object) KafkaConnect user configurable settings (see [below for nested schema](#nestedatt--kafka_connect_user_config))
- `kafka_logs_user_config` (List of Object) KafkaLogs user configurable settings (see [below for nested schema](#nestedatt--kafka_logs_user_config))
- `kafka_mirrormaker_user_config` (List of Object) KafkaMirrormaker user configurable settings (see [below for nested schema](#nestedatt--kafka_mirrormaker_user_config))
- `logs_user_config` (List of Object) Logs user configurable settings (see [below for nested schema](#nestedatt--logs_user_config))
- `metrics_user_config` (List of Object) Metrics user configurable settings (see [below for nested schema](#nestedatt--metrics_user_config))
- `prometheus_user_config` (List of Object) Prometheus user configurable settings (see [below for nested schema](#nestedatt--prometheus_user_config))
- `source_endpoint_id` (String) Source endpoint for the integration (if any)
- `source_endpoint_id` (String) Source endpoint for the integration.

<a id="nestedatt--clickhouse_kafka_user_config"></a>
### Nested Schema for `clickhouse_kafka_user_config`
Expand Down Expand Up @@ -343,4 +343,3 @@ Read-Only:
- `perf_events_statements_digest_text_limit` (Number)
- `perf_events_statements_limit` (Number)
- `perf_events_statements_time_limit` (Number)

34 changes: 17 additions & 17 deletions docs/resources/service_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
page_title: "aiven_service_integration Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The Service Integration resource allows the creation and management of Aiven Service Integrations.
Creates and manages an Aiven service integration https://aiven.io/docs/platform/concepts/service-integration.
---
# aiven_service_integration (Resource)
The Service Integration resource allows the creation and management of Aiven Service Integrations.
Creates and manages an Aiven [service integration](https://aiven.io/docs/platform/concepts/service-integration).

**Note** For services running on `hobbyist` plan service integrations are not supported.
You can set up an integration between two Aiven services or an Aiven service and an external
service. For example, you can send metrics from a Kafka service to an M3DB service,
send metrics from an M3DB service to a Grafana service to show dashboards, and send logs from
any service to OpenSearch.

Service Integration defines an integration between two Aiven services or between Aiven service and an external
integration endpoint. Integration could be for example sending metrics from Kafka service to an M3DB service,
getting metrics from an M3DB service to a Grafana service to show dashboards, sending logs from any service to
OpenSearch, etc.
**Services integrations are not supported for services running on hobbyist plans.**

## Example Usage
```terraform
resource "aiven_service_integration" "my_integration_metrics" {
project = aiven_project.myproject.project
resource "aiven_service_integration" "example_integration" {
project = data.aiven_project.example_project.project
integration_type = "metrics"
source_service_name = aiven_kafka.kfk1.service_name
destination_service_name = aiven_m3db.m3db.service_name
source_service_name = aiven_kafka.example_kafka.service_name
destination_service_name = aiven_m3db.example_m3db.service_name
}
```
<!-- schema generated by tfplugindocs -->
Expand All @@ -29,15 +29,15 @@ resource "aiven_service_integration" "my_integration_metrics" {
### Required

- `integration_type` (String) Type of the service integration. Possible values: `alertmanager`, `autoscaler`, `caching`, `cassandra_cross_service_cluster`, `clickhouse_credentials`, `clickhouse_kafka`, `clickhouse_postgresql`, `dashboard`, `datadog`, `datasource`, `external_aws_cloudwatch_logs`, `external_aws_cloudwatch_metrics`, `external_elasticsearch_logs`, `external_google_cloud_logging`, `external_opensearch_logs`, `flink`, `flink_external_bigquery`, `flink_external_kafka`, `internal_connectivity`, `jolokia`, `kafka_connect`, `kafka_connect_postgresql`, `kafka_logs`, `kafka_mirrormaker`, `logs`, `m3aggregator`, `m3coordinator`, `metrics`, `opensearch_cross_cluster_replication`, `opensearch_cross_cluster_search`, `prometheus`, `read_replica`, `rsyslog`, `schema_registry_proxy`, `stresstester`, `thanoscompactor`, `thanosquery`, `thanosstore`, `vector`, `vmalert`
- `project` (String) Project the integration belongs to
- `project` (String) Project the integration belongs to.

### Optional

- `clickhouse_kafka_user_config` (Block List, Max: 1) ClickhouseKafka user configurable settings (see [below for nested schema](#nestedblock--clickhouse_kafka_user_config))
- `clickhouse_postgresql_user_config` (Block List, Max: 1) ClickhousePostgresql user configurable settings (see [below for nested schema](#nestedblock--clickhouse_postgresql_user_config))
- `datadog_user_config` (Block List, Max: 1) Datadog user configurable settings (see [below for nested schema](#nestedblock--datadog_user_config))
- `destination_endpoint_id` (String) Destination endpoint for the integration (if any)
- `destination_service_name` (String) Destination service for the integration (if any)
- `destination_endpoint_id` (String) Destination endpoint for the integration.
- `destination_service_name` (String) Destination service for the integration.
- `external_aws_cloudwatch_logs_user_config` (Block List, Max: 1) ExternalAwsCloudwatchLogs user configurable settings (see [below for nested schema](#nestedblock--external_aws_cloudwatch_logs_user_config))
- `external_aws_cloudwatch_metrics_user_config` (Block List, Max: 1) ExternalAwsCloudwatchMetrics user configurable settings (see [below for nested schema](#nestedblock--external_aws_cloudwatch_metrics_user_config))
- `external_elasticsearch_logs_user_config` (Block List, Max: 1) ExternalElasticsearchLogs user configurable settings (see [below for nested schema](#nestedblock--external_elasticsearch_logs_user_config))
Expand All @@ -48,14 +48,14 @@ resource "aiven_service_integration" "my_integration_metrics" {
- `logs_user_config` (Block List, Max: 1) Logs user configurable settings (see [below for nested schema](#nestedblock--logs_user_config))
- `metrics_user_config` (Block List, Max: 1) Metrics user configurable settings (see [below for nested schema](#nestedblock--metrics_user_config))
- `prometheus_user_config` (Block List, Max: 1) Prometheus user configurable settings (see [below for nested schema](#nestedblock--prometheus_user_config))
- `source_endpoint_id` (String) Source endpoint for the integration (if any)
- `source_endpoint_id` (String) Source endpoint for the integration.
- `source_service_name` (String) Source service for the integration (if any)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `integration_id` (String) Service Integration Id at aiven
- `integration_id` (String) The ID of the Aiven service integration.

<a id="nestedblock--clickhouse_kafka_user_config"></a>
### Nested Schema for `clickhouse_kafka_user_config`
Expand Down Expand Up @@ -375,5 +375,5 @@ Optional:
## Import
Import is supported using the following syntax:
```shell
terraform import aiven_service_integration.myintegration PROJECT/INTEGRATION_ID
terraform import aiven_service_integration.example_integration PROJECT/INTEGRATION_ID
```
10 changes: 5 additions & 5 deletions examples/data-sources/aiven_service_integration/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "aiven_service_integration" "myintegration" {
project = aiven_project.myproject.project
destination_service_name = "<DESTINATION_SERVICE_NAME>"
integration_type = "datadog"
source_service_name = "<SOURCE_SERVICE_NAME>"
data "aiven_service_integration" "example_integration" {
project = data.aiven_project.example_project.project
destination_service_name = aiven_m3db.example_m3db.service_name
integration_type = "metrics"
source_service_name = aiven_kafka.example_kafka.service_name
}

2 changes: 1 addition & 1 deletion examples/resources/aiven_service_integration/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import aiven_service_integration.myintegration PROJECT/INTEGRATION_ID
terraform import aiven_service_integration.example_integration PROJECT/INTEGRATION_ID
10 changes: 5 additions & 5 deletions examples/resources/aiven_service_integration/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aiven_service_integration" "my_integration_metrics" {
project = aiven_project.myproject.project
resource "aiven_service_integration" "example_integration" {
project = data.aiven_project.example_project.project
integration_type = "metrics"
source_service_name = aiven_kafka.kfk1.service_name
destination_service_name = aiven_m3db.m3db.service_name
}
source_service_name = aiven_kafka.example_kafka.service_name
destination_service_name = aiven_m3db.example_m3db.service_name
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ const serviceIntegrationEndpointRegExp = "^[a-zA-Z0-9_-]*\\/{1}[a-zA-Z0-9_-]*$"
func aivenServiceIntegrationSchema() map[string]*schema.Schema {
s := map[string]*schema.Schema{
"integration_id": {
Description: "Service Integration Id at aiven",
Description: "The ID of the Aiven service integration.",
Computed: true,
Type: schema.TypeString,
},
"destination_endpoint_id": {
Description: "Destination endpoint for the integration (if any)",
Description: "Destination endpoint for the integration.",
ForceNew: true,
Optional: true,
Type: schema.TypeString,
ValidateFunc: validation.StringMatch(regexp.MustCompile(serviceIntegrationEndpointRegExp),
"endpoint id should have the following format: project_name/endpoint_id"),
"endpoint ID should have the following format: project_name/endpoint_id"),
},
"destination_service_name": {
Description: "Destination service for the integration (if any)",
Description: "Destination service for the integration.",
ForceNew: true,
Optional: true,
Type: schema.TypeString,
Expand All @@ -52,13 +52,13 @@ func aivenServiceIntegrationSchema() map[string]*schema.Schema {
ValidateFunc: validation.StringInSlice(codegenintegrations.IntegrationTypeChoices(), false),
},
"project": {
Description: "Project the integration belongs to",
Description: "Project the integration belongs to.",
ForceNew: true,
Required: true,
Type: schema.TypeString,
},
"source_endpoint_id": {
Description: "Source endpoint for the integration (if any)",
Description: "Source endpoint for the integration.",
ForceNew: true,
Optional: true,
Type: schema.TypeString,
Expand All @@ -82,7 +82,7 @@ func aivenServiceIntegrationSchema() map[string]*schema.Schema {

func ResourceServiceIntegration() *schema.Resource {
return &schema.Resource{
Description: "The Service Integration resource allows the creation and management of Aiven Service Integrations.",
Description: "Creates and manages an Aiven [service integration](https://aiven.io/docs/platform/concepts/service-integration).",
CreateContext: resourceServiceIntegrationCreate,
ReadContext: resourceServiceIntegrationRead,
UpdateContext: resourceServiceIntegrationUpdate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func DatasourceServiceIntegration() *schema.Resource {
return &schema.Resource{
ReadContext: datasourceServiceIntegrationRead,
Description: "The Service Integration data source provides information about the existing Aiven Service Integration.",
Description: "Gets information about an Aiven service integration.",
Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenServiceIntegrationSchema(),
"project", "integration_type", "source_service_name", "destination_service_name"),
}
Expand Down
24 changes: 0 additions & 24 deletions templates/data-sources/service_integration.md.tmpl

This file was deleted.

10 changes: 5 additions & 5 deletions templates/resources/service_integration.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ description: |-
# {{.Name}} ({{.Type}})
{{ .Description | trimspace }}

**Note** For services running on `hobbyist` plan service integrations are not supported.
You can set up an integration between two Aiven services or an Aiven service and an external
service. For example, you can send metrics from a Kafka service to an M3DB service,
send metrics from an M3DB service to a Grafana service to show dashboards, and send logs from
any service to OpenSearch.

Service Integration defines an integration between two Aiven services or between Aiven service and an external
integration endpoint. Integration could be for example sending metrics from Kafka service to an M3DB service,
getting metrics from an M3DB service to a Grafana service to show dashboards, sending logs from any service to
OpenSearch, etc.
**Services integrations are not supported for services running on hobbyist plans.**

{{ if .HasExample -}}
## Example Usage
Expand Down

0 comments on commit fd32881

Please sign in to comment.