Skip to content

[Bug] elasticstack_fleet_integration missing prerelease query parameter #1575

@predogma

Description

@predogma

Describe the bug
Unable to install prerelease (beta, non-GA packages), which via the Fleet API requires the prerelease=true query parameter set. The prerelease is exposed in the datasource but is not in the resource.

As a result, fails to install (or update) prerelease integration(s).

Fleet API call install/update, has the query parameters (prerelease, ignoreMappingUpdateErrors, skipdataStreamRollover) and body parameters (force, ignore_constraints).

Only force is provisioned in resource. For parity possible need to (or should) furnished all the query, body parameters in the Terraform elasticsearch_fleet_integration resource implementation.

But at minimum, the prerelease flag (query param) is needed to install/update prerelease (beta, non-GA) integrations.

Workaround is to do a manual install, then continue manage with Terraform, except again with an update to version for a non-GA the same issue occurs, it fails.

To Reproduce
Use elasticsearch_fleet_integration resource with any packages that are marked "release": "beta" in GET kbn:/api/fleet/epm/packages?prerelease=true

Then use to install, for example

resource "elasticstack_fleet_integration" "island_browser" {
name = "island"
version = "0.4.0"
force = true
}

Expected behavior

Expect that the integration is installed or updated.

Debug output

Error: failed to install package [island-0.4.0]: [400 Bad Request] package [island-0.4.0] is a prerelease and requires the prerelease flag to be set

Versions (please complete the following information):

  • OS: [e.g. Linux] : Alpine Linux v3.17.2
  • Terraform Version [e.g. 1.0.0] : 1.13.2
  • Provider version [e.g. v0.1.0] 0.12.0-0.13.0
  • Elasticsearch Version [e.g. 7.16.0] 9.1.x

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions