Skip to content

[Bug] Cannot import Fleet policy #396

Closed
@renzedj

Description

@renzedj

Describe the bug

I am trying to import an elasticstack_fleet_agent_policy using the instructions in the documentation, which states:

Import is supported using the following syntax:

terraform import elasticstack_kibana_fleet_agent_policy.my_policy <space id>/<policy id>

I get the following error:

Error: Cannot import non-existent remote object
 
While attempting to import an existing object to "module.fleet.elasticstack_fleet_agent_policy.fleet_policy[\"test-policy\"]", the provider detected that no object exists with the
given id. Only pre-existing objects can be imported; check that the id is correct and that it is associated with the provider's configured region or endpoint, or use "terraform apply" to
create a new remote object for this resource.

This is the same behavior reported in Issue #369 for elasticstack_fleet_output.

To reproduce

Attempt to import elasticstack_fleet_agent_policy.

Expected behavior

Object should import.

Version

  • OS: macos
  • Terraform Version: 1.5.4, 1.5.7
  • Provider version: 0.6.2, 0.7.0, 0.8.0
  • Elasticsearch Version: 8.9.0, 8.10.0, 8.10.2

Metadata

Metadata

Assignees

No one assigned

    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