Suggest an edit

Creating and migrating a secret into a specific path using the CLI and Go

Reviewed on 13 February 2024Published on 03 October 2023

This documentation allows you to create a secret called ultra-confidential and to migrate it into /confidential-path using the Scaleway CLI and the Go programming language.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • Configured the Scaleway CLI
  1. Open a terminal and run the following command to clone the repository containing the code you need to complete the procedure:

    git clone
  2. 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=""
  3. Use the following command to access the tutorial-sem-folder-migrate directory:

    cd tutorial-sem-folder-migrate
  4. Run go run ./main.go to launch the creation of your secret and the migration process.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway