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 missing docs examples #896

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ nav_order: 1
- Forcefully send user_config on service integration update, add `datadog_user_config`
- Add user config options schema generation
- Drop Kafka Mirrormaker 1 support as it is no longer supported by the API and was broken
- Add missing examples

## [3.6.0] - 2022-08-31

Expand Down
10 changes: 9 additions & 1 deletion docs/data-sources/service_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ The Service Component data source provides information about the existing Aiven
Service components can be defined to get the connection info for specific service. Services may support multiple different access routes (VPC peering and public access), have additional components or support various authentication methods. Each of these may be represented by different DNS name or TCP port and the specific component to match can be selected by specifying appropriate filters as shown below.

## Example Usage
{{tffile "examples/data-sources/aiven_service_component/data-source.tf"}}
```terraform
data "aiven_service_component" "sc1" {
project = aiven_kafka.project1.project
service_name = aiven_kafka.service1.service_name
component = "kafka"
route = "dynamic"
kafka_authentication_method = "certificate"
}
```
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
9 changes: 8 additions & 1 deletion docs/data-sources/service_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ The Service Integration data source provides information about the existing Aive
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 InfluxDB service, getting metrics from an InfluxDB service to a Grafana service to show dashboards, sending logs from any service to Elasticsearch, etc.

## Example Usage
{{tffile "examples/data-sources/aiven_service_integration/data-source.tf"}}
```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>"
}
```
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
9 changes: 8 additions & 1 deletion docs/resources/service_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ getting metrics from an InfluxDB service to a Grafana service to show dashboards
Elasticsearch, etc.

## Example Usage
{{tffile "examples/resources/aiven_service_integration/resource.tf"}}
```terraform
Serpentiel marked this conversation as resolved.
Show resolved Hide resolved
resource "aiven_service_integration" "my_integration_metrics" {
project = aiven_project.myproject.project
integration_type = "metrics"
source_service_name = aiven_kafka.kfk1.service_name
destination_service_name = aiven_m3db.m3db.service_name
}
```
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
13 changes: 12 additions & 1 deletion docs/resources/vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ doesn't exist, overlapping IP ranges, or the Aiven cloud account doesn't have pe
there. `state_info` field contains more details about the particular issue.

## Example Usage
{{tffile "examples/resources/aiven_vpc_peering_connection/resource.tf"}}
```terraform
resource "aiven_vpc_peering_connection" "mypeeringconnection" {
vpc_id = aiven_project_vpc.myvpc.id
peer_cloud_account = "<PEER_ACCOUNT_ID>"
peer_vpc = "<PEER_VPC_ID/NAME>"
peer_region = "<PEER_REGION>"

timeouts {
create = "10m"
}
}
```
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
13 changes: 5 additions & 8 deletions examples/resources/aiven_service_integration/resource.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
resource "aiven_service_integration" "myintegration" {
project = aiven_project.myproject.project
// use destination_endpoint_id or destination_service_name = "aiven_service.YYY.service_name"
destination_endpoint_id = aiven_service_integration_endpoint.XX.id
integration_type = "datadog"
// use source_service_name or source_endpoint_id = aiven_service_integration_endpoint.XXX.id
source_service_name = aiven_kafka.XXX.service_name
resource "aiven_service_integration" "my_integration_metrics" {
project = aiven_project.myproject.project
integration_type = "metrics"
source_service_name = aiven_kafka.kfk1.service_name
destination_service_name = aiven_m3db.m3db.service_name
}

2 changes: 1 addition & 1 deletion templates/data-sources/service_component.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Service components can be defined to get the connection info for specific servic

{{ if .HasExample -}}
## Example Usage
{{ printf "{{tffile %q}}" .ExampleFile }}
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/service_integration.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Service Integration defines an integration between two Aiven services or between

{{ if .HasExample -}}
## Example Usage
{{ printf "{{tffile %q}}" .ExampleFile }}
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
Expand Down
2 changes: 1 addition & 1 deletion templates/resources/service_integration.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Elasticsearch, etc.

{{ if .HasExample -}}
## Example Usage
{{ printf "{{tffile %q}}" .ExampleFile }}
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
Expand Down
2 changes: 1 addition & 1 deletion templates/resources/vpc_peering_connection.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ there. `state_info` field contains more details about the particular issue.

{{ if .HasExample -}}
## Example Usage
{{ printf "{{tffile %q}}" .ExampleFile }}
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
Expand Down