terraform-provider-harbor icon indicating copy to clipboard operation
terraform-provider-harbor copied to clipboard

`registry_id` differs between `harbor_registry` and `harbor_project`

Open q-b opened this issue 6 months ago • 0 comments

The registry_id output from harbor_registry is /registries/<id>. The input expected by harbor_project for the field is <id>

The proxy example in the documentation is not valid

harbor_project.projects["example"]: Refreshing state... [id=/projects/22]
╷
│ Error: Incorrect attribute value type
│ 
│   on main.tf line 18, in resource "harbor_project" "projects":
│   18:   registry_id                 = each.value.registry_id
│     ├────────────────
│     │ each.value.registry_id is "/registries/5"
│ 
│ Inappropriate value for attribute "registry_id": a number is required.
╵
  • Provider Version 3.10.12
  • Terraform Version 1.9.2
  • Harbor Version 2.10.0

q-b avatar Aug 01 '24 13:08 q-b