scaleway / terraform-provider-scaleway

Terraform Scaleway provider
https://www.terraform.io/docs/providers/scaleway/
Mozilla Public License 2.0
199 stars 125 forks source link

Unable to use zone argument on data.scaleway_lb_ip #2802

Closed al26p closed 1 week ago

al26p commented 1 week ago

Community Note

Terraform Version

Terraform v1.9.8

Affected Resource(s)

Terraform Configuration Files

data "scaleway_lb_ip" "this" {
  ip_address = "123.0.0.1"
  zone       = "fr-par-2"
}

Expected Behavior

We should be able to set the zone for the data to query a lb_ip in a different zone than the default provider as stated in the documentation

Actual Behavior

Zone is only an attribute and not an argument therefore we can only query lb_ip in the default provider zone.

╷
│ Error: Value for unconfigurable attribute
│ 
│   with data.scaleway_lb_ip.this,
│   on example.tf line 37, in data "scaleway_lb_ip" "this":
│   37:   zone       = "fr-par-2"
│ 
│ Can't configure a value for "zone": its value will be decided automatically based on the result of applying this configuration.
╵

Steps to Reproduce

  1. terraform apply

Important Factoids

References

I made a fix, you will find it here