Creating and migrating a secret into a folder using the CLI and Go
This documentation allows you to create a secret called
ultra-confidential, a folder called
/confidential-folder and to migrate the
ultra-confidential secret into
/confidential-folder using the Scaleway CLI and the Go programming language.
You may need certain IAM permissions to carry out some actions described on this page. This means:
Open a terminal and run the following command to clone the repository containing the code you need to complete the procedure:git clone email@example.com:scaleway/tutorial-sem-folder-migrate.git
In the same terminal, paste the following commands to export your environment variables. Make sure you add your own variables.export SCW_ACCESS_KEY=<Scaleway access key>export SCW_SECRET_KEY=<Scaleway secret key>export SCW_DEFAULT_ORGANIZATION_ID=<Scaleway default Organization>export SCW_DEFAULT_PROJECT_ID=<Scaleway default Project>export SCW_DEFAULT_REGION="fr-par"export SCW_API_URL="https://api.scaleway.com"
Use the following command to access the
go run ./main.goto launch the creation of your secret, your folder and the migration process.
Refer to the dedicated documentation to learn how to migrate existing secrets into folders using the CLI and Go.