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] modifying elasticstack_fleet_server_host.fleet_host returns 404 #864

Open
kaykhan opened this issue Oct 22, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@kaykhan
Copy link

kaykhan commented Oct 22, 2024

Describe the bug

When attempting to modify elasticstack_fleet_server_host.fleet_host to update the hosts value we receive {"statusCode":404,"error":"Not Found","message":"Not Found"}

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

resource "elasticstack_fleet_server_host" "fleet_host" {
  name    = "fleet"
  default = true
  hosts = [
    "https://${local.fleet_server_name}-fleet-server-agent-http.elastic-system.svc:8220", // update this value
  ]
  depends_on = [
    helm_release.fleet_server
  ]
}

Expected behavior
We expect the value of hosts = [] to be modifiable

Screenshots
Image

Versions (please complete the following information):

  • OS: [e.g. Linux] Ubuntu 24.04
  • Terraform Version: 1.85
  • Provider version: 0.11.9
  • Elasticsearch Version: 8.15.2

Additional context

We are also unable to delete this resource after its created.

Image

@kaykhan kaykhan added the bug Something isn't working label Oct 22, 2024
@kaykhan
Copy link
Author

kaykhan commented Oct 22, 2024

I was able to delete the fleet_server_host using the api - i also had to set default to false first.

GET kbn:/api/fleet/fleet_server_host

PUT kbn:/api/fleet/fleet_server_hosts/b1bfad95-0361-49bf-8d3d-060b2f41eb57
{
  "is_default": false
}

DELETE kbn:/api/fleet/fleet_server_hosts/b1bfad95-0361-49bf-8d3d-060b2f41eb57
{
  "items": [
    {
      "id": "b1bfad95-0361-49bf-8d3d-060b2f41eb57",
      "host_urls": [
        "https://fleet-server-prod-fleet-server-agent-http.elastic-system.svc:8220"
      ],
      "is_default": true,
      "name": "fleet",
      "is_preconfigured": false
    }
  ],
  "page": 1,
  "perPage": 10000,
  "total": 1
}

@kaykhan
Copy link
Author

kaykhan commented Oct 22, 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
Projects
None yet
Development

No branches or pull requests

1 participant