Creating a Service Account for DuploCloud GCP and adding a private key
A service account and a key are created for each GCP project to be onboarded.
Login to the GCP Console and select the desired project.
Open the navigation pane at the top left of the home page ( ), and select IAM & Admin -> Organization Policies.
Filter and search for iam.disableServiceAccountKeyCreation.
Click the options menu ( ) and select Edit policy.
Add a Rule (Rule 1 in the graphic below) to turn off enablement.
In the left navigation pane, click IAM & Admin -> Service Accounts. The Service Accounts page for your project displays.
Click Create Service Account. The Create service account wizard opens.
Complete Service Account Details.
In the Grant this service account access to project step, assign the Owner role as shown below, giving the account owner permission to the project. Complete the wizard, and click Done.
Select the Service Account you created and add a new JSON Key.
Download the JSON file and give it a meaningful name, such as my-gcp-project-sa-key.json
.
Open a Terminal window and navigate to the location of the downloaded JSON file.
Run the following command. This copies the key contents on your clipboard. You can verify the contents by pasting it into a text editor.
To add the private key to DuploCloud:
Login to the DuploCloud and navigate to Administrator -> Cloud Credentials. The Cloud Credentials page displays.
Paste the key in the Service Account Private Key field.
Enter a Display name for easy reference. Ideally, this name should include the project name.
Enter the Project ID and Service Account Email from the JSON key file you downloaded.
Click Submit.