diff --git a/scaleway/resource_iam_api_key.go b/scaleway/resource_iam_api_key.go index a0e908794d..eef67dc695 100644 --- a/scaleway/resource_iam_api_key.go +++ b/scaleway/resource_iam_api_key.go @@ -56,6 +56,7 @@ func resourceScalewayIamAPIKey() *schema.Resource { "application_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, Description: "ID of the application attached to the api key", ConflictsWith: []string{"user_id"}, ValidateFunc: validationUUID(), diff --git a/scaleway/resource_iam_api_key_test.go b/scaleway/resource_iam_api_key_test.go index 4a70ee39a9..f9b7b9658f 100644 --- a/scaleway/resource_iam_api_key_test.go +++ b/scaleway/resource_iam_api_key_test.go @@ -105,6 +105,70 @@ func TestAccScalewayIamApiKey_WithApplication(t *testing.T) { }) } +func TestAccScalewayIamApiKey_WithApplicationChange(t *testing.T) { + tt := NewTestTools(t) + defer tt.Cleanup() + resource.ParallelTest(t, resource.TestCase{ + ProviderFactories: tt.ProviderFactories, + CheckDestroy: resource.ComposeTestCheckFunc( + testAccCheckScalewayIamAPIKeyDestroy(tt), + testAccCheckScalewayIamApplicationDestroy(tt), + ), + Steps: []resource.TestStep{ + { + Config: ` + resource "scaleway_iam_application" "main" { + name = "tf_tests_api_key_app_change" + } + + resource "scaleway_iam_application" "main2" { + name = "tf_tests_api_key_app_change2" + } + + resource "scaleway_iam_api_key" "main" { + application_id = scaleway_iam_application.main.id + description = "tf_tests_with_application_change" + } + `, + Check: resource.ComposeTestCheckFunc( + testAccCheckScalewayIamAPIKeyExists(tt, "scaleway_iam_api_key.main"), + resource.TestCheckResourceAttrPair("scaleway_iam_api_key.main", "application_id", "scaleway_iam_application.main", "id"), + resource.TestCheckResourceAttr("scaleway_iam_api_key.main", "description", "tf_tests_with_application_change"), + resource.TestCheckResourceAttrSet("scaleway_iam_api_key.main", "secret_key"), + ), + }, + { + Config: ` + resource "scaleway_iam_application" "main" { + name = "tf_tests_api_key_app_change" + } + + resource "scaleway_iam_application" "main2" { + name = "tf_tests_api_key_app_change2" + } + + resource "scaleway_iam_api_key" "main" { + application_id = scaleway_iam_application.main2.id + description = "tf_tests_with_application_change" + } + `, + Check: resource.ComposeTestCheckFunc( + testAccCheckScalewayIamAPIKeyExists(tt, "scaleway_iam_api_key.main"), + resource.TestCheckResourceAttrPair("scaleway_iam_api_key.main", "application_id", "scaleway_iam_application.main2", "id"), + resource.TestCheckResourceAttr("scaleway_iam_api_key.main", "description", "tf_tests_with_application_change"), + resource.TestCheckResourceAttrSet("scaleway_iam_api_key.main", "secret_key"), + ), + }, + { + ResourceName: "scaleway_iam_api_key.main", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"secret_key"}, + }, + }, + }) +} + func TestAccScalewayIamApiKey_Expires(t *testing.T) { tt := NewTestTools(t) defer tt.Cleanup() diff --git a/scaleway/testdata/iam-api-key-with-application-change.cassette.yaml b/scaleway/testdata/iam-api-key-with-application-change.cassette.yaml new file mode 100644 index 0000000000..b6a69a4496 --- /dev/null +++ b/scaleway/testdata/iam-api-key-with-application-change.cassette.yaml @@ -0,0 +1,894 @@ +--- +version: 1 +interactions: +- request: + body: '{"name":"tf_tests_api_key_app_change2","organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":""}' + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications + method: POST + response: + body: '{"created_at":"2023-06-26T08:47:36.928327Z","description":"","editable":true,"id":"44b332db-1232-482c-b217-8eb1870763d1","name":"tf_tests_api_key_app_change2","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.928327Z"}' + headers: + Content-Length: + - "282" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:36 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 0c2c8786-8986-468e-8e24-b8f572da4c01 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"tf_tests_api_key_app_change","organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":""}' + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications + method: POST + response: + body: '{"created_at":"2023-06-26T08:47:36.929823Z","description":"","editable":true,"id":"35fd591b-dfe1-49a8-927b-155354a3333f","name":"tf_tests_api_key_app_change","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.929823Z"}' + headers: + Content-Length: + - "281" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:36 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 399b075b-ce76-424c-bda8-b6fa1d7de4e0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.929823Z","description":"","editable":true,"id":"35fd591b-dfe1-49a8-927b-155354a3333f","name":"tf_tests_api_key_app_change","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.929823Z"}' + headers: + Content-Length: + - "281" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:36 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - c948773c-9536-4fd9-9c6e-6fb063526f08 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.928327Z","description":"","editable":true,"id":"44b332db-1232-482c-b217-8eb1870763d1","name":"tf_tests_api_key_app_change2","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.928327Z"}' + headers: + Content-Length: + - "282" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:36 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - d6d78a1d-933c-47f3-9d90-c19c37ff001c + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","expires_at":null,"default_project_id":null,"description":"tf_tests_with_application_change"}' + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys + method: POST + response: + body: '{"access_key":"SCW79WFVSMR8DQZAQ8HQ","application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","created_at":"2023-06-26T08:47:37.127426Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:37.127426Z"}' + headers: + Content-Length: + - "411" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - a9293578-35b4-4ba9-9eb9-97e004ca4c9d + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW79WFVSMR8DQZAQ8HQ + method: GET + response: + body: '{"access_key":"SCW79WFVSMR8DQZAQ8HQ","application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","created_at":"2023-06-26T08:47:37.127426Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:37.127426Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - aff0d219-2fb9-4e88-a744-3a5b86ce69f7 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW79WFVSMR8DQZAQ8HQ + method: GET + response: + body: '{"access_key":"SCW79WFVSMR8DQZAQ8HQ","application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","created_at":"2023-06-26T08:47:37.127426Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:37.127426Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 0fdc1069-8664-4fdf-a030-a90153042c69 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.928327Z","description":"","editable":true,"id":"44b332db-1232-482c-b217-8eb1870763d1","name":"tf_tests_api_key_app_change2","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.928327Z"}' + headers: + Content-Length: + - "282" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - f24417ac-7537-46d4-8fb3-37ba96f43160 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.929823Z","description":"","editable":true,"id":"35fd591b-dfe1-49a8-927b-155354a3333f","name":"tf_tests_api_key_app_change","nb_api_keys":1,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.929823Z"}' + headers: + Content-Length: + - "281" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 4bef9061-3b8f-4b0d-a4f7-7f0ed10334f6 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW79WFVSMR8DQZAQ8HQ + method: GET + response: + body: '{"access_key":"SCW79WFVSMR8DQZAQ8HQ","application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","created_at":"2023-06-26T08:47:37.127426Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:37.127426Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:37 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 8681baa5-8a74-4d6f-8d53-1dac73fc240b + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.928327Z","description":"","editable":true,"id":"44b332db-1232-482c-b217-8eb1870763d1","name":"tf_tests_api_key_app_change2","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.928327Z"}' + headers: + Content-Length: + - "282" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 4eaf41b6-e9eb-4608-98dd-dea4fa0f5db4 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.929823Z","description":"","editable":true,"id":"35fd591b-dfe1-49a8-927b-155354a3333f","name":"tf_tests_api_key_app_change","nb_api_keys":1,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.929823Z"}' + headers: + Content-Length: + - "281" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - db15866f-e3f3-4fe3-922d-40f786c42af7 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW79WFVSMR8DQZAQ8HQ + method: GET + response: + body: '{"access_key":"SCW79WFVSMR8DQZAQ8HQ","application_id":"35fd591b-dfe1-49a8-927b-155354a3333f","created_at":"2023-06-26T08:47:37.127426Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:37.127426Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - ac48db9e-f06b-4270-9f22-d93e9c3be0c0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW79WFVSMR8DQZAQ8HQ + method: DELETE + response: + body: "" + headers: + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 06579851-d8c3-4a27-bbc3-de79b45fef56 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"application_id":"44b332db-1232-482c-b217-8eb1870763d1","expires_at":null,"default_project_id":null,"description":"tf_tests_with_application_change"}' + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys + method: POST + response: + body: '{"access_key":"SCW0BPYE2F8P56Q7TDT4","application_id":"44b332db-1232-482c-b217-8eb1870763d1","created_at":"2023-06-26T08:47:38.857867Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:38.857867Z"}' + headers: + Content-Length: + - "411" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - ccb1bdfd-e75e-4234-8bce-3bfa8fd1ad8c + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: GET + response: + body: '{"access_key":"SCW0BPYE2F8P56Q7TDT4","application_id":"44b332db-1232-482c-b217-8eb1870763d1","created_at":"2023-06-26T08:47:38.857867Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:38.857867Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:38 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - c80001c3-011a-4598-a162-e0dadc231705 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: GET + response: + body: '{"access_key":"SCW0BPYE2F8P56Q7TDT4","application_id":"44b332db-1232-482c-b217-8eb1870763d1","created_at":"2023-06-26T08:47:38.857867Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:38.857867Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:39 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 00f72d54-0a0f-4f81-9d89-ef7107d1e252 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.928327Z","description":"","editable":true,"id":"44b332db-1232-482c-b217-8eb1870763d1","name":"tf_tests_api_key_app_change2","nb_api_keys":1,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.928327Z"}' + headers: + Content-Length: + - "282" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:39 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 8d98b9c0-c17f-4af7-a395-fe8efbc02520 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: GET + response: + body: '{"created_at":"2023-06-26T08:47:36.929823Z","description":"","editable":true,"id":"35fd591b-dfe1-49a8-927b-155354a3333f","name":"tf_tests_api_key_app_change","nb_api_keys":0,"organization_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","updated_at":"2023-06-26T08:47:36.929823Z"}' + headers: + Content-Length: + - "281" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:39 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 8ae0be84-65be-4ebc-9510-57720a94c7c1 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: GET + response: + body: '{"access_key":"SCW0BPYE2F8P56Q7TDT4","application_id":"44b332db-1232-482c-b217-8eb1870763d1","created_at":"2023-06-26T08:47:38.857867Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:38.857867Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:39 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - f45c02eb-dc65-4a64-9023-40c3e6b9629c + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: GET + response: + body: '{"access_key":"SCW0BPYE2F8P56Q7TDT4","application_id":"44b332db-1232-482c-b217-8eb1870763d1","created_at":"2023-06-26T08:47:38.857867Z","creation_ip":"51.159.73.9","default_project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","description":"tf_tests_with_application_change","editable":true,"expires_at":null,"secret_key":"00000000-0000-0000-0000-000000000000","updated_at":"2023-06-26T08:47:38.857867Z"}' + headers: + Content-Length: + - "377" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:39 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 4a1d0f6d-5c5c-49b6-a0fd-22db13be0683 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: DELETE + response: + body: "" + headers: + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 8052b314-1903-490a-a465-98ceb0eb3802 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: DELETE + response: + body: "" + headers: + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 9c99ec89-76a5-49a8-bdda-ec47a36df29b + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: DELETE + response: + body: "" + headers: + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 775a29a5-a79d-45f0-bf10-b432bf54aba0 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCW0BPYE2F8P56Q7TDT4 + method: GET + response: + body: '{"message":"resource is not found","resource":"access_key","resource_id":"SCW0BPYE2F8P56Q7TDT4","type":"not_found"}' + headers: + Content-Length: + - "115" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 46218687-d86e-488c-a674-a5a65c178c2d + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/35fd591b-dfe1-49a8-927b-155354a3333f + method: GET + response: + body: '{"message":"resource is not found","resource":"iam_application","resource_id":"35fd591b-dfe1-49a8-927b-155354a3333f","type":"not_found"}' + headers: + Content-Length: + - "136" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - cfa20b9a-fc29-491c-af2f-18440fffd29b + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) terraform-provider/develop + terraform/terraform-tests + url: https://api.scaleway.com/iam/v1alpha1/applications/44b332db-1232-482c-b217-8eb1870763d1 + method: GET + response: + body: '{"message":"resource is not found","resource":"iam_application","resource_id":"44b332db-1232-482c-b217-8eb1870763d1","type":"not_found"}' + headers: + Content-Length: + - "136" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Mon, 26 Jun 2023 08:47:40 GMT + Server: + - Scaleway API-Gateway + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 8ab00b21-edaf-459f-9ff4-334ed769ac46 + status: 404 Not Found + code: 404 + duration: ""