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

Misalignment in between the Terraform fleet_integration_policy parameters and the full scope of options supported by the Fleet API #731

Open
alextg314 opened this issue Aug 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@alextg314
Copy link

Is your feature request related to a problem? Please describe.
Unable to define the Defend integration using Terraform

Describe the resource you would like to have implemented.
See POST /package_policies (Fleet API)

    data = {
        "policy_id": agent_policy_id,
        "package": {
            "name": "endpoint",
            "version": "x"
        },
        "name": ei_endpoint",
        "description": "",
        "namespace": "z",
        "inputs":[
            {
                "enabled":"true",
                "streams":[],
                "type":"ENDPOINT_INTEGRATION_CONFIG",
                "config":{
                    "_config":{
                        "value":{
                            "type":"endpoint",
                            "endpointConfig":{
                                "preset":"EDRComplete"
                            }
                        }
                    }
                }
            }
        ]
    }

Describe the solution you'd like
Would like to define the above API into Terraform, it should be something like below, but elastic team needs to enhance the Terraform resource to allow for parameters like config and type to be specified

Describe alternatives you've considered
The following TF has been run unsuccessfully due to the above limitations

resource "elasticstack_fleet_integration_policy" "fleet_defend_integration_policy" {
  name                = endpoint_integrations"
  namespace           = "my_namespace"
  description         = "my_description"
  agent_policy_id     = elasticstack_fleet_agent_policy.default_agent_policy.policy_id
  integration_name    = elasticstack_fleet_integration.endpoint_integration.name
  integration_version = elasticstack_fleet_integration.endpoint_integration.version

  input {
    input_id = "endpoint"
    vars_json = jsonencode(
      {
          "config.integration_config.value": {
            "type": "endpoint", 
            "endpointConfig.preset": "EDRComplete"
          }
      }
    )

  }
}

Additional context
Issue was discussed here

@alextg314 alextg314 added the enhancement New feature or request label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant