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

Error with variable with label fliter variable_name and string_value #280

Open
tifennlegoff opened this issue Oct 17, 2024 · 1 comment
Open

Comments

@tifennlegoff
Copy link

Hey, I have an error when we added variable who use both string_value and variable_name with terraform apply (but not with plan)

Affected Resource(s)

  • coralogix_dashboard

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

variables = [
{
    name         = "topic_in"
    display_name = "Topic in"
    definition = {
      multi_select = {
        source = {
          query = {
            query = {
              metrics = {
                label_value = {
                  metric_name  = {
                    string_value = "kafka_info_total"
                  }
                  label_name   = {
                    string_value = "input"
                  }
                  label_filter = [
                    {
                      label = "kubernetes_namespace"
                      operator = {
                        string_value = "pipeline-${var.env}"
                      }
                    }, {
                      label = "app"
                      operator = {
                        variable_name = "app"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
        values_order_direction = "asc"
      }
    }
  }
}

Debug Output

Panic Output

Expected Behavior

Actual Behavior

We have this error when Terraform Apply

Error: Provider produced inconsistent result after apply
When applying changes to
module.enrichment_pipeline_dashboards_staging_hydrogen.coralogix_dashboard.coreplatform_enrichment_pipeline[0],
provider "provider[\"registry.terraform.io/coralogix/coralogix\"]" produced
an unexpected new value:
.variables[0].definition.multi_select.source.query.query.metrics.label_value.label_filters:
was null, but now
cty.ListValEmpty(cty.Object(map[string]cty.Type{"label":cty.Object(map[string]cty.Type{"string_value":cty.String,
"variable_name":cty.String}),
"metric":cty.Object(map[string]cty.Type{"string_value":cty.String,
"variable_name":cty.String}),
"operator":cty.Object(map[string]cty.Type{"selected_values":cty.List(cty.Object(map[string]cty.Type{"string_value":cty.String,
"variable_name":cty.String})), "type":cty.String})})).
This is a bug in the provider, which should be reported in the provider's own issue tracker.

Steps to Reproduce

  1. Add variable with two label filters
  2. terraform apply

Important Factoids

References

  • #0000

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@celaus
Copy link
Collaborator

celaus commented Nov 11, 2024

Hi - can you please include the full dashboard (or an abbreviated version that reproduces the issue)

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

No branches or pull requests

2 participants