Skip to content

Commit 1e3641d

Browse files
committed
docs(fls): add links to k8s doc
1 parent ea998c6 commit 1e3641d

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

pages/file-storage/how-to/attach-file-system.mdx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ categories:
66
- storage
77
- file-storage
88
dates:
9-
validation: 2025-07-23
9+
validation: 2025-10-30
1010
posted: 2025-07-23
1111
---
1212

@@ -21,7 +21,7 @@ import Requirements from '@macros/iam/requirements.mdx'
2121
- [Created a file system](/file-storage/how-to/create-file-system/)
2222
- [Created at least one POP2 Instance](/instances/how-to/create-an-instance/)
2323

24-
## How to attach a file system to an Instance
24+
## How to attach a file system using the Scaleway console
2525

2626
1. Click **File Storage** in the **Storage** section of the side menu. A list of your file systems displays.
2727

@@ -39,3 +39,41 @@ import Requirements from '@macros/iam/requirements.mdx'
3939

4040
Your file system is now attached to the selected Instance(s) and can now be [mounted](/file-storage/how-to/mount-file-system/) to a Scaleway Instance.
4141

42+
## How to attach a file system using the API
43+
44+
The Scaleway API allows you to create and manage all your resources programmatically.
45+
46+
<Message type="note">
47+
To attach a file system to an Instance, you must use the [Instance API](https://www.scaleway.com/en/developers/api/instances/#path-instances-attach-a-filesystem-volume-to-an-instance).
48+
</Message>
49+
50+
1. Make sure you have [authenticated and performed your first request](https://www.scaleway.com/en/developers/api/#quickstart-first-request) with the Scaleway API.
51+
52+
2. Run the cURL request below to attach your file system to the desired Instance. Do not forget to replace the placeholders with the appropriate values.
53+
54+
```bash
55+
curl -X POST 'https://api.scaleway.com/instance/v1/zones/<region>/servers/<instance-id>/attach-filesystem' \
56+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
57+
-H "Content-Type: application/json" \
58+
-d '{"filesystem_id": "<my-fs-id>"}'
59+
```
60+
61+
Refer to the [Scaleway API documentation](https://www.scaleway.com/en/developers/api/instances/#path-instances-attach-a-filesystem-volume-to-an-instance) for more information on the different parameters.
62+
63+
## How to attach a file system using the CLI
64+
65+
Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal.
66+
67+
<Message type="note">
68+
To attach a file system to an Instance, you must use the [Instance CLI](https://cli.scaleway.com/instance/#attach-a-filesystem-volume-to-an-instance).
69+
</Message>
70+
71+
1. Make sure you have [installed and configured the Scaleway CLI](/scaleway-cli/quickstart/).
72+
73+
2. Run the command below to attach your file system to the desired Instance. Do not forget to replace the placeholders with the appropriate values.
74+
75+
```bash
76+
scw instance server attach-filesystem server-id=<instance_id> filesystem-id=<filesystem_id> zone=<availability_zone>
77+
```
78+
79+
Refer to the [Scaleway CLI documentation](https://cli.scaleway.com/instance/#attach-a-filesystem-volume-to-an-instance) for more information on the different parameters.

0 commit comments

Comments
 (0)