SumoLogic / terraform-provider-sumologic

Terraform provider for Sumo Logic
https://www.terraform.io/docs/providers/sumologic/
Mozilla Public License 2.0
41 stars 57 forks source link

CSE match lists shows constant change for custom column as target_column #583

Open eambrosyupgrade opened 1 year ago

eambrosyupgrade commented 1 year ago

Terraform Version

% terraform --version
Terraform v1.5.6
on darwin_arm64
+ provider registry.terraform.io/sumologic/sumologic v2.27.0

Affected Resource(s)

sumologic_cse_match_list

Terraform Configuration Files

resource "sumologic_cse_match_list" "matchlist" {
  name          = "my_list"
  description   = "Testing Custom Column"
  target_column = "Source Username"
}

Once I run an initial apply, this resource is constantly shown to be changing because of the target_column changing from a numeric value to a the string in my resource.

Debug Output


Terraform will perform the following actions:

  # sumologic_cse_match_list.matchlist will be updated in-place
  ~ resource "sumologic_cse_match_list" "matchlist" {
        id              = "111"
        name            = "my_list"
      ~ target_column   = "3" -> "Source Username"
        # (6 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Expected Behavior

I should be able to add use custom columns in the same way I use prebuilt columns, by calling their Name rather than ID.

Actual Behavior

Plans show drift and have encountered applies failing bc of too many "changes".

Steps to Reproduce

dlinsumo commented 1 year ago

Internal tracking Jira SUMO-229751

pmontiel-sumo commented 1 year ago

what orgId is this?

eambrosyupgrade commented 1 year ago

@pmontiel-sumo 0000000000470976

mvbrock commented 1 year ago

@eambrosyupgrade Is there any chance that a match_list with same name was previously created via UI/API?

eambrosyupgrade commented 1 year ago

@mvbrock I just tested this on (almost) certainly new name (brand_new_list_list_name) and am observing the same behavior. Where all plans after an apply show target column reporting back as a string numeric id, and so show change to its string name.

mvbrock commented 1 year ago

@eambrosyupgrade ok great, that's helpful info. I'm digging into this behavior now.