diff --git a/.github/codecov.yml b/.github/codecov.yml index 09af99e88..d16e8fc9e 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -14,6 +14,10 @@ component_management: name: applesilicon paths: - internal/services/applesilicon/** + - component_id: audittrail + name: audittrail + paths: + - internal/services/audittrail/** - component_id: autoscaling name: autoscaling paths: diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index cd8a1acde..3624b3423 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -15,6 +15,7 @@ jobs: products: - account - applesilicon + - audittrail - az - baremetal - billing @@ -172,6 +173,7 @@ jobs: products: - account - applesilicon + - audittrail - az - baremetal - billing diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a2ab7f3ae..ada2b6129 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,6 +16,7 @@ jobs: products: - account - applesilicon + - audittrail - autoscaling - az - baremetal diff --git a/docs/data-sources/audit_trail_event.md b/docs/data-sources/audit_trail_event.md new file mode 100644 index 000000000..1e5490e05 --- /dev/null +++ b/docs/data-sources/audit_trail_event.md @@ -0,0 +1,100 @@ +--- +subcategory: "Audit Trail" +page_title: "Scaleway: scaleway_audit_trail_event" +--- + +# scaleway_audit_trail_event + +Use this data source to get a list of existing Audit Trail events. +For more information refer to the [Audit Trail API documentation](https://www.scaleway.com/en/developers/api/audit-trail/). + +## Example Usage + +```hcl +# Retrieve all audit trail events on the default organization +data "scaleway_audit_trail_event" "find_all" { + region = "fr-par" +} + +# Retrieve audit trail events on a specific organization +data "scaleway_audit_trail_event" "find_by_org" { + organization_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail events on a specific project +data "scaleway_audit_trail_event" "find_by_project" { + region = "fr-par" + project_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail events for a specific type of resource +data "scaleway_audit_trail_event" "find_by_resource_type" { + resource_type = "instance_server" +} + +# Retrieve audit trail for a specific resource +data "scaleway_audit_trail_event" "find_by_resource_id" { + resource_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail for a specific Scaleway product +data "scaleway_audit_trail_event" "find_by_product_name" { + region = "nl-ams" + product_name = "secret-manager" +} + +# Retrieve audit trail events with various filtering +data "scaleway_audit_trail_event" "find_with_filters" { + region = "fr-par" + service_name = "instance" + method_name = "CreateServer" + principal_id = "11111111-1111-1111-1111-111111111111" + source_ip = "192.0.2.1" + status = 200 + recorded_after = "2025-10-01T00:00:00Z" + recorded_before = "2025-12-31T23:59:59Z" + order_by = "recorded_at_desc" +} +``` + +## Argument Reference + +- `region` - (Optional) The [region](../guides/regions_and_zones.md#regions) you want to target. Defaults to the region specified in the [provider configuration](../index.md#region). +- `organization_id` - (Optional. Defaults to [provider](../index.md#organization_id) `organization_id`) ID of the Organization containing the Audit Trail events. +- `project_id` - (Optional) ID of the Project containing the Audit Trail events. +- `resource_type` - (Optional) Type of the scaleway resources associated with the listed events. Possible values are: `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `iam_saml`, `iam_saml_certificate`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization`, `account_project`, `instance_server`, `instance_placement_group`, `instance_security_group`, `instance_volume`, `instance_snapshot`, `instance_image`, `apple_silicon_server`, `baremetal_server`, `baremetal_setting`, `ipam_ip`, `sbs_volume`, `sbs_snapshot`, `load_balancer_lb`, `load_balancer_ip`, `load_balancer_frontend`, `load_balancer_backend`, `load_balancer_route`, `load_balancer_acl`, `load_balancer_certificate`, `sfs_filesystem`, or `vpc_private_network`. +- `resource_id` - (Optional) ID of the Scaleway resource associated with the listed events. +- `product_name` - (Optional) Name of the Scaleway product in a hyphenated format. +- `service_name` - (Optional) Name of the service of the API call performed. +- `method_name` - (Optional) Name of the method of the API call performed. +- `principal_id` - (Optional) ID of the User or IAM application at the origin of the event. +- `source_ip` - (Optional) IP address at the origin of the event. +- `status` - (Optional) HTTP status code of the request. +- `recorded_after` - (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default (Format ISO 8601). +- `recorded_before` - (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Must be later than recorded_after. Returns `now` by default (Format ISO 8601). +- `order_by` - (Optional) Defines the order in which events are returned. Possible values are `recorded_at_asc` and `recorded_at_desc`. Default value: `recorded_at_desc`. + + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +- `events` - List of Audit Trail events matching the requested criteria. + - `id` - ID of the event. (UUID format) + - `recorded_at` - Timestamp of the event. (RFC 3339 format) + - `locality` - Locality of the resource attached to the event. + - `principal_id` - ID of the user or IAM application at the origin of the event. + - `organization_id` - ID of the Organization containing the Audit Trail events. (UUID format) + - `project_id` - Project of the resource attached to the event. (UUID format) + - `source_ip` - IP address at the origin of the event. (IP address) + - `user_agent` - User Agent at the origin of the event. + - `product_name` - Scaleway product associated with the listed events in a hyphenated format. Possible values are: `secret-manager`, `key-manager`, `iam`, `kubernetes`, `account`, `apple-silicon`, `instance`, `baremetal`, `load-balancer`, or `edge-services`. + - `service_name` - API name called to trigger the event. Possible values are: `scaleway.secret_manager.v1beta1.Api`, `scaleway.key_manager.v1alpha1.Api`, `scaleway.iam.v1alpha1.Api`, `scaleway.iam.v1alpha1.UnauthenticatedApi`, `scaleway.k8s.v1.Api`, `scaleway.account.v3.UserApi`, `scaleway.account.v3.OrganizationApi`, `scaleway.account.v2.GDPRApi`, `scaleway.apple_silicon.v1alpha1.Api`, `scaleway.instance.v1.Api`, `scaleway.baremetal.v1.Api`, or `scaleway.lb.v1.ZonedApi`. + - `method_name` - API method called to trigger the event. + - `resources` - List of resources attached to the event. + - `id` - ID of the resource attached to the event. (UUID format) + - `type` - Type of the Scaleway resource. + - `name` - Name of the Scaleway resource. + - `request_id` - Unique identifier of the request at the origin of the event. (UUID format) + - `request_body` - Request at the origin of the event. + - `status_code` - HTTP status code resulting of the API call. diff --git a/internal/acctest/acctest.go b/internal/acctest/acctest.go index 88b4c06e3..30cd75ef5 100644 --- a/internal/acctest/acctest.go +++ b/internal/acctest/acctest.go @@ -32,6 +32,7 @@ type TestTools struct { } var foldersUsingVCRv4 = []string{ + "audittrail", "account", "container", "instance", diff --git a/internal/meta/errors.go b/internal/meta/errors.go index dc369d773..41bc907a9 100644 --- a/internal/meta/errors.go +++ b/internal/meta/errors.go @@ -2,5 +2,5 @@ package meta import "errors" -// ErrProjectIDNotFound is returned when no region can be detected +// ErrProjectIDNotFound is returned when no project ID can be detected var ErrProjectIDNotFound = errors.New("could not detect project id") diff --git a/internal/services/audittrail/event_data_source.go b/internal/services/audittrail/event_data_source.go new file mode 100644 index 000000000..d6df40ec7 --- /dev/null +++ b/internal/services/audittrail/event_data_source.go @@ -0,0 +1,360 @@ +package audittrail + +import ( + "context" + "fmt" + + "github.com/google/uuid" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + audittrailSDK "github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/scw" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/locality" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/locality/regional" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/account" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/types" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/verify" +) + +func DataSourceEvent() *schema.Resource { + return &schema.Resource{ + ReadContext: DataSourceEventsRead, + Schema: map[string]*schema.Schema{ + "organization_id": { + Type: schema.TypeString, + Description: "ID of the organization containing the Audit Trail events.", + Optional: true, + Computed: true, + ValidateDiagFunc: verify.IsUUID(), + }, + "region": regional.Schema(), + "project_id": { + Type: schema.TypeString, + Description: "ID of the project containing the Audit Trail events.", + Optional: true, + ValidateDiagFunc: verify.IsUUID(), + }, + "resource_type": { + Type: schema.TypeString, + Description: "Type of the scaleway resources associated with the listed events", + Optional: true, + ValidateDiagFunc: func(i any, p cty.Path) diag.Diagnostics { + resourceTypeValues := audittrailSDK.ResourceType("").Values() + + resourceTypeStringValues := make([]string, 0, len(resourceTypeValues)) + for _, resourceTypeValue := range resourceTypeValues { + resourceTypeStringValues = append(resourceTypeStringValues, resourceTypeValue.String()) + } + + return verify.ValidateStringInSliceWithWarning(resourceTypeStringValues, "resourceType")(i, p) + }, + }, + "resource_id": { + Type: schema.TypeString, + Description: "ID of the Scaleway resource associated with the listed events", + Optional: true, + ValidateDiagFunc: verify.IsUUIDorUUIDWithLocality(), + }, + "product_name": { + Type: schema.TypeString, + Description: "Scaleway product associated with the listed events in a hyphenated format", + Optional: true, + }, + "service_name": { + Type: schema.TypeString, + Description: "Name of the service of the API call performed", + Optional: true, + }, + "method_name": { + Type: schema.TypeString, + Description: "Name of the method of the API call performed", + Optional: true, + }, + "principal_id": { + Type: schema.TypeString, + Description: "ID of the User or IAM application at the origin of the event", + Optional: true, + ValidateDiagFunc: verify.IsUUID(), + }, + "source_ip": { + Type: schema.TypeString, + Description: "IP address at the origin of the event", + Optional: true, + ValidateFunc: validation.IsIPAddress, + }, + "status": { + Type: schema.TypeInt, + Description: "HTTP status code of the request", + Optional: true, + }, + "recorded_after": { + Type: schema.TypeString, + Description: "The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default (Format ISO 8601)", + Optional: true, + ValidateDiagFunc: verify.IsDate(), + }, + "recorded_before": { + Type: schema.TypeString, + Description: "The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Must be later than recorded_after. Returns `now` by default (Format ISO 8601)", + Optional: true, + ValidateDiagFunc: verify.IsDate(), + }, + "order_by": { + Type: schema.TypeString, + Description: "Defines the order in which events are returned. Default value: recorded_at_desc", + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + string(audittrailSDK.ListAuthenticationEventsRequestOrderByRecordedAtAsc), + string(audittrailSDK.ListAuthenticationEventsRequestOrderByRecordedAtDesc), + }, true), + }, + "events": { + Type: schema.TypeList, + Computed: true, + Description: "List of Audit Trail events", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Description: "ID of the event", + Computed: true, + }, + "recorded_at": { + Type: schema.TypeString, + Description: "Timestamp of the event", + Computed: true, + }, + "locality": { + Type: schema.TypeString, + Description: "Locality of the resource attached to the event", + Computed: true, + }, + "principal_id": { + Type: schema.TypeString, + Description: "ID of the user or IAM application at the origin of the event", + Computed: true, + }, + "organization_id": { + Type: schema.TypeString, + Description: "Organization of the resource attached to the event", + Computed: true, + }, + "project_id": { + Type: schema.TypeString, + Description: "Project of the resource attached to the event", + Computed: true, + }, + "source_ip": { + Type: schema.TypeString, + Description: "IP address at the origin of the event", + Computed: true, + }, + "user_agent": { + Type: schema.TypeString, + Description: "User Agent at the origin of the event", + Computed: true, + }, + "product_name": { + Type: schema.TypeString, + Description: "Product name of the resource attached to the event", + Computed: true, + }, + "service_name": { + Type: schema.TypeString, + Description: "API name called to trigger the event", + Computed: true, + }, + "method_name": { + Type: schema.TypeString, + Description: "API method called to trigger the event", + Computed: true, + }, + "resources": { + Type: schema.TypeList, + Description: "List of resources attached to the event", + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + Description: "ID of the resource attached to the event", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "Type of the Scaleway resource", + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Name of the Scaleway resource", + }, + }, + }, + }, + "request_id": { + Type: schema.TypeString, + Description: "Unique identifier of the request at the origin of the event", + Computed: true, + }, + "request_body": { + Type: schema.TypeString, + Description: "Request at the origin of the event", + Computed: true, + }, + "status_code": { + Type: schema.TypeInt, + Description: "HTTP status code resulting of the API call", + Computed: true, + }, + }, + }, + }, + }, + } +} + +func DataSourceEventsRead(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics { + auditTrailAPI, region, err := newAPIWithRegion(d, m) + if err != nil { + return diag.FromErr(err) + } + + req := audittrailSDK.ListEventsRequest{ + OrganizationID: types.FlattenStringPtr(account.GetOrganizationID(m, d)).(string), + Region: region, + } + + err = readOptionalData(d, &req) + if err != nil { + return diag.FromErr(err) + } + + res, err := auditTrailAPI.ListEvents(&req, scw.WithContext(ctx)) + if err != nil { + return diag.FromErr(err) + } + + d.SetId(uuid.New().String()) + _ = d.Set("region", region) + + flattenedEvents, err := flattenEvents(res.Events) + if err != nil { + return diag.FromErr(err) + } + + _ = d.Set("events", flattenedEvents) + + return nil +} + +func readOptionalData(d *schema.ResourceData, req *audittrailSDK.ListEventsRequest) error { + if projectID, ok := d.GetOk("project_id"); ok { + req.ProjectID = types.ExpandStringPtr(projectID) + } + + if resourceType, ok := d.GetOk("resource_type"); ok { + req.ResourceType = audittrailSDK.ResourceType(resourceType.(string)) + } + + if productName, ok := d.GetOk("product_name"); ok { + req.ProductName = types.ExpandStringPtr(productName) + } + + if resourceID, ok := d.GetOk("resource_id"); ok { + req.ResourceID = types.ExpandStringPtr(locality.ExpandID(resourceID)) + } + + if serviceName, ok := d.GetOk("service_name"); ok { + req.ServiceName = types.ExpandStringPtr(serviceName) + } + + if methodName, ok := d.GetOk("method_name"); ok { + req.MethodName = types.ExpandStringPtr(methodName) + } + + if principalID, ok := d.GetOk("principal_id"); ok { + req.PrincipalID = types.ExpandStringPtr(principalID) + } + + if sourceIP, ok := d.GetOk("source_ip"); ok { + req.SourceIP = types.ExpandStringPtr(sourceIP) + } + + if status, ok := d.GetOk("status"); ok { + req.Status = types.ExpandUint32Ptr(status) + } + + if recordedBefore, ok := d.GetOk("recorded_before"); ok { + req.RecordedBefore = types.ExpandTimePtr(recordedBefore.(string)) + } + + if recordedAfter, ok := d.GetOk("recorded_after"); ok { + req.RecordedAfter = types.ExpandTimePtr(recordedAfter.(string)) + } + + if orderBy, ok := d.GetOk("order_by"); ok { + switch orderBy.(string) { + case "recorded_at_asc": + req.OrderBy = audittrailSDK.ListEventsRequestOrderByRecordedAtAsc + case "recorded_at_desc": + req.OrderBy = audittrailSDK.ListEventsRequestOrderByRecordedAtDesc + default: + return fmt.Errorf("invalid order_by value: %s, must be 'recorded_at_asc' or 'recorded_at_desc'", orderBy) + } + } + + return nil +} + +func flattenEvents(events []*audittrailSDK.Event) ([]map[string]any, error) { + flattenedEvents := make([]map[string]any, len(events)) + for i, event := range events { + var principalID string + + if event.Principal != nil { + principalID = event.Principal.ID + } + + requestBody, err := scw.EncodeJSONObject(*event.RequestBody, scw.NoEscape) + if err != nil { + return nil, err + } + + flattenedEvents[i] = map[string]any{ + "id": event.ID, + "recorded_at": event.RecordedAt.String(), + "locality": event.Locality, + "principal_id": principalID, + "organization_id": event.OrganizationID, + "project_id": event.ProjectID, + "source_ip": event.SourceIP.String(), + "user_agent": event.UserAgent, + "product_name": event.ProductName, + "service_name": event.ServiceName, + "method_name": event.MethodName, + "resources": flattenResources(event.Resources), + "request_id": event.RequestID, + "request_body": requestBody, + "status_code": event.StatusCode, + } + } + + return flattenedEvents, nil +} + +func flattenResources(resources []*audittrailSDK.Resource) []map[string]any { + flattenedResources := make([]map[string]any, len(resources)) + for i, r := range resources { + flattenedResources[i] = map[string]any{ + "id": r.ID, + "type": string(r.Type), + "name": r.Name, + } + } + + return flattenedResources +} diff --git a/internal/services/audittrail/event_data_source_test.go b/internal/services/audittrail/event_data_source_test.go new file mode 100644 index 000000000..2a222dc39 --- /dev/null +++ b/internal/services/audittrail/event_data_source_test.go @@ -0,0 +1,139 @@ +package audittrail_test + +import ( + "fmt" + "testing" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + audit_trail "github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest" + "github.com/stretchr/testify/require" +) + +func TestAccDataSourceEvent_Basic(t *testing.T) { + tt := acctest.NewTestTools(t) + defer tt.Cleanup() + + ctx := t.Context() + + orgID, orgIDExists := tt.Meta.ScwClient().GetDefaultOrganizationID() + if !orgIDExists { + orgID = dummyOrgID + } + + auditTrailAPI := audit_trail.NewAPI(tt.Meta.ScwClient()) + + project, iamAPIKey, _, terminateFakeSideProject, err := acctest.CreateFakeIAMManager(tt) + require.NoError(t, err) + + resource.ParallelTest(t, resource.TestCase{ + ProtoV6ProviderFactories: acctest.FakeSideProjectProviders(ctx, tt, project, iamAPIKey), + CheckDestroy: resource.ComposeAggregateTestCheckFunc( + func(_ *terraform.State) error { + return terminateFakeSideProject() + }, + testAccCheckSecretDestroy(tt), + ), + Steps: []resource.TestStep{ + { + Config: fmt.Sprintf(` + resource "scaleway_secret" "main" { + name = "%s" + description = "DataSourceAuditTrail test description" + project_id = "%s" + } + `, secretName, project.ID), + }, + { + PreConfig: func() { waitForAuditTrailEvents(t, ctx, auditTrailAPI, project) }, + Config: fmt.Sprintf(` + resource "scaleway_secret" "main" { + name = "%s" + description = "DataSourceAuditTrail test description" + project_id = "%s" + } + + data "scaleway_audit_trail_event" "by_project" { + project_id = scaleway_secret.main.project_id + } + + data "scaleway_audit_trail_event" "by_type" { + project_id = scaleway_secret.main.project_id + resource_type = "%s" + } + + data "scaleway_audit_trail_event" "by_id" { + project_id = scaleway_secret.main.project_id + resource_id = split("/", scaleway_secret.main.id)[1] + } + + data "scaleway_audit_trail_event" "by_id_with_locality" { + project_id = scaleway_secret.main.project_id + resource_id = scaleway_secret.main.id + } + + data "scaleway_audit_trail_event" "by_product" { + project_id = scaleway_secret.main.project_id + product_name = "%s" + } + + data "scaleway_audit_trail_event" "by_service" { + project_id = scaleway_secret.main.project_id + service_name = "%s" + } + + data "scaleway_audit_trail_event" "by_method" { + project_id = scaleway_secret.main.project_id + method_name = "%s" + } + + data "scaleway_audit_trail_event" "by_principal" { + project_id = scaleway_secret.main.project_id + principal_id = data.scaleway_audit_trail_event.by_method.events.0.principal_id + } + + data "scaleway_audit_trail_event" "by_ip" { + project_id = scaleway_secret.main.project_id + source_ip = data.scaleway_audit_trail_event.by_method.events.0.source_ip + } + + data "scaleway_audit_trail_event" "by_status" { + project_id = scaleway_secret.main.project_id + status = 200 + } + + data "scaleway_audit_trail_event" "order_by" { + project_id = scaleway_secret.main.project_id + order_by = "recorded_at_asc" + } + `, secretName, project.ID, resourceType, productName, serviceName, methodCreate), + Check: resource.ComposeTestCheckFunc( + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_project", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_type", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_id", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_id_with_locality", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_product", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_service", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_method", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_principal", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_ip", orgID), + createEventDataSourceChecks("data.scaleway_audit_trail_event.by_status", orgID), + resource.TestCheckResourceAttrSet("data.scaleway_audit_trail_event.order_by", "events.#"), + ), + }, + { + Config: fmt.Sprintf(` + data "scaleway_audit_trail_event" "not_found" { + project_id = "%s" + resource_id = "%s" + } + `, project.ID, uuid.New().String()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.scaleway_audit_trail_event.not_found", "events.#", "0"), + ), + }, + }, + }) +} diff --git a/internal/services/audittrail/helpers.go b/internal/services/audittrail/helpers.go new file mode 100644 index 000000000..45f3aebde --- /dev/null +++ b/internal/services/audittrail/helpers.go @@ -0,0 +1,27 @@ +package audittrail + +import ( + "fmt" + "slices" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + audittrailSDK "github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/scw" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/meta" +) + +// newAPIWithRegionAndProjectID returns a new Audit Trail API, with region and projectID +func newAPIWithRegion(d *schema.ResourceData, m any) (*audittrailSDK.API, scw.Region, error) { + api := audittrailSDK.NewAPI(meta.ExtractScwClient(m)) + + region, err := meta.ExtractRegion(d, m) + if err != nil { + return nil, "", err + } + // In audit trail sdk-go so far only fr-par and nl-ams are supported + if !slices.Contains(api.Regions(), region) { + return nil, "", fmt.Errorf("invalid api region, expected one of %s, got: %s", api.Regions(), region) + } + + return api, region, nil +} diff --git a/internal/services/audittrail/helpers_test.go b/internal/services/audittrail/helpers_test.go new file mode 100644 index 000000000..77c24309e --- /dev/null +++ b/internal/services/audittrail/helpers_test.go @@ -0,0 +1,192 @@ +package audittrail_test + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/scaleway/scaleway-sdk-go/api/account/v3" + audit_trail "github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1" + secretSDK "github.com/scaleway/scaleway-sdk-go/api/secret/v1beta1" + "github.com/scaleway/scaleway-sdk-go/scw" + "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/secret" +) + +const ( + defaultAuditTrailEventsTimeout = 20 * time.Second + destroyWaitTimeout = 3 * time.Minute + dummyOrgID = "AB7BD9BF-E1BD-41E8-9F1D-F16A2E3F3925" + serviceName = "scaleway.secret_manager.v1beta1.Api" + productName = "secret-manager" + methodCreate = "CreateSecret" + resourceType = "secret_manager_secret" + resourceName = "scaleway_secret.main" + secretName = "scalewayDataSourceAuditTrailSecret" +) + +func getAuditEvents(ctx context.Context, api *audit_trail.API, projectID string, method string) (*audit_trail.ListEventsResponse, error) { + resp, err := api.ListEvents(&audit_trail.ListEventsRequest{ + ProjectID: &projectID, + MethodName: &method, + }, scw.WithContext(ctx)) + + return resp, err +} + +func waitForAuditTrailEvents(t *testing.T, ctx context.Context, api *audit_trail.API, project *account.Project) { + t.Helper() + + // Retry call with exponential backoff. + // Wait up to 20 seconds for audit event to appear. + err := retry.RetryContext(ctx, defaultAuditTrailEventsTimeout, func() *retry.RetryError { + events, err := getAuditEvents(ctx, api, project.ID, methodCreate) + if err != nil { + return retry.NonRetryableError(fmt.Errorf("failed to list audit events: %w", err)) + } + + if len(events.Events) > 0 { + return nil // Success + } + + // Not found yet + return retry.RetryableError(errors.New("audit event not found yet for resource, retrying...")) + }) + if err != nil { + t.Fatalf("timed out waiting for audit trail event: %v", err) + } +} + +// Bundle of checks for audit trail event data source testing +func createEventDataSourceChecks(eventsDataSourceName, orgID string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair( + eventsDataSourceName, "events.0.locality", + resourceName, "region", + ), + resource.TestCheckResourceAttrSet(eventsDataSourceName, "events.0.principal_id"), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.organization_id", orgID, + ), + resource.TestCheckResourceAttrSet(eventsDataSourceName, "events.0.source_ip"), + resource.TestCheckResourceAttrSet(eventsDataSourceName, "events.0.user_agent"), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.product_name", productName, + ), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.service_name", serviceName, + ), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.method_name", methodCreate, + ), + testCheckSecretIDEqualsEventResourceID(eventsDataSourceName, resourceName), + resource.TestCheckResourceAttrPair( + eventsDataSourceName, "events.0.resources.0.name", + resourceName, "name", + ), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.resources.0.type", resourceType, + ), + resource.TestCheckResourceAttrSet(eventsDataSourceName, "events.0.request_id"), + resource.TestCheckResourceAttrSet(eventsDataSourceName, "events.0.request_body"), + resource.TestCheckResourceAttr( + eventsDataSourceName, "events.0.status_code", "200", + ), + ) +} + +// testAccCheckSecretIDEqualsEventResourceID is a convenience wrapper for checking +// secret resource IDs against audit trail event resource IDs. +func testCheckSecretIDEqualsEventResourceID(eventsDataSourceName, resourceName string) resource.TestCheckFunc { + return checkSecretResourceIDMatchesEvent( + resourceName, + "id", + eventsDataSourceName, + "events.0.resources.0.id", + "events.0.locality", + ) +} + +// scaleway_secret id is formatted as ${scaleway_secret.main.region}/${scaleway_secret.main.id} +// this function enables checking the event region and id against the scaleway_secret formatted id. +func checkSecretResourceIDMatchesEvent(resourceName, resourceIDAttr, eventsDataSourceName, eventResourceIDAttr, eventLocalityAttr string) resource.TestCheckFunc { + return func(s *terraform.State) error { + // Retrieve the secret resource and relevant attribute + resource, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("resource not found: %s", resourceName) + } + + resourceID, ok := resource.Primary.Attributes[resourceIDAttr] + if !ok { + return fmt.Errorf("attribute not found: %s %s", resource, resourceIDAttr) + } + + // Retrieve the events data source and relevant attributes + events, ok := s.RootModule().Resources[eventsDataSourceName] + if !ok { + return fmt.Errorf("resource not found: %s", eventsDataSourceName) + } + + eventResourceID, ok := events.Primary.Attributes[eventResourceIDAttr] + if !ok { + return fmt.Errorf("attribute not found: %s %s", events, eventResourceIDAttr) + } + + eventLocality, ok := events.Primary.Attributes[eventLocalityAttr] + if !ok { + return fmt.Errorf("attribute not found: %s %s", events, eventLocalityAttr) + } + + // Format event resource ID to match the secret resource ID pattern + eventResourceFormattedID := fmt.Sprintf("%s/%s", eventLocality, eventResourceID) + + if resourceID != eventResourceFormattedID { + return fmt.Errorf("expected %s, got %s", resourceID, eventResourceFormattedID) + } + + return nil + } +} + +func testAccCheckSecretDestroy(tt *acctest.TestTools) resource.TestCheckFunc { + return func(state *terraform.State) error { + ctx := context.Background() + + return retry.RetryContext(ctx, destroyWaitTimeout, func() *retry.RetryError { + for _, rs := range state.RootModule().Resources { + if rs.Type != "scaleway_secret" { + continue + } + + api, region, id, err := secret.NewAPIWithRegionAndID(tt.Meta, rs.Primary.ID) + if err != nil { + return retry.NonRetryableError(err) + } + + sec, err := api.GetSecret(&secretSDK.GetSecretRequest{ + SecretID: id, + Region: region, + }) + + switch { + case err == nil && sec != nil && sec.DeletionRequestedAt != nil: + // Soft-deleted (scheduled for deletion), treat as destroyed for tests + continue + case httperrors.Is404(err): + continue + case err != nil: + return retry.NonRetryableError(err) + } + } + + return nil + }) + } +} diff --git a/internal/services/audittrail/testdata/data-source-event-basic.cassette.yaml b/internal/services/audittrail/testdata/data-source-event-basic.cassette.yaml new file mode 100644 index 000000000..57877b494 --- /dev/null +++ b/internal/services/audittrail/testdata/data-source-event-basic.cassette.yaml @@ -0,0 +1,2279 @@ +--- +version: 2 +interactions: +- id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 130 + host: api.scaleway.com + body: "{\"name\":\"test-acc-scaleway-project-4175007289069177144\",\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"description\":\"\"}" + 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/account/v3/projects + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 287 + body: "{\"id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"test-acc-scaleway-project-4175007289069177144\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"created_at\":\"2025-11-19T13:46:42.612303Z\", \"updated_at\":\"2025-11-19T13:46:42.612303Z\", \"description\":\"\", \"qualification\":null}" + headers: + Content-Length: + - "287" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:42 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 6ce96139-e21d-49df-b803-97fc3d7f2699 + status: 200 OK + code: 200 + duration: 513.611272ms +- id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 142 + host: api.scaleway.com + body: "{\"name\":\"test-acc-scaleway-iam-app-8096723885121275895\",\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"description\":\"\",\"tags\":null}" + 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/applications + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 345 + body: "{\"id\":\"529323d5-751a-40d6-9876-46acb7df3462\", \"name\":\"test-acc-scaleway-iam-app-8096723885121275895\", \"description\":\"\", \"created_at\":\"2025-11-19T13:46:43.058981Z\", \"updated_at\":\"2025-11-19T13:46:43.058981Z\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"editable\":true, \"deletable\":true, \"managed\":false, \"nb_api_keys\":0, \"tags\":[]}" + headers: + Content-Length: + - "345" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:43 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - fada532f-6e2c-4b60-87d1-42741424522e + status: 200 OK + code: 200 + duration: 306.362859ms +- id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 322 + host: api.scaleway.com + body: "{\"name\":\"test-acc-scaleway-iam-policy-327132438806757973\",\"description\":\"\",\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\",\"rules\":[{\"permission_set_names\":[\"IAMManager\"],\"condition\":\"\",\"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\"}],\"tags\":null,\"application_id\":\"529323d5-751a-40d6-9876-46acb7df3462\"}" + 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/policies + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 440 + body: "{\"id\":\"7c38554a-f498-4c08-b18b-8ff25f6d80ff\", \"name\":\"test-acc-scaleway-iam-policy-327132438806757973\", \"description\":\"\", \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"created_at\":\"2025-11-19T13:46:43.341353Z\", \"updated_at\":\"2025-11-19T13:46:43.341353Z\", \"editable\":true, \"deletable\":true, \"managed\":false, \"nb_rules\":0, \"nb_scopes\":0, \"nb_permission_sets\":0, \"tags\":[], \"application_id\":\"529323d5-751a-40d6-9876-46acb7df3462\"}" + headers: + Content-Length: + - "440" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:43 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - f5e7bdce-fde3-4365-92e0-c89a7f4ccc12 + status: 200 OK + code: 200 + duration: 408.134009ms +- id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 134 + host: api.scaleway.com + body: "{\"application_id\":\"529323d5-751a-40d6-9876-46acb7df3462\",\"default_project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\",\"description\":\"\"}" + 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/api-keys + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 418 + body: "{\"access_key\":\"SCW6XBD0KFMA7HD0J5V5\", \"secret_key\":\"11111111-1111-1111-1111-111111111111\", \"description\":\"\", \"created_at\":\"2025-11-19T13:46:43.834097Z\", \"updated_at\":\"2025-11-19T13:46:43.834097Z\", \"expires_at\":null, \"default_project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"editable\":true, \"deletable\":true, \"managed\":false, \"creation_ip\":\"130.180.219.188\", \"application_id\":\"529323d5-751a-40d6-9876-46acb7df3462\"}" + headers: + Content-Length: + - "418" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:43 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 2dee609f-0ac6-4313-9f3f-8fab5c1ea493 + status: 200 OK + code: 200 + duration: 306.669383ms +- id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 208 + host: api.scaleway.com + body: "{\"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\",\"name\":\"scalewayDataSourceAuditTrailSecret\",\"tags\":null,\"description\":\"DataSourceAuditTrail test description\",\"type\":\"opaque\",\"path\":\"/\",\"protected\":false}" + 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/secret-manager/v1beta1/regions/fr-par/secrets + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:44 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7879ec78-83ed-4ccc-828f-d8e625c35f88 + status: 200 OK + code: 200 + duration: 190.199859ms +- id: 5 + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:44 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 96d7b83d-bbd7-497f-a54a-bc95e17146eb + status: 200 OK + code: 200 + duration: 74.005254ms +- id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + page: + - "1" + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911/versions?page=1 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 32 + body: "{\"versions\":[], \"total_count\":0}" + headers: + Content-Length: + - "32" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:44 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - a1494e24-62e9-41d4-9b83-8fe53f472d3e + status: 200 OK + code: 200 + duration: 74.750595ms +- id: 7 + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:44 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 57fceeea-a2c0-4725-baa5-8631b85dcaca + status: 200 OK + code: 200 + duration: 23.16775ms +- id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + page: + - "1" + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911/versions?page=1 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 32 + body: "{\"versions\":[], \"total_count\":0}" + headers: + Content-Length: + - "32" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:44 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 4206eafa-68ea-4e3b-8400-ee8ba42ed341 + status: 200 OK + code: 200 + duration: 75.961628ms +- id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + method_name: + - CreateSecret + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?method_name=CreateSecret&order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 13 + body: "{\"events\":[]}" + headers: + Content-Length: + - "13" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:45 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - c53a3c02-73a4-4d2b-8b06-8efab46e94c8 + status: 200 OK + code: 200 + duration: 96.881354ms +- id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + method_name: + - CreateSecret + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?method_name=CreateSecret&order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:45 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7426d714-353e-49d9-b081-05cc24ddfd0b + status: 200 OK + code: 200 + duration: 187.525843ms +- 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:45 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - d3f94c63-dc57-4c3a-9be6-6b80b57fbda3 + status: 200 OK + code: 200 + duration: 72.396607ms +- id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + page: + - "1" + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911/versions?page=1 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 32 + body: "{\"versions\":[], \"total_count\":0}" + headers: + Content-Length: + - "32" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7fa038c7-649e-48ce-bc04-28867e8b67e9 + status: 200 OK + code: 200 + duration: 89.02183ms +- id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_asc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_asc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - a54ab86b-68e6-457d-a9d4-81d6811df664 + status: 200 OK + code: 200 + duration: 39.985439ms +- id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + service_name: + - scaleway.secret_manager.v1beta1.Api + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&service_name=scaleway.secret_manager.v1beta1.Api + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - f0d3875e-dc24-45b5-8f46-ffd03ce39bb9 + status: 200 OK + code: 200 + duration: 63.265918ms +- id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 081604a8-8e0f-49c9-b601-5d1220686640 + status: 200 OK + code: 200 + duration: 63.019967ms +- id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + method_name: + - CreateSecret + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?method_name=CreateSecret&order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 924a9840-ff0f-4fb0-8b22-2c292bd36d92 + status: 200 OK + code: 200 + duration: 104.18976ms +- id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - e079c215-dfa7-4a5e-acde-2a2b0c27aeee + status: 200 OK + code: 200 + duration: 105.221386ms +- id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + status: + - "200" + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&status=200 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 021d028e-26af-4f59-ab04-dc37b941ad05 + status: 200 OK + code: 200 + duration: 126.989358ms +- id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + principal_id: + - 0b8cc93b-dfd2-4427-b674-8d27affb0334 + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&principal_id=0b8cc93b-dfd2-4427-b674-8d27affb0334&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - c5fee49b-94b4-4a80-bd76-60d9980adaf7 + status: 200 OK + code: 200 + duration: 59.549914ms +- id: 20 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + product_name: + - secret-manager + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&product_name=secret-manager&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 4d5dfc5a-b1fe-4602-a45c-3944b16b8936 + status: 200 OK + code: 200 + duration: 165.200394ms +- id: 21 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + source_ip: + - 130.180.219.188 + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&source_ip=130.180.219.188 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - af760736-9fc4-423e-aac1-d741c1527d65 + status: 200 OK + code: 200 + duration: 60.590523ms +- id: 22 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - bd2f3935-24d9-4036-bd68-14f87e4851ac + status: 200 OK + code: 200 + duration: 200.854235ms +- id: 23 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - secret_manager_secret + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=secret_manager_secret + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - f584f2ed-41a2-4082-a306-695e5458c6ac + status: 200 OK + code: 200 + duration: 201.873828ms +- id: 24 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + service_name: + - scaleway.secret_manager.v1beta1.Api + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&service_name=scaleway.secret_manager.v1beta1.Api + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 2ce31be7-bce3-4d7f-b925-1526abd2c31f + status: 200 OK + code: 200 + duration: 43.326055ms +- id: 25 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_asc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_asc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 061a1635-6172-4870-89ba-c527b25651e1 + status: 200 OK + code: 200 + duration: 44.07863ms +- id: 26 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 6ed80deb-19fd-477c-becc-60ee44fc8dcd + status: 200 OK + code: 200 + duration: 44.755817ms +- id: 27 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + product_name: + - secret-manager + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&product_name=secret-manager&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 1dcc13dc-207d-41a1-b815-ec7735acae2c + status: 200 OK + code: 200 + duration: 46.960369ms +- id: 28 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + status: + - "200" + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&status=200 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 1a5b7fac-d72c-4e4d-98f0-d53fb64989f1 + status: 200 OK + code: 200 + duration: 46.192953ms +- id: 29 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 53a1e899-2f61-4f61-8ead-7414eb257608 + status: 200 OK + code: 200 + duration: 103.620229ms +- id: 30 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 81ed0832-8e2d-40f3-b103-ce1a87235d1a + status: 200 OK + code: 200 + duration: 103.149382ms +- id: 31 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - secret_manager_secret + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=secret_manager_secret + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - ea511b55-07dd-44df-8308-3c575ecc5a53 + status: 200 OK + code: 200 + duration: 177.287306ms +- id: 32 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + method_name: + - CreateSecret + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?method_name=CreateSecret&order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 3d7edca2-3b75-46db-8290-7057ffdb04fb + status: 200 OK + code: 200 + duration: 218.04549ms +- id: 33 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + source_ip: + - 130.180.219.188 + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&source_ip=130.180.219.188 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 9bd88140-bc53-444a-86ed-70af5535f934 + status: 200 OK + code: 200 + duration: 36.921171ms +- id: 34 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + principal_id: + - 0b8cc93b-dfd2-4427-b674-8d27affb0334 + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&principal_id=0b8cc93b-dfd2-4427-b674-8d27affb0334&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:46 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - daae1c04-6e30-4522-8b97-881d5c6c679c + status: 200 OK + code: 200 + duration: 77.782846ms +- id: 35 + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 5f9c1a20-fe4d-4b2f-aa01-9a986a742c96 + status: 200 OK + code: 200 + duration: 69.257178ms +- id: 36 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + page: + - "1" + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911/versions?page=1 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 32 + body: "{\"versions\":[], \"total_count\":0}" + headers: + Content-Length: + - "32" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - c2699549-140c-4a38-92fd-eec25e61796c + status: 200 OK + code: 200 + duration: 22.598347ms +- id: 37 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 4b27f3c1-5e54-4aca-bb9a-c9ff57db988d + status: 200 OK + code: 200 + duration: 47.302862ms +- id: 38 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + status: + - "200" + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&status=200 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - a6bf659d-6858-421f-8ea4-b685877a0c0c + status: 200 OK + code: 200 + duration: 88.947868ms +- id: 39 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - secret_manager_secret + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=secret_manager_secret + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - b92db422-79cb-4f42-9e20-4a650b511bec + status: 200 OK + code: 200 + duration: 101.869082ms +- id: 40 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + service_name: + - scaleway.secret_manager.v1beta1.Api + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&service_name=scaleway.secret_manager.v1beta1.Api + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 2fc6edea-14c4-4ef3-b697-63a40bfe0557 + status: 200 OK + code: 200 + duration: 150.248903ms +- id: 41 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=7522c5f9-6f4c-4583-9e8e-c5c2225ab911&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - a4ef7e72-887d-4a7c-b197-7e21b831419f + status: 200 OK + code: 200 + duration: 157.44139ms +- id: 42 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + product_name: + - secret-manager + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&product_name=secret-manager&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 6ff5683f-a9e1-4286-bd10-98cd0823988a + status: 200 OK + code: 200 + duration: 157.639027ms +- id: 43 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_asc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_asc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 9ba6df56-d67c-4189-8ab6-d38ff803e031 + status: 200 OK + code: 200 + duration: 157.300475ms +- id: 44 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 3c0a177f-d244-449c-a957-be75c323304d + status: 200 OK + code: 200 + duration: 165.204262ms +- id: 45 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + method_name: + - CreateSecret + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?method_name=CreateSecret&order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 3f9f203e-734f-4e03-8329-30afc5799bb3 + status: 200 OK + code: 200 + duration: 172.603252ms +- id: 46 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_type: + - unknown_type + source_ip: + - 130.180.219.188 + 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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type&source_ip=130.180.219.188 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7e03363b-4456-47c1-9e62-3b8186bca8d8 + status: 200 OK + code: 200 + duration: 36.420675ms +- id: 47 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + principal_id: + - 0b8cc93b-dfd2-4427-b674-8d27affb0334 + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&principal_id=0b8cc93b-dfd2-4427-b674-8d27affb0334&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 1162 + body: "{\"events\":[{\"id\":\"019a9c5e-1b18-7eab-b1b6-faf71f535597\", \"recorded_at\":\"2025-11-19T13:46:44.375780497Z\", \"locality\":\"fr-par\", \"principal\":{\"id\":\"0b8cc93b-dfd2-4427-b674-8d27affb0334\"}, \"organization_id\":\"105bdce1-64c0-48ab-899d-868455867ecf\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"source_ip\":\"130.180.219.188\", \"user_agent\":\"scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.3; linux; amd64) terraform-provider/develop terraform/terraform-tests\", \"product_name\":\"secret-manager\", \"service_name\":\"scaleway.secret_manager.v1beta1.Api\", \"method_name\":\"CreateSecret\", \"request_id\":\"7879ec78-83ed-4ccc-828f-d8e625c35f88\", \"request_body\":{\"description\":\"DataSourceAuditTrail test description\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"path\":\"/\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"protected\":false, \"tags\":[], \"type\":\"opaque\"}, \"status_code\":200, \"resources\":[{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"type\":\"secret_manager_secret\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"deleted_at\":null, \"name\":\"scalewayDataSourceAuditTrailSecret\", \"secret_manager_secret_info\":{\"path\":\"/\"}}]}]}" + headers: + Content-Length: + - "1162" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 29bc10a9-e399-4d0b-89ff-0ebbaacbe236 + status: 200 OK + code: 200 + duration: 77.560897ms +- id: 48 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 56953fdf-c93b-4dd8-be08-4f88801d5fac + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=56953fdf-c93b-4dd8-be08-4f88801d5fac&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 13 + body: "{\"events\":[]}" + headers: + Content-Length: + - "13" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 9ad930ae-a1e2-4eab-a2fd-0e9975dee9a2 + status: 200 OK + code: 200 + duration: 43.678003ms +- id: 49 + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 502 + body: "{\"id\":\"7522c5f9-6f4c-4583-9e8e-c5c2225ab911\", \"project_id\":\"dc539e8a-b081-41d4-be48-4be17a7048d2\", \"name\":\"scalewayDataSourceAuditTrailSecret\", \"status\":\"ready\", \"created_at\":\"2025-11-19T13:46:44.363170Z\", \"updated_at\":\"2025-11-19T13:46:44.363170Z\", \"tags\":[], \"version_count\":0, \"description\":\"DataSourceAuditTrail test description\", \"managed\":false, \"type\":\"opaque\", \"protected\":false, \"path\":\"/\", \"ephemeral_policy\":null, \"used_by\":[], \"deletion_requested_at\":null, \"key_id\":null, \"region\":\"fr-par\"}" + headers: + Content-Length: + - "502" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 86360417-2c14-4098-a151-0fa92f2613ec + status: 200 OK + code: 200 + duration: 84.880007ms +- id: 50 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + page: + - "1" + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911/versions?page=1 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 32 + body: "{\"versions\":[], \"total_count\":0}" + headers: + Content-Length: + - "32" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 79e502b1-ede4-4c02-b959-8220a8c465cc + status: 200 OK + code: 200 + duration: 23.835694ms +- id: 51 + 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/secret-manager/v1beta1/regions/fr-par/secrets/7522c5f9-6f4c-4583-9e8e-c5c2225ab911 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:47 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - a5935860-bdb2-4429-977d-a42274831469 + status: 204 No Content + code: 204 + duration: 93.485769ms +- id: 52 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 56953fdf-c93b-4dd8-be08-4f88801d5fac + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=56953fdf-c93b-4dd8-be08-4f88801d5fac&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 13 + body: "{\"events\":[]}" + headers: + Content-Length: + - "13" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:48 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7f68eec3-ae41-4c39-8f5d-e99e2ad780a9 + status: 200 OK + code: 200 + duration: 103.176638ms +- id: 53 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.scaleway.com + form: + order_by: + - recorded_at_desc + organization_id: + - 105bdce1-64c0-48ab-899d-868455867ecf + project_id: + - dc539e8a-b081-41d4-be48-4be17a7048d2 + resource_id: + - 56953fdf-c93b-4dd8-be08-4f88801d5fac + resource_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/audit-trail/v1alpha1/regions/fr-par/events?order_by=recorded_at_desc&organization_id=11111111-1111-1111-1111-111111111111&project_id=dc539e8a-b081-41d4-be48-4be17a7048d2&resource_id=56953fdf-c93b-4dd8-be08-4f88801d5fac&resource_type=unknown_type + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 13 + body: "{\"events\":[]}" + headers: + Content-Length: + - "13" + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:48 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 195b77de-66c8-4a46-8ef3-c2f1533bfd8d + status: 200 OK + code: 200 + duration: 46.702249ms +- id: 54 + 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/api-keys/SCWXXXXXXXXXXXXXXXXX + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:48 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7d4e9266-cc9f-41d7-9aa1-4fc375f916e2 + status: 204 No Content + code: 204 + duration: 152.070045ms +- id: 55 + 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/policies/7c38554a-f498-4c08-b18b-8ff25f6d80ff + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:48 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - f3d9ad00-6c32-43c5-abf9-f29b2d7edb0f + status: 204 No Content + code: 204 + duration: 161.567205ms +- id: 56 + 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/applications/529323d5-751a-40d6-9876-46acb7df3462 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:49 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 43f48bf1-827f-45f3-a4e6-77acaaa9d649 + status: 204 No Content + code: 204 + duration: 145.503871ms +- id: 57 + 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/account/v3/projects/dc539e8a-b081-41d4-be48-4be17a7048d2 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: 0 + body: "" + headers: + Content-Type: + - application/json + Date: + - Wed, 19 Nov 2025 13:46:50 GMT + Server: + - Scaleway API Gateway (fr-par-3;edge02) + X-Request-Id: + - 7c57bcc0-c3ec-4172-ac05-aed013857d70 + status: 204 No Content + code: 204 + duration: 1.535561272s diff --git a/provider/sdkv2.go b/provider/sdkv2.go index d37440ca1..66b2cc930 100644 --- a/provider/sdkv2.go +++ b/provider/sdkv2.go @@ -13,6 +13,7 @@ import ( "github.com/scaleway/terraform-provider-scaleway/v2/internal/meta" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/account" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/applesilicon" + "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/audittrail" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/autoscaling" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/az" "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/baremetal" @@ -262,6 +263,7 @@ func SDKProvider(config *Config) plugin.ProviderFunc { "scaleway_account_project": account.DataSourceProject(), "scaleway_account_projects": account.DataSourceProjects(), "scaleway_account_ssh_key": iam.DataSourceSSHKey(), + "scaleway_audit_trail_event": audittrail.DataSourceEvent(), "scaleway_availability_zones": az.DataSourceAvailabilityZones(), "scaleway_baremetal_offer": baremetal.DataSourceOffer(), "scaleway_baremetal_partition_schema": baremetal.DataPartitionSchema(), diff --git a/templates/data-sources/audit_trail_event.md.tmpl b/templates/data-sources/audit_trail_event.md.tmpl new file mode 100644 index 000000000..1e5490e05 --- /dev/null +++ b/templates/data-sources/audit_trail_event.md.tmpl @@ -0,0 +1,100 @@ +--- +subcategory: "Audit Trail" +page_title: "Scaleway: scaleway_audit_trail_event" +--- + +# scaleway_audit_trail_event + +Use this data source to get a list of existing Audit Trail events. +For more information refer to the [Audit Trail API documentation](https://www.scaleway.com/en/developers/api/audit-trail/). + +## Example Usage + +```hcl +# Retrieve all audit trail events on the default organization +data "scaleway_audit_trail_event" "find_all" { + region = "fr-par" +} + +# Retrieve audit trail events on a specific organization +data "scaleway_audit_trail_event" "find_by_org" { + organization_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail events on a specific project +data "scaleway_audit_trail_event" "find_by_project" { + region = "fr-par" + project_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail events for a specific type of resource +data "scaleway_audit_trail_event" "find_by_resource_type" { + resource_type = "instance_server" +} + +# Retrieve audit trail for a specific resource +data "scaleway_audit_trail_event" "find_by_resource_id" { + resource_id = "11111111-1111-1111-1111-111111111111" +} + +# Retrieve audit trail for a specific Scaleway product +data "scaleway_audit_trail_event" "find_by_product_name" { + region = "nl-ams" + product_name = "secret-manager" +} + +# Retrieve audit trail events with various filtering +data "scaleway_audit_trail_event" "find_with_filters" { + region = "fr-par" + service_name = "instance" + method_name = "CreateServer" + principal_id = "11111111-1111-1111-1111-111111111111" + source_ip = "192.0.2.1" + status = 200 + recorded_after = "2025-10-01T00:00:00Z" + recorded_before = "2025-12-31T23:59:59Z" + order_by = "recorded_at_desc" +} +``` + +## Argument Reference + +- `region` - (Optional) The [region](../guides/regions_and_zones.md#regions) you want to target. Defaults to the region specified in the [provider configuration](../index.md#region). +- `organization_id` - (Optional. Defaults to [provider](../index.md#organization_id) `organization_id`) ID of the Organization containing the Audit Trail events. +- `project_id` - (Optional) ID of the Project containing the Audit Trail events. +- `resource_type` - (Optional) Type of the scaleway resources associated with the listed events. Possible values are: `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `iam_saml`, `iam_saml_certificate`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization`, `account_project`, `instance_server`, `instance_placement_group`, `instance_security_group`, `instance_volume`, `instance_snapshot`, `instance_image`, `apple_silicon_server`, `baremetal_server`, `baremetal_setting`, `ipam_ip`, `sbs_volume`, `sbs_snapshot`, `load_balancer_lb`, `load_balancer_ip`, `load_balancer_frontend`, `load_balancer_backend`, `load_balancer_route`, `load_balancer_acl`, `load_balancer_certificate`, `sfs_filesystem`, or `vpc_private_network`. +- `resource_id` - (Optional) ID of the Scaleway resource associated with the listed events. +- `product_name` - (Optional) Name of the Scaleway product in a hyphenated format. +- `service_name` - (Optional) Name of the service of the API call performed. +- `method_name` - (Optional) Name of the method of the API call performed. +- `principal_id` - (Optional) ID of the User or IAM application at the origin of the event. +- `source_ip` - (Optional) IP address at the origin of the event. +- `status` - (Optional) HTTP status code of the request. +- `recorded_after` - (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default (Format ISO 8601). +- `recorded_before` - (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Must be later than recorded_after. Returns `now` by default (Format ISO 8601). +- `order_by` - (Optional) Defines the order in which events are returned. Possible values are `recorded_at_asc` and `recorded_at_desc`. Default value: `recorded_at_desc`. + + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +- `events` - List of Audit Trail events matching the requested criteria. + - `id` - ID of the event. (UUID format) + - `recorded_at` - Timestamp of the event. (RFC 3339 format) + - `locality` - Locality of the resource attached to the event. + - `principal_id` - ID of the user or IAM application at the origin of the event. + - `organization_id` - ID of the Organization containing the Audit Trail events. (UUID format) + - `project_id` - Project of the resource attached to the event. (UUID format) + - `source_ip` - IP address at the origin of the event. (IP address) + - `user_agent` - User Agent at the origin of the event. + - `product_name` - Scaleway product associated with the listed events in a hyphenated format. Possible values are: `secret-manager`, `key-manager`, `iam`, `kubernetes`, `account`, `apple-silicon`, `instance`, `baremetal`, `load-balancer`, or `edge-services`. + - `service_name` - API name called to trigger the event. Possible values are: `scaleway.secret_manager.v1beta1.Api`, `scaleway.key_manager.v1alpha1.Api`, `scaleway.iam.v1alpha1.Api`, `scaleway.iam.v1alpha1.UnauthenticatedApi`, `scaleway.k8s.v1.Api`, `scaleway.account.v3.UserApi`, `scaleway.account.v3.OrganizationApi`, `scaleway.account.v2.GDPRApi`, `scaleway.apple_silicon.v1alpha1.Api`, `scaleway.instance.v1.Api`, `scaleway.baremetal.v1.Api`, or `scaleway.lb.v1.ZonedApi`. + - `method_name` - API method called to trigger the event. + - `resources` - List of resources attached to the event. + - `id` - ID of the resource attached to the event. (UUID format) + - `type` - Type of the Scaleway resource. + - `name` - Name of the Scaleway resource. + - `request_id` - Unique identifier of the request at the origin of the event. (UUID format) + - `request_body` - Request at the origin of the event. + - `status_code` - HTTP status code resulting of the API call.