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

Always showing updates in-place for sentry_project_inbound_data_filter for filter_id = "legacy-browsers" #397

Closed
srtab opened this issue Mar 1, 2024 · 1 comment · Fixed by #421

Comments

@srtab
Copy link

srtab commented Mar 1, 2024

Hi,

After terraform apply for the first time and create a resource similar to the following:

# Create an inbound data filter to ignore issues raised from legacy browsers
resource "sentry_project_inbound_data_filter" "legacy_browser" {
  organization = var.organization_slug
  project      = sentry_project.this.id
  filter_id    = "legacy-browsers"
  subfilters   = ["ie_pre_9", "ie9", "ie10", "ie11", "opera_pre_15", "android_pre_4", "safari_pre_6", "opera_mini_pre_8", "edge_pre_79"]
}

If I try to terraform apply again, i always get changes to apply:

  # module.sentry_projects["project"].sentry_project_inbound_data_filter.legacy_browser will be updated in-place
  ~ resource "sentry_project_inbound_data_filter" "legacy_browser" {
        id           = "org/project/legacy-browsers"
        project   = "project"
      ~ subfilters   = [
          + "android_pre_4",
            "edge_pre_79",
            # (1 unchanged element hidden)
            "ie11",
          - "safari_pre_6",
          + "ie9",
            "ie_pre_9",
          - "android_pre_4",
            "opera_mini_pre_8",
          - "ie9",
            "opera_pre_15",
          + "safari_pre_6",
        ]
        # (2 unchanged attributes hidden)
    }

It seems the order of values has changed and terraform thinks there are changes to apply. Maybe ordering the lists from both side, terraform declared and api loaded) could solve the problem here.

@jianyuan
Copy link
Owner

jianyuan commented May 2, 2024

Fixed by making subfilters a Terraform set (internal implementation).

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