Skip to content

Error when querying users: cannot unmarshal string into Go struct field .users of type bool #3369

Closed

Description

@winiciusallan

When fetching for an user using terraform openstack provider the following error appears

Error: Unable to query openstack_identity_user_v3: json: cannot unmarshal string into Go struct field .users of type bool

The returned JSON from the API is the following one

2025-05-08T13:38:05.863-0300 [INFO]  provider.terraform-provider-openstack: 2025/05/08 13:38:05 [DEBUG] OpenStack Response Body: {
  "links": {
    "next": null,
    "previous": null,
    "self": "http://my.ip.com:5000/v3/users?domain_id=45c8d81c02294128a56cd8cf18cc567d\u0026name=winicius.silva"
  },
  "users": [
    {
      "description": "foo bar",
      "domain_id": "45c8d81c02294128a56cd8cf18cc567d",
      "email": "[email protected]",
      "enabled": "True",
      "id": "9b2f6152672cc408db3ef74844d266425b0559aea8a8547166fbcf4afdddb5b9",
      "links": {
        "self": "http://my.ip.com:5000/v3/users/9b2f6152672cc408db3ef74844d266425b0559aea8a8547166fbcf4afdddb5b9"
      },
      "name": "winicius.silva",
      "options": {},
      "password_expires_at": null
    }
  ]
}: timestamp=2025-05-08T13:38:05.863-0300

Well, I think the API is broken when trying to unmarshall the "enabled" value from string to bool. Searching in issues list, I've found a related issue #3147.

Activity

  1. winiciusallan commented on May 8, 2025

    @winiciusallan
    ContributorAuthor

    Any chance to be related to the commit from yesterday, @kayrus ? My investigations do not point to an error in provider.

  2. kayrus commented on May 8, 2025

    @kayrus
    Contributor

    @winiciusallan I believe this is an issue in keystone

  3. kayrus commented on May 23, 2025

    @kayrus
    Contributor
  4. winiciusallan commented on May 23, 2025

    @winiciusallan
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions