Skip to content
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
25 changes: 24 additions & 1 deletion docs/resources/fleet_integration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "elasticstack_fleet_integration Resource - terraform-provider-elasticstack"
Expand All @@ -22,6 +21,8 @@ set `skip_destroy` to `true`.

## Example Usage

### Basic usage

```terraform
provider "elasticstack" {
kibana {}
Expand All @@ -34,6 +35,28 @@ resource "elasticstack_fleet_integration" "test_integration" {
}
```

### Tracking the latest version

An integration can track the latest available version by utilizing the `elasticstack_fleet_integration` data source.
The data source will retrieve the latest available version of the specified integration package, which can then be
passed to the `version` attribute of the `elasticstack_fleet_integration` resource.

```terraform
provider "elasticstack" {
kibana {}
}

data "elasticstack_fleet_integration" "tcp" {
name = "tcp"
}

resource "elasticstack_fleet_integration" "test_integration" {
name = "tcp"
version = data.elasticstack_fleet_integration.tcp.version
force = true
}
```

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
provider "elasticstack" {
kibana {}
}

data "elasticstack_fleet_integration" "tcp" {
name = "tcp"
}

resource "elasticstack_fleet_integration" "test_integration" {
name = "tcp"
version = data.elasticstack_fleet_integration.tcp.version
force = true
}
53 changes: 53 additions & 0 deletions templates/resources/fleet_integration.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "{{.Name}} {{.Type}} - {{.RenderedProviderName}}"
subcategory: "Fleet"
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

### Basic usage

{{ tffile "examples/resources/elasticstack_fleet_integration/resource.tf" }}

### Tracking the latest version

An integration can track the latest available version by utilizing the `elasticstack_fleet_integration` data source.
The data source will retrieve the latest available version of the specified integration package, which can then be
passed to the `version` attribute of the `elasticstack_fleet_integration` resource.

{{ tffile "examples/resources/elasticstack_fleet_integration/resource-with-latest-version.tf" }}

{{ .SchemaMarkdown | trimspace }}
{{- if or .HasImport .HasImportIDConfig .HasImportIdentityConfig }}

## Import

Import is supported using the following syntax:
{{- end }}
{{- if .HasImportIdentityConfig }}

In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute, for example:

{{tffile .ImportIdentityConfigFile }}

{{ .IdentitySchemaMarkdown | trimspace }}
{{- end }}
{{- if .HasImportIDConfig }}

In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the ` + "`" + `id` + "`" + ` attribute, for example:

{{tffile .ImportIDConfigFile }}
{{- end }}
{{- if .HasImport }}

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

{{codefile "shell" .ImportFile }}
{{- end }}