Describe the bug
The provider rejects an empty labels map ({}) with the following error:
│ Error: Invalid Attribute Value
│
│ with cloudfoundry_org.my_org,
│ on main.tf line 18, in resource "cloudfoundry_org" "my_org":
│ 18: labels = var.cf_org_labels
│
│ Attribute labels map must contain at least 1 elements, got: 0
Expected Behavior
Setting labels = {} (an empty map) on a cloudfoundry_org resource should be valid. An organization may intentionally have no labels provided via a variable. The provider should accept an empty map and either skip label management or remove any existing labels.
Steps To Reproduce
variable "cf_org_labels" {
type = map(string)
}
resource "cloudfoundry_org" "my_org" {
name = "my-org"
labels = var.cf_org_labels
}
terraform apply -var='cf_org_labels={}'
What version of the Terraform provider are you using?
1.13.0
What version of the Terraform CLI are you using?
1.14.0
What CF API version are you using?
3.216.0
Describe the bug
The provider rejects an empty
labelsmap ({}) with the following error:Expected Behavior
Setting
labels = {}(an empty map) on acloudfoundry_orgresource should be valid. An organization may intentionally have no labels provided via a variable. The provider should accept an empty map and either skip label management or remove any existing labels.Steps To Reproduce
terraform apply -var='cf_org_labels={}'What version of the Terraform provider are you using?
1.13.0
What version of the Terraform CLI are you using?
1.14.0
What CF API version are you using?
3.216.0