-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
Milestone
Description
Describe the bug
After Elastic upgrade (8.15.2 -> 8.15.5) the apm integration fails on terraform plan. The version of the integration was upgraded accordingly
│ Error: package not found
│
│ with elasticstack_fleet_integration.this["apm"],
│ on main.tf line 1, in resource "elasticstack_fleet_integration" "this":
│ 1: resource "elasticstack_fleet_integration" "this" {
│
To Reproduce
Steps to reproduce the behavior:
- On Elastic stack version 8.15.2. Deploy the following TF configuration
resource "elasticstack_fleet_integration" "this" {
name = "apm"
version = "8.15.2"
force = true
skip_destroy = false
}- Upgrade Elastic to 8.15.5 and use the following TF configuration
resource "elasticstack_fleet_integration" "this" {
name = "apm"
version = "8.15.5"
force = true
skip_destroy = false
}2 terraform plan will give the error
│ Error: package not found
│
│ with elasticstack_fleet_integration.this["apm"],
│ on main.tf line 1, in resource "elasticstack_fleet_integration" "this":
│ 1: resource "elasticstack_fleet_integration" "this" {
│
Expected behavior
Provider should be able just to refresh the resource since the integration version is upgraded during Elastic Stack upgrade
Versions (please complete the following information):
- OS: Ubuntu 22.04
- Terraform Version: 1.9.5
- Provider version: 0.11.11
- Elasticsearch Version: 8.15.2 and 8.15.5
Additional context
I fount 2 workarounds:
- Manually update version in the state file. In this case TF plan will show no difference
- remove the resource from state
teraform state rm elasticstack_fleet_integration.thisand apply.
I think the problem is that TF tries to refresh the state and makes calls to 8.15.2 version of the integration which simply does not exists in the newer Elastic Stack version
chreichert and yavor-martian