Create Scaleway IAM Policy
scaleway_iam_create_policyCreate an IAM Policy that grants permission sets to an Application, User, or Group, scoped to specific Projects or the entire Organization. For Object Storage access, combine with a Bucket Policy.
Instructions
Create an IAM Policy granting permission sets to an Application/User/Group, scoped to specific Project(s) or the whole Organization. This is the PROJECT-WIDE half of access control - for Object Storage specifically, it grants access to every bucket in the Project(s); narrow to one bucket with a Bucket Policy (scaleway_s3_put_bucket_policy) as well. A Bucket Policy alone is NOT sufficient on Scaleway - both are required together for an Application to actually read/write a specific bucket. Call scaleway_iam_list_permission_sets first to get exact names and scope_types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Policy name (max 64 chars, Scaleway API limit). Convention in this org: match the principal Application's own name 1:1 (e.g. Application 'dev-payments-files-rw' -> Policy 'dev-payments-files-rw'). When one Application genuinely needs two policies (Scaleway's rule scope_type restriction - see scaleway_iam_list_permission_sets), suffix the second with what it specifically adds, not a restatement of the app name. | |
| rules | Yes | One rule per scope_type needed. E.g. one rule with organization_id + ['IAMPolicyManager'], a second with project_ids + ['ObjectStorageFullAccess']. | |
| user_id | No | ||
| group_id | No | ||
| description | No | ||
| application_id | No | Attach this policy to an Application. Omit application_id/user_id/group_id to create a policy with no principal yet. |