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

alert_notification_endpoints always shows a diff #116

Closed
davops opened this issue Aug 2, 2022 · 1 comment · Fixed by #117
Closed

alert_notification_endpoints always shows a diff #116

davops opened this issue Aug 2, 2022 · 1 comment · Fixed by #117

Comments

@davops
Copy link

davops commented Aug 2, 2022

Affected Resource(s)

  • logzio_alert_v2
  • specifically, alert_notification_endpoints

Terraform Configuration Files

resource "logzio_alert_v2" "secrets_admin" {
  title                        = "Secrets Role"
  search_timeframe_minutes     = 30
  is_enabled                   = true
  alert_notification_endpoints = [123, 456, 789, 111]

  suppress_notifications_minutes = 5
  output_type                    = "JSON"
  sub_components {
    account_ids_to_query_on     = [123, ]
    query_string                = "type:cloudtrail"
    group_by_aggregation_fields = []
    filter_must = jsonencode(
      [
        {
          match_phrase = {
            eventName = {
              query = "Federate"
            }
          }
        },
      ]
    )
    filter_must_not = jsonencode(
      {
        bool = {
          minimum_should_match = 1
          should = [
            {
              match_phrase = {
                "serviceEventDetails.account_id" = "123456"
              }
            },
          ]
        }
      },
    )
    should_query_on_all_accounts = false
    operation                    = "GREATER_THAN"
    value_aggregation_type       = "COUNT"
    severity_threshold_tiers {
      severity  = "HIGH"
      threshold = 0
    }
    columns {
      field_name = "geoip.real_region_name"
    }
    columns {
      field_name = "@timestamp"
    }
  }
}

Expected Behavior

logzio_alert_v2.secrets_admin: Modifications complete after 1s [id=5665517]

Apply complete! Resources: 0 added, 2 changed, 0 destroyed.

The alert should be updated when it applies and should match the configuration in Terraform.

Actual Behavior

logzio_alert_v2.secrets_admin: Modifications complete after 1s [id=5665517]

Apply complete! Resources: 0 added, 2 changed, 0 destroyed.

However, Terraform will always show a diff:

      ~ alert_notification_endpoints   = [
          - 789,
            123,
          - 111,
            456,
          + 789,
          + 111,
        ]

Steps to Reproduce

  1. terraform apply

Important Factoids

  • Using logzio provider v1.9.1 and Terraform 1.2.6
@mirii1994
Copy link
Contributor

Hi @davops, thanks for reporting this bug!
We will work on a fix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants