Skip to content

meraki_sensor_alerts_profile resource always showing changes in plan even after apply #150

@tienphan181

Description

@tienphan181

Hi,

I have moved all the resources over this new provider. I am running into issue resource meraki_sensor_alerts_profile, even after I applied the code successfully the changes are still showing when I run a plan.

My code:

resource "meraki_sensor_alerts_profile" "sensor-alerts" {
  name       = "Sensor Alerts"
  network_id = meraki_network.test-Terraform.id

  conditions = [
    {
        direction                       = "above"
        duration                        = 0
        metric                          = "noise"
        threshold_noise_ambient_level   = 85
    },
    {
        direction               = "below"
        duration                = 0
        metric                  = "pm25"
        threshold_pm25_quality  = "fair"
    },
    {
        direction               = "below"
        duration                = 0
        metric                  = "tvoc"
        threshold_tvoc_quality  = "poor"
    },
    {
        direction                               = "below"
        duration                                = 600        #10mins
        metric                                  = "indoorAirQuality"
        threshold_indoor_air_quality_quality    = "poor"
    },
    {
        direction           = "above"
        duration                = 0
        metric                  = "water"
        threshold_water_present = true
    },
    {
        direction                               = "above"
        duration                                = 600        #10mins
        metric                                  = "humidity"
        threshold_humidity_relative_percentage  = 80
    },
    {
        direction  = "above"
        duration   = 600        #10mins
        metric     = "temperature"
        threshold_temperature_celsius = 29
    },
    {
        direction                               = "below"
        duration                                = 600        #10mins
        metric                                  = "humidity"
        threshold_humidity_relative_percentage  = 20
    },
    {
        direction                       = "below"
        duration                        = 600        #10mins
        metric                          = "temperature"
        threshold_temperature_celsius   = 10
    },
    {
        direction           = "above"
        duration            = 300        #5mins
        metric              = "door"
        threshold_door_open = true
    }
  ]
    include_sensor_url          = true

}

My plan:

  # meraki_sensor_alerts_profile.sensor-alerts will be updated in-place
  ~ resource "meraki_sensor_alerts_profile" "sensor-alerts" {
      ~ conditions                 = [
          ~ {
              ~ duration                               = 600 -> 0
              ~ metric                                 = "humidity" -> "noise"
              - threshold_humidity_relative_percentage = 80 -> null
              + threshold_noise_ambient_level          = 85
                # (1 unchanged attribute hidden)
            },
          ~ {
              ~ direction                     = "above" -> "below"
              ~ duration                      = 600 -> 0
              ~ metric                        = "temperature" -> "pm25"
              + threshold_pm25_quality        = "fair"
              - threshold_temperature_celsius = 29 -> null
            },
          ~ {
              ~ duration                               = 600 -> 0
              ~ metric                                 = "humidity" -> "tvoc"
              - threshold_humidity_relative_percentage = 20 -> null
              + threshold_tvoc_quality                 = "poor"
                # (1 unchanged attribute hidden)
            },
          ~ {
              ~ metric                               = "temperature" -> "indoorAirQuality"
              + threshold_indoor_air_quality_quality = "poor"
              - threshold_temperature_celsius        = 10 -> null
                # (2 unchanged attributes hidden)
            },
          + {
              + direction               = "above"
              + duration                = 0
              + metric                  = "water"
              + threshold_water_present = true
            },
          + {
              + direction                              = "above"
              + duration                               = 600
              + metric                                 = "humidity"
              + threshold_humidity_relative_percentage = 80
            },
          + {
              + direction                     = "above"
              + duration                      = 600
              + metric                        = "temperature"
              + threshold_temperature_celsius = 29
            },
          + {
              + direction                              = "below"
              + duration                               = 600
              + metric                                 = "humidity"
              + threshold_humidity_relative_percentage = 20
            },
          + {
              + direction                     = "below"
              + duration                      = 600
              + metric                        = "temperature"
              + threshold_temperature_celsius = 10
            },
          + {
              + direction           = "above"
              + duration            = 300
              + metric              = "door"
              + threshold_door_open = true
            },
        ]
        id                         = ""
        name                       = "Sensor Alerts"
        # (3 unchanged attributes hidden)
    }

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions