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

[Bug] Fleet APM integration resource gets broken after Elastic upgrade #943

Open
ArtemHarkusha opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working fleet-improvements

Comments

@ArtemHarkusha
Copy link

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:

  1. 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
}
  1. 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:

  1. Manually update version in the state file. In this case TF plan will show no difference
  2. remove the resource from state teraform state rm elasticstack_fleet_integration.this and 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

@ArtemHarkusha ArtemHarkusha added the bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fleet-improvements
Projects
None yet
Development

No branches or pull requests

2 participants