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

Cannot create a simple pipeline filter with tags without providing a key:value combination #1120

Open
smacktoid opened this issue Nov 20, 2024 · 0 comments

Comments

@smacktoid
Copy link

smacktoid commented Nov 20, 2024

Terraform Version

1.4.4

Affected Resource(s)

Please list the resources as a list, for example:

  • harness_platform_pipeline_filters

Debug Output

Not available.

Panic Output

panic output

Expected Behavior

The UI does not force tags on a pipeline to be created in the form key:value. The UI also allows pipeline filters to be created which simply match the single-value string that was used to tag a pipeline.

E.g. I can tag a pipeline as database-user-management and create a filter for that tag. The pipeline will be visible in the filtered list.

But with the terraform provider, this is not possible. If I omit the value from the tag there is an error.

If no value is provided a simple filter should be created without a colon using just the key, as is possible in the UI.

Actual Behavior

The execution failed and produced an error:

panic: interface conversion: interface {} is nil, not string

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a simple pipeline filter resource which filters only by tag. For example:
resource "harness_platform_pipeline_filters" "database_user_management" {
  identifier = "database_user_management"
  name       = "Database User Management"
  org_id     = var.harness_organization_id
  project_id = "project_name"
  type       = "PipelineSetup"
  filter_properties {
    filter_type = "PipelineSetup"
    pipeline_tags = [
      {
        "key"   = "database-user-management"
        "value" = ""
      }
    ]
  }
  filter_visibility = "EveryOne"
}

Important Factoids

No

References

None

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

1 participant