Skip to content

[Bug] Inconsistent state for elasticstack_kibana_synthetics_monitor #965

@AnanthRavi

Description

@AnanthRavi

Describe the bug
I was trying to provision a new monitor using the elasticstack_kibana_synthetics_monitor resource and get the following error

elasticstack_kibana_synthetics_monitor.monitors["test"]: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to elasticstack_kibana_synthetics_monitor.monitors["test"], provider
│ "provider[\"registry.terraform.io/elastic/elasticstack\"]" produced an unexpected new value: .space_id: was null, but
│ now cty.StringVal("default").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to elasticstack_kibana_synthetics_monitor.monitors["test"], provider
│ "provider[\"registry.terraform.io/elastic/elasticstack\"]" produced an unexpected new value: .service_name: was null,
│ but now cty.StringVal("").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
Releasing state lock. This may take a few moments...

To Reproduce
Sample Code

resource "elasticstack_fleet_agent_policy" "synthetics_policy" {
  name            = "synthetics"
  description     = "Agent policy for kibana synthetics"
  namespace       = "default"
  monitor_logs    = true
  monitor_metrics = true
  skip_destroy    = false
}

resource "elasticstack_kibana_synthetics_private_location" "locations" {
  label           = "internal"
  agent_policy_id = elasticstack_fleet_agent_policy.synthetics_policy.policy_id
  tags            = ["us-east-1"]
}

resource "elasticstack_kibana_synthetics_monitor" "monitors" {
  name      = "network-test-monitor"
  schedule  = 1
  enabled   = false
  tags      = ["us-east-1"]
  private_locations = ["internal"]
  alert = {
    status = {
      enabled = false
    }
    tls = {
      enabled = false
    }
  }
  timeout      = 10
  icmp = {
    host = "1.1.1.1"
  }
}

Expected behavior
The monitor for icmp should be created without any errors

Versions (please complete the following information):

  • OS: Mac Sonoma 14.7
  • Terraform Version 1.5.2
  • Provider version v0.11.12
  • Elasticsearch Version 8.15.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions