- 
                Notifications
    You must be signed in to change notification settings 
- Fork 121
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Observe that after upgrading to 0.11.15 the following error happens;
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to elasticstack_fleet_agent_policy.switch_snmp,
│ provider "provider[\"registry.terraform.io/elastic/elasticstack\"].fleet"
│ produced an unexpected new value: .global_data_tags: was
│ cty.MapValEmpty(cty.Object(map[string]cty.Type{"number_value":cty.Number,
│ "string_value":cty.String})), but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
To Reproduce
Steps to reproduce the behavior:
- Example config
resource "elasticstack_fleet_agent_policy" "router_snmp" {
  name            = "Production Router SNMP"
  namespace       = local.default_namespace
  description     = "Policy for Prometheus SNMP monitoring for Routers"
  sys_monitoring  = false
  monitor_logs    = true
  monitor_metrics = true
  provider = elasticstack.fleet
}- TF operation terraform apply
- See the error in the output '...'
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to elasticstack_fleet_agent_policy.switch_snmp,
│ provider "provider[\"registry.terraform.io/elastic/elasticstack\"].fleet"
│ produced an unexpected new value: .global_data_tags: was
│ cty.MapValEmpty(cty.Object(map[string]cty.Type{"number_value":cty.Number,
│ "string_value":cty.String})), but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Note that the plan output looks like:
  # elasticstack_fleet_agent_policy.router_snmp will be updated in-place
  ~ resource "elasticstack_fleet_agent_policy" "router_snmp" {
      + global_data_tags = {}
        id               = "bcdd0e4d-867c-4aeb-b307-e3769e4885a3"
        name             = "Production Router SNMP"
        # (6 unchanged attributes hidden)
    }
Expected behavior
No error
Versions (please complete the following information):
- OS: Linux
- Terraform Version 1.11.2
- Provider version 0.11.15
- Elasticsearch Version 8.17.1
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working