linode / terraform-provider-linode

Terraform Linode provider
https://www.terraform.io/docs/providers/linode/
Mozilla Public License 2.0
202 stars 98 forks source link

[Bug]: Data `linode_database_engines ` is not filter #1616

Open oanhnn opened 1 month ago

oanhnn commented 1 month ago

Terraform Version

OpenTofu v1.8.3 on darwin_arm64

Linode Provider Version

v2.29.1

Effected Terraform Resources

data.linode_database_engines

Terraform Config Files

data "linode_database_engines" "mysql" {
  filter {
    name = "engine"
    values = ["mysql"]
    match_by = "exact"
  }
}
output "supported_mysql" {
  value = data.linode_database_engines.mysql.engines.*.id
}

Debug Output

$ TF_LINODE=DEBUG LINODE_DEBUG=1 tofu apply
data.linode_database_engines.mysql: Reading...
data.linode_database_engines.mysql: Read complete after 1s [id=ydYKW7tJhAYcB/HPdwoZZrDLBojkLGRm++rvf7Z7ye+VODZvOimyMgy9x+8AHMmVElA8Fi94w3CZ6IXAPIAD7g==]

Changes to Outputs:
  + supported_mysql = [
      + "mysql/8",
      + "postgresql/13",
      + "postgresql/14",
      + "postgresql/15",
      + "postgresql/16",
    ]

You can apply this plan to save these new output values to the OpenTofu state, without changing any real infrastructure.

Do you want to perform these actions?
  OpenTofu will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

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

Outputs:

supported_mysql = tolist([
  "mysql/8",
  "postgresql/13",
  "postgresql/14",
  "postgresql/15",
  "postgresql/16",
])

Panic Output

No response

Expected Behavior

Outputs:

supported_mysql = tolist([
  "mysql/8",
])

Actual Behavior

Outputs:

supported_mysql = tolist([
  "mysql/8",
  "postgresql/13",
  "postgresql/14",
  "postgresql/15",
  "postgresql/16",
])

Steps to Reproduce

ezilber-akamai commented 1 month ago

Hi, thanks for reporting this bug! I was able to reproduce the issue and the problem appears to be with the underlying API call. We have passed this along to the appropriate team. Thanks!

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days