Create a Scaleway Audit Trail export job
scaleway_audit_create_export_jobCreate an export job to ship Audit Trail events to an existing Object Storage bucket, triggering an immediate backfill of past logs.
Instructions
Create an export job shipping Audit Trail events to an Object Storage bucket (S3 destination). The bucket must already exist and be writable - create it first (e.g. scaleway_s3_create_bucket). Live-verified 2026-08-18: creation triggers an IMMEDIATE backfill, not just a future cadence - a fresh job wrote ~6 days of past daily log objects (one JSON file per day, e.g. '2026/07/12/logs_*.json') into the bucket within seconds of creation. scaleway_audit_delete_export_job does not delete these - if you created a bucket just to test this, you'll need to empty it (object-level operations are out of scope for this server) before scaleway_s3_delete_bucket will succeed. Check last_run_at / last_status via scaleway_audit_list_export_jobs afterwards for the ongoing cadence. Needs more than AuditTrailReadOnly on THIS server's own credential (read-only covers just the query tools) - if the call fails with permissions_denied, grant the Audit Trail write permission set via scaleway_iam_set_policy_rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the export job. | |
| tags | No | Tags for the export job. | |
| bucket | Yes | Object Storage bucket the audit events are shipped to. It must already exist - create it first (e.g. scaleway_s3_create_bucket). | |
| prefix | No | Key prefix inside the bucket to write under, e.g. 'audit-trail/'. | |
| region | No | Defaults to the server's configured region (fr-par). | |
| project_id | No | Project owning the destination bucket. Defaults to the server's configured Project. | |
| bucket_region | No | Region of the destination bucket. Defaults to the server's configured region (fr-par). |