From 08cba768c95e8eed759b3e33a30fdf282a40b40c Mon Sep 17 00:00:00 2001 From: Estelle Soulard Date: Wed, 26 Nov 2025 09:25:08 +0100 Subject: [PATCH] tests(iam): fix conflicting user test --- .../data-source-user-basic.cassette.yaml | 332 +++++++++++------- .../iam/testdata/user-member.cassette.yaml | 184 +++++----- internal/services/iam/testfuncs/checks.go | 34 +- .../services/iam/user_data_source_test.go | 9 +- internal/services/iam/user_test.go | 44 +-- 5 files changed, 348 insertions(+), 255 deletions(-) diff --git a/internal/services/iam/testdata/data-source-user-basic.cassette.yaml b/internal/services/iam/testdata/data-source-user-basic.cassette.yaml index e21916f4f6..03f2a8bfd3 100644 --- a/internal/services/iam/testdata/data-source-user-basic.cassette.yaml +++ b/internal/services/iam/testdata/data-source-user-basic.cassette.yaml @@ -6,77 +6,68 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 0 + content_length: 279 host: api.scaleway.com - form: - order_by: - - created_at_asc - organization_id: - - 105bdce1-64c0-48ab-899d-868455867ecf - page: - - "1" - type: - - unknown_type + body: "{\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"tags\":[],\"member\":{\"email\":\"testiamuserbasic@scaleway.com\",\"send_password_email\":false,\"send_welcome_email\":false,\"username\":\"testiamuserbasic\",\"password\":\"\",\"first_name\":\"\",\"last_name\":\"\",\"phone_number\":\"\",\"locale\":\"\"}}" headers: + Content-Type: + - application/json User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users?order_by=created_at_asc&organization_id=11111111-1111-1111-1111-111111111111&page=1&type=unknown_type - method: GET + url: https://api.scaleway.com/iam/v1alpha1/users + method: POST response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 4420 - body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-10-28T05:00:28.599503Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-28T05:00:28.621017Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-11-17T16:31:30.143175Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-17T16:31:30.160634Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":8}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "4420" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:49 GMT + - Mon, 01 Dec 2025 14:26:31 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 9145199c-35bc-44e0-b94a-ae50d0aa53e1 + - 02c75ee3-8546-43fe-87d2-7d2243090560 status: 200 OK code: 200 - duration: 110.757854ms + duration: 672.61366ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 253 + content_length: 0 host: api.scaleway.com - body: "{\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"tags\":[],\"member\":{\"email\":\"foo@scaleway.com\",\"send_password_email\":false,\"send_welcome_email\":false,\"username\":\"foo\",\"password\":\"\",\"first_name\":\"\",\"last_name\":\"\",\"phone_number\":\"\",\"locale\":\"\"}}" headers: - Content-Type: - - application/json User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users - method: POST + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 + method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "481" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:50 GMT + - Mon, 01 Dec 2025 14:26:31 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 0768d7e0-c9e5-4702-846c-da17d29f1751 + - 128b49e2-65c2-4531-8d5c-c382d26cf232 status: 200 OK code: 200 - duration: 365.262214ms + duration: 236.546508ms - id: 2 request: proto: HTTP/1.1 @@ -84,31 +75,40 @@ interactions: proto_minor: 1 content_length: 0 host: api.scaleway.com + form: + order_by: + - created_at_asc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + page: + - "1" + type: + - unknown_type headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users?order_by=created_at_asc&organization_id=11111111-1111-1111-1111-111111111111&page=1&type=unknown_type method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 4929 + body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-12-01T10:31:56.679440Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T10:31:56.689528Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-12-01T13:45:34.074719Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T13:45:34.094651Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":9}" headers: Content-Length: - - "481" + - "4929" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:50 GMT + - Mon, 01 Dec 2025 14:26:31 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 738796d9-1dc9-4d69-b1dc-faa01cd9a3c2 + - c058ec87-38ec-4bf3-acfe-61704321545d status: 200 OK code: 200 - duration: 79.935915ms + duration: 47.689374ms - id: 3 request: proto: HTTP/1.1 @@ -119,28 +119,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "481" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:50 GMT + - Mon, 01 Dec 2025 14:26:31 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 4228b49d-18c4-4f60-9302-3c1491cd8def + - 2ae87c8f-f1ca-44e8-86ac-ce3913fc989b status: 200 OK code: 200 - duration: 55.170905ms + duration: 237.246374ms - id: 4 request: proto: HTTP/1.1 @@ -151,28 +151,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "481" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:51 GMT + - Mon, 01 Dec 2025 14:26:32 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 149e8ea6-f3fe-493a-a8cb-33fd35f37960 + - 8d36d6f9-13a5-411d-b547-d93fb3389bb3 status: 200 OK code: 200 - duration: 77.838381ms + duration: 173.366242ms - id: 5 request: proto: HTTP/1.1 @@ -183,29 +183,61 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/ef29ce05-3f2b-4fa0-a259-d76110850d57 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 565 - body: "{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "565" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:51 GMT + - Mon, 01 Dec 2025 14:26:32 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 7fac016b-7c92-449b-8986-6d8f74405ffd + - 982b1105-33b8-4f43-9975-b0e683693733 status: 200 OK code: 200 - duration: 177.823505ms + duration: 225.812665ms - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + headers: + Content-Length: + - "507" + Content-Type: + - application/json + Date: + - Mon, 01 Dec 2025 14:26:32 GMT + Server: + - Scaleway API Gateway (fr-par-1;edge01) + X-Request-Id: + - 90d3b6d9-5a88-4706-9cfc-c082ebabc4a4 + status: 200 OK + code: 200 + duration: 51.855903ms +- id: 7 request: proto: HTTP/1.1 proto_major: 1 @@ -230,23 +262,23 @@ interactions: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 4903 - body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-10-28T05:00:28.599503Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-28T05:00:28.621017Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-11-17T16:31:30.143175Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-17T16:31:30.160634Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":9}" + content_length: 4929 + body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-12-01T10:31:56.679440Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T10:31:56.689528Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-12-01T13:45:34.074719Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T13:45:34.094651Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":9}" headers: Content-Length: - - "4903" + - "4929" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:51 GMT + - Mon, 01 Dec 2025 14:26:32 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 5f1a0a50-7f59-44b4-b16e-49c19933e85b + - 4832a1b4-f600-46af-8aef-19bcf1dc25f9 status: 200 OK code: 200 - duration: 70.094181ms -- id: 7 + duration: 207.958311ms +- id: 8 request: proto: HTTP/1.1 proto_major: 1 @@ -256,29 +288,29 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "481" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:51 GMT + - Mon, 01 Dec 2025 14:26:33 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - d54edbbb-d7be-4da9-9212-1fa3eba49313 + - d1bda282-e296-435d-b39a-5fb0809e91b9 status: 200 OK code: 200 - duration: 52.223111ms -- id: 8 + duration: 202.835038ms +- id: 9 request: proto: HTTP/1.1 proto_major: 1 @@ -303,23 +335,23 @@ interactions: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 4903 - body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-10-28T05:00:28.599503Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-28T05:00:28.621017Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-11-17T16:31:30.143175Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-17T16:31:30.160634Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":9}" + content_length: 4929 + body: "{\"users\":[{\"id\":\"ef29ce05-3f2b-4fa0-a259-d76110850d57\", \"email\":\"hashicorp@scaleway.com\", \"username\":\"hashicorp@scaleway.com\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"fr_FR\", \"created_at\":\"2022-03-29T11:44:54.791271Z\", \"updated_at\":\"2025-03-05T14:31:18.088783Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":false, \"last_login_at\":\"2024-06-18T21:39:22.182798Z\", \"type\":\"owner\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"afa9fc32-9d43-417d-9ca0-a4ed6edf27a1\", \"tags\":[], \"locked\":false}, {\"id\":\"84d20ae1-9650-419a-ab74-7ab09b6262e0\", \"email\":\"developer-tools-team@scaleway.com\", \"username\":\"developer-tools-team@scaleway.com\", \"first_name\":\"Developper Tools\", \"last_name\":\"TEAM\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2023-01-23T15:16:01.748877Z\", \"updated_at\":\"2025-06-23T13:16:39.476255Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"ee474852-1f90-4cc1-bad0-4a17998c51e7\", \"email\":\"jremy@scaleway.com\", \"username\":\"jremy@scaleway.com\", \"first_name\":\"Jonathan\", \"last_name\":\"REMY\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-01-17T13:14:30.940996Z\", \"updated_at\":\"2025-12-01T10:31:56.679440Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T10:31:56.689528Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"88b4dde1-f3d4-478a-a281-784d53399a30\", \"email\":\"rleone@scaleway.com\", \"username\":\"rleone@scaleway.com\", \"first_name\":\"Rémy\", \"last_name\":\"LEONE\", \"phone_number\":\"+33667564022\", \"locale\":\"fr_FR\", \"created_at\":\"2024-01-18T09:30:48.009812Z\", \"updated_at\":\"2025-10-29T13:41:56.438633Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-29T13:40:17.341551Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"d8e03283-0413-4305-850a-4cbfc4caaba8\", \"email\":\"lmasson@scaleway.com\", \"username\":\"lmasson@scaleway.com\", \"first_name\":\"Laure\", \"last_name\":\"MASSON\", \"phone_number\":\"+33646316333\", \"locale\":\"en_US\", \"created_at\":\"2024-01-18T09:33:00.754759Z\", \"updated_at\":\"2025-11-09T16:59:42.564500Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-09T16:59:42.587164Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"a893a7b8-07d0-4258-b70b-b4b90d6c254d\", \"email\":\"yfodil@scaleway.com\", \"username\":\"yfodil@scaleway.com\", \"first_name\":\"Yacine\", \"last_name\":\"FODIL\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2024-04-10T13:53:57.102549Z\", \"updated_at\":\"2025-10-23T11:46:41.138432Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-10-23T11:46:41.166526Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"29c74dc1-87e7-4c49-91a1-0ad5540ecdd7\", \"email\":\"lmarabese@scaleway.com\", \"username\":\"lmarabese@scaleway.com\", \"first_name\":\"Leïla\", \"last_name\":\"MARABESE\", \"phone_number\":\"+33648006380\", \"locale\":\"en_US\", \"created_at\":\"2025-04-01T14:29:15.372836Z\", \"updated_at\":\"2025-11-06T17:33:13.755601Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-11-06T17:33:13.771888Z\", \"type\":\"member\", \"two_factor_enabled\":true, \"status\":\"activated\", \"mfa\":true, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\", \"email\":\"esoulard@scaleway.com\", \"username\":\"esoulard@scaleway.com\", \"first_name\":\"Estelle\", \"last_name\":\"Soulard\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-10-27T15:50:38.591562Z\", \"updated_at\":\"2025-12-01T13:45:34.074719Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":\"2025-12-01T13:45:34.094651Z\", \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}, {\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}], \"total_count\":9}" headers: Content-Length: - - "4903" + - "4929" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:52 GMT + - Mon, 01 Dec 2025 14:26:33 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 58655104-1ee1-4a4e-a0db-cc712e19fdbd + - 61adbc47-6e22-4272-849f-ec41a5363c2c status: 200 OK code: 200 - duration: 52.520265ms -- id: 9 + duration: 47.633958ms +- id: 10 request: proto: HTTP/1.1 proto_major: 1 @@ -329,29 +361,59 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 507 + body: "{\"id\":\"401b1f21-5200-41d2-b024-a5de034430d2\", \"email\":\"testiamuserbasic@scaleway.com\", \"username\":\"testiamuserbasic\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:26:31.314936Z\", \"updated_at\":\"2025-12-01T14:26:31.314936Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "481" + - "507" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:52 GMT + - Mon, 01 Dec 2025 14:26:33 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 4c8225f5-6177-4b0b-8375-7272bbf52ca8 + - ea1c2fb2-b3b7-470d-bf37-abfec33d7d5b status: 200 OK code: 200 - duration: 75.511709ms -- id: 10 + duration: 84.611824ms +- id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Mon, 01 Dec 2025 14:26:33 GMT + Server: + - Scaleway API Gateway (fr-par-1;edge01) + X-Request-Id: + - 7dda7db7-27df-4c2a-8703-6d94293fa565 + status: 204 No Content + code: 204 + duration: 293.168747ms +- id: 12 request: proto: HTTP/1.1 proto_major: 1 @@ -361,29 +423,29 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 481 - body: "{\"id\":\"4560f330-0171-4c97-b231-e25bf6afd724\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:50.595660Z\", \"updated_at\":\"2025-11-17T17:10:50.595660Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 125 + body: "{\"message\":\"resource is not found\",\"resource\":\"user\",\"resource_id\":\"401b1f21-5200-41d2-b024-a5de034430d2\",\"type\":\"not_found\"}" headers: Content-Length: - - "481" + - "125" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:52 GMT + - Mon, 01 Dec 2025 14:26:33 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - 9c39d205-7064-43f3-b433-18fb3b99a1c2 - status: 200 OK - code: 200 - duration: 177.236134ms -- id: 11 + - 01d2d4b8-c54d-4252-85b7-28652911cdd7 + status: 404 Not Found + code: 404 + duration: 36.582937ms +- id: 13 request: proto: HTTP/1.1 proto_major: 1 @@ -393,23 +455,57 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/4560f330-0171-4c97-b231-e25bf6afd724 - method: DELETE + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 + method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 + content_length: 125 + body: "{\"message\":\"resource is not found\",\"resource\":\"user\",\"resource_id\":\"401b1f21-5200-41d2-b024-a5de034430d2\",\"type\":\"not_found\"}" + headers: + Content-Length: + - "125" + Content-Type: + - application/json + Date: + - Mon, 01 Dec 2025 14:26:33 GMT + Server: + - Scaleway API Gateway (fr-par-1;edge01) + X-Request-Id: + - be0736b7-f9e1-4acd-814c-9b1be9b06b59 + status: 404 Not Found + code: 404 + duration: 32.523711ms +- id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 content_length: 0 - body: "" + host: api.scaleway.com + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/users/401b1f21-5200-41d2-b024-a5de034430d2 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 125 + body: "{\"message\":\"resource is not found\",\"resource\":\"user\",\"resource_id\":\"401b1f21-5200-41d2-b024-a5de034430d2\",\"type\":\"not_found\"}" headers: + Content-Length: + - "125" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:53 GMT + - Mon, 01 Dec 2025 14:26:33 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge01) X-Request-Id: - - f504e93e-beb5-46db-8f6f-9ce0f75bf32c - status: 204 No Content - code: 204 - duration: 258.781486ms + - 14da0699-953f-4d18-b1b8-a0233e8ef69b + status: 404 Not Found + code: 404 + duration: 96.485564ms diff --git a/internal/services/iam/testdata/user-member.cassette.yaml b/internal/services/iam/testdata/user-member.cassette.yaml index 76efa42222..d8ec655c25 100644 --- a/internal/services/iam/testdata/user-member.cassette.yaml +++ b/internal/services/iam/testdata/user-member.cassette.yaml @@ -6,9 +6,9 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 281 + content_length: 309 host: api.scaleway.com - body: "{\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"tags\":[],\"member\":{\"email\":\"foo@scaleway.com\",\"send_password_email\":false,\"send_welcome_email\":false,\"username\":\"foo\",\"password\":\"Firstaccesspsw123\",\"first_name\":\"Foo\",\"last_name\":\"Bar\",\"phone_number\":\"\",\"locale\":\"en_US\"}}" + body: "{\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"tags\":[],\"member\":{\"email\":\"testiamusermember@scaleway.com\",\"send_password_email\":false,\"send_welcome_email\":false,\"username\":\"testiamusermember\",\"password\":\"Firstaccesspsw123\",\"first_name\":\"Foo\",\"last_name\":\"Bar\",\"phone_number\":\"\",\"locale\":\"en_US\"}}" headers: Content-Type: - application/json @@ -20,22 +20,22 @@ interactions: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:30 GMT + - Mon, 01 Dec 2025 14:06:08 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - eea130a5-50df-434b-9369-e12abaacfefe + - 22cf59af-c772-46c6-900f-09d98690e9c0 status: 200 OK code: 200 - duration: 522.102035ms + duration: 717.80119ms - id: 1 request: proto: HTTP/1.1 @@ -46,28 +46,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:30 GMT + - Mon, 01 Dec 2025 14:06:08 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 999e7b97-dc14-403d-af61-5ec55b03e4f3 + - 656f4a7d-d399-4245-91c9-86e5b9caf65f status: 200 OK code: 200 - duration: 185.775495ms + duration: 252.955891ms - id: 2 request: proto: HTTP/1.1 @@ -78,28 +78,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:31 GMT + - Mon, 01 Dec 2025 14:06:08 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 11bf6ca4-cf8d-4fe8-9f02-777cfa60ee81 + - d420602c-8515-484d-98d8-414ef182f5fc status: 200 OK code: 200 - duration: 167.757978ms + duration: 312.712257ms - id: 3 request: proto: HTTP/1.1 @@ -110,28 +110,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:32 GMT + - Mon, 01 Dec 2025 14:06:09 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - f606184b-9fa5-473e-950f-8bc6612ba8a4 + - fc92d6f2-18e3-421f-9e8d-3dd0ad5a2e41 status: 200 OK code: 200 - duration: 161.952063ms + duration: 185.148347ms - id: 4 request: proto: HTTP/1.1 @@ -142,28 +142,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:32 GMT + - Mon, 01 Dec 2025 14:06:09 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 530b9d63-4432-449f-81cc-8d39c7587f59 + - efc6f592-e3db-4a29-baeb-7763860671dc status: 200 OK code: 200 - duration: 186.404886ms + duration: 160.094811ms - id: 5 request: proto: HTTP/1.1 @@ -174,28 +174,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 487 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foo@scaleway.com\", \"username\":\"foo\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" + content_length: 515 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"testiamusermember@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"Foo\", \"last_name\":\"Bar\", \"phone_number\":\"\", \"locale\":\"en_US\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[], \"locked\":false}" headers: Content-Length: - - "487" + - "515" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:33 GMT + - Mon, 01 Dec 2025 14:06:09 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 5c6166be-3b79-4756-9cbe-5e518f53034c + - 98d55a8a-8deb-4a58-8b30-dff6327d1f00 status: 200 OK code: 200 - duration: 49.904415ms + duration: 329.738332ms - id: 6 request: proto: HTTP/1.1 @@ -209,28 +209,28 @@ interactions: - application/json User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: PATCH response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 - content_length: 509 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foobar@scaleway.com\", \"username\":\"foo\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:30.646958Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" + content_length: 523 + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"foobar@scaleway.com\", \"username\":\"testiamusermember\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:07.940664Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" headers: Content-Length: - - "509" + - "523" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:33 GMT + - Mon, 01 Dec 2025 14:06:10 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 5632bc59-a22a-41ba-93d4-c4c374727ae0 + - 2326af58-cbe0-469d-b1ac-e2b032ac64e9 status: 200 OK code: 200 - duration: 193.494172ms + duration: 153.025371ms - id: 7 request: proto: HTTP/1.1 @@ -244,28 +244,28 @@ interactions: - application/json User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e/update-username + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027/update-username method: POST response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 content_length: 512 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:33.487240Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:10.130099Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" headers: Content-Length: - "512" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:33 GMT + - Mon, 01 Dec 2025 14:06:10 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 01b03a21-774c-457a-b166-b75b7d64a780 + - 5c9c1cae-1127-4a9b-8b93-733881f19f51 status: 200 OK code: 200 - duration: 182.794631ms + duration: 138.373963ms - id: 8 request: proto: HTTP/1.1 @@ -276,28 +276,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 content_length: 512 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:33.662378Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:10.256691Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" headers: Content-Length: - "512" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:33 GMT + - Mon, 01 Dec 2025 14:06:10 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 7266fdcd-2021-4be1-9f09-27c23f4aadbe + - e154d17e-7b0c-483d-967d-d65ece35cadb status: 200 OK code: 200 - duration: 158.746741ms + duration: 319.463656ms - id: 9 request: proto: HTTP/1.1 @@ -308,28 +308,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 content_length: 512 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:33.662378Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:10.256691Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" headers: Content-Length: - "512" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:34 GMT + - Mon, 01 Dec 2025 14:06:11 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - a1253211-9d82-45e5-82cd-0291e143ba74 + - c5a32e0d-5269-4f93-87df-dfa428b2aebf status: 200 OK code: 200 - duration: 196.072373ms + duration: 453.462537ms - id: 10 request: proto: HTTP/1.1 @@ -340,28 +340,28 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 content_length: 512 - body: "{\"id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-11-17T17:10:30.646958Z\", \"updated_at\":\"2025-11-17T17:10:33.662378Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" + body: "{\"id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\", \"email\":\"foobar@scaleway.com\", \"username\":\"foobar\", \"first_name\":\"\", \"last_name\":\"Baz\", \"phone_number\":\"+33112345678\", \"locale\":\"fr_FR\", \"created_at\":\"2025-12-01T14:06:07.940664Z\", \"updated_at\":\"2025-12-01T14:06:10.256691Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"deletable\":true, \"last_login_at\":null, \"type\":\"member\", \"two_factor_enabled\":false, \"status\":\"activated\", \"mfa\":false, \"account_root_user_id\":\"\", \"tags\":[\"tf_tests\"], \"locked\":false}" headers: Content-Length: - "512" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:35 GMT + - Mon, 01 Dec 2025 14:06:11 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 6836c34e-dabc-468e-99c2-ff5c7d496fe2 + - baaab9a1-1599-4a19-b16e-f35df3e0e610 status: 200 OK code: 200 - duration: 179.172897ms + duration: 440.223069ms - id: 11 request: proto: HTTP/1.1 @@ -372,7 +372,7 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: DELETE response: proto: HTTP/2.0 @@ -384,14 +384,14 @@ interactions: Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:36 GMT + - Mon, 01 Dec 2025 14:06:12 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 702d01d5-8cb9-4352-86fc-e62331526b93 + - fbd976ee-7def-4728-b6e8-bee84acd83ae status: 204 No Content code: 204 - duration: 316.494785ms + duration: 263.355344ms - id: 12 request: proto: HTTP/1.1 @@ -402,25 +402,25 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests - url: https://api.scaleway.com/iam/v1alpha1/users/02c5864a-ca2b-4d47-9311-ca4e593f825e + url: https://api.scaleway.com/iam/v1alpha1/users/eea07cdb-c3e5-4727-85cc-03cd11e58027 method: GET response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 content_length: 125 - body: "{\"message\":\"resource is not found\",\"resource\":\"user\",\"resource_id\":\"02c5864a-ca2b-4d47-9311-ca4e593f825e\",\"type\":\"not_found\"}" + body: "{\"message\":\"resource is not found\",\"resource\":\"user\",\"resource_id\":\"eea07cdb-c3e5-4727-85cc-03cd11e58027\",\"type\":\"not_found\"}" headers: Content-Length: - "125" Content-Type: - application/json Date: - - Mon, 17 Nov 2025 17:10:36 GMT + - Mon, 01 Dec 2025 14:06:12 GMT Server: - - Scaleway API Gateway (fr-par-2;edge03) + - Scaleway API Gateway (fr-par-1;edge02) X-Request-Id: - - 985f550f-61eb-49f8-b7ce-6f73600a056e + - 657f6ae3-c0b5-4a1a-8d62-98fdb397e9fc status: 404 Not Found code: 404 - duration: 57.872509ms + duration: 31.289252ms diff --git a/internal/services/iam/testfuncs/checks.go b/internal/services/iam/testfuncs/checks.go index 9568755bd3..7296424df0 100644 --- a/internal/services/iam/testfuncs/checks.go +++ b/internal/services/iam/testfuncs/checks.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" - iam2 "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" + iamSDK "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" "github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest" "github.com/scaleway/terraform-provider-scaleway/v2/internal/httperrors" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam" @@ -27,7 +27,7 @@ func CheckSSHKeyDestroy(tt *acctest.TestTools) resource.TestCheckFunc { continue } - _, err := api.GetSSHKey(&iam2.GetSSHKeyRequest{ + _, err := api.GetSSHKey(&iamSDK.GetSSHKeyRequest{ SSHKeyID: rs.Primary.ID, }) @@ -55,7 +55,7 @@ func CheckSSHKeyExists(tt *acctest.TestTools, n string) resource.TestCheckFunc { iamAPI := iam.NewAPI(tt.Meta) - _, err := iamAPI.GetSSHKey(&iam2.GetSSHKeyRequest{ + _, err := iamAPI.GetSSHKey(&iamSDK.GetSSHKeyRequest{ SSHKeyID: rs.Primary.ID, }) if err != nil { @@ -65,3 +65,31 @@ func CheckSSHKeyExists(tt *acctest.TestTools, n string) resource.TestCheckFunc { return nil } } + +func CheckUserDestroyed(tt *acctest.TestTools) resource.TestCheckFunc { + return func(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "scaleway_iam_user" { + continue + } + + iamAPI := iam.NewAPI(tt.Meta) + + _, err := iamAPI.GetUser(&iamSDK.GetUserRequest{ + UserID: rs.Primary.ID, + }) + + // If no error resource still exist + if err == nil { + return fmt.Errorf("resource %s(%s) still exist", rs.Type, rs.Primary.ID) + } + + // Unexpected api error we return it + if !httperrors.Is404(err) { + return err + } + } + + return nil + } +} diff --git a/internal/services/iam/user_data_source_test.go b/internal/services/iam/user_data_source_test.go index a483ddaa34..c799411750 100644 --- a/internal/services/iam/user_data_source_test.go +++ b/internal/services/iam/user_data_source_test.go @@ -9,6 +9,7 @@ import ( iamSDK "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" "github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam" + iamchecks "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam/testfuncs" ) func TestAccDataSourceUser_Basic(t *testing.T) { @@ -17,12 +18,13 @@ func TestAccDataSourceUser_Basic(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ ProtoV6ProviderFactories: tt.ProviderFactories, + CheckDestroy: iamchecks.CheckUserDestroyed(tt), Steps: []resource.TestStep{ { Config: ` resource "scaleway_iam_user" "main" { - email = "foo@scaleway.com" - username = "foo" + email = "testiamuserbasic@scaleway.com" + username = "testiamuserbasic" } data "scaleway_iam_user" "by_id" { @@ -30,8 +32,7 @@ func TestAccDataSourceUser_Basic(t *testing.T) { } data "scaleway_iam_user" "by_email" { - email = "hashicorp@scaleway.com" - organization_id = "105bdce1-64c0-48ab-899d-868455867ecf" + email = scaleway_iam_user.main.email } `, Check: resource.ComposeTestCheckFunc( diff --git a/internal/services/iam/user_test.go b/internal/services/iam/user_test.go index 7e544ef50a..4739b6b797 100644 --- a/internal/services/iam/user_test.go +++ b/internal/services/iam/user_test.go @@ -1,15 +1,11 @@ package iam_test import ( - "fmt" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - iamSDK "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" "github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest" - "github.com/scaleway/terraform-provider-scaleway/v2/internal/httperrors" - "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam" + iamchecks "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam/testfuncs" ) func TestAccUser_Member(t *testing.T) { @@ -18,13 +14,13 @@ func TestAccUser_Member(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ ProtoV6ProviderFactories: tt.ProviderFactories, - CheckDestroy: isUserDestroyed(tt), + CheckDestroy: iamchecks.CheckUserDestroyed(tt), Steps: []resource.TestStep{ { Config: ` resource "scaleway_iam_user" "member_user" { - email = "foo@scaleway.com" - username = "foo" + email = "testiamusermember@scaleway.com" + username = "testiamusermember" first_name = "Foo" last_name = "Bar" password = "Firstaccesspsw123" @@ -34,8 +30,8 @@ func TestAccUser_Member(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckIamUserExists(tt, "scaleway_iam_user.member_user"), acctest.CheckResourceAttrUUID("scaleway_iam_user.member_user", "id"), - resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "email", "foo@scaleway.com"), - resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "username", "foo"), + resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "email", "testiamusermember@scaleway.com"), + resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "username", "testiamusermember"), resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "first_name", "Foo"), resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "last_name", "Bar"), resource.TestCheckResourceAttr("scaleway_iam_user.member_user", "password", "Firstaccesspsw123"), @@ -77,31 +73,3 @@ func TestAccUser_Member(t *testing.T) { }, }) } - -func isUserDestroyed(tt *acctest.TestTools) resource.TestCheckFunc { - return func(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "scaleway_iam_user" { - continue - } - - iamAPI := iam.NewAPI(tt.Meta) - - _, err := iamAPI.GetUser(&iamSDK.GetUserRequest{ - UserID: rs.Primary.ID, - }) - - // If no error resource still exist - if err == nil { - return fmt.Errorf("resource %s(%s) still exist", rs.Type, rs.Primary.ID) - } - - // Unexpected api error we return it - if !httperrors.Is404(err) { - return err - } - } - - return nil - } -}