This guide shows you how to import a cryptographic key into Cloud HSM or Cloud Key Management Service as a new key version.
For more details about importing keys, including limitations and restrictions, see key import.
You can complete the steps in this guide in 5 to 10 minutes, not including the Before you begin steps. Wrapping the key manually adds complexity to the task.
Before you begin
We recommend that you create a new project to test this feature, to ease clean-up after testing and to ensure that you have adequate Identity and Access Management (IAM) permissions to import a key.
Before you can import a key, you need to prepare the project, the local system, and the key itself.
Preparing the project
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.