Skip to content

[Bug] elasticstack_fleet_integration_policy render consistent diff for policy secretΒ #689

@Holi0317

Description

@Holi0317

Describe the bug

When configuring policy secret via integration policy resource, the provider and terraform always renders a diff even though the value is not changed.

I'm trying to configure the universal profiler integration.

To Reproduce
Steps to reproduce the behavior:

resource "elasticstack_fleet_integration_policy" "profiling" {
  name      = "profiling"

  agent_policy_id     = elasticstack_fleet_agent_policy.this.policy_id
  integration_name    = data.elasticstack_fleet_integration.profiling.name
  integration_version = data.elasticstack_fleet_integration.profiling.version

  input {
    input_id     = "universal_profiling_agent-pf-host-agent"
    streams_json = jsonencode({})
    vars_json = jsonencode({
      "profiler.collector"    = "cloud-es.io"
      "profiler.secret_token" = "Hunter2"
      "profiler.disable_tls"  = false
    })
  }
}

Apply once, then make a plan.

Expected behavior
There should not be any diff in the second plan.

Versions (please complete the following information):

  • OS: MacOS
  • Terraform Version: v1.7.5
  • Provider version 0.1.4
  • Elasticsearch Version 8.14.3

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