Fortinet Document Library

Version:


Table of Contents

GCP Cookbook

Resources

Upgrade Path Tool

GCP Cookbook

6.2.0
Download PDF
Copy Link

Creating a GCP service account

  1. Log into the GCP Compute Portal.

  2. Go to IAM & admin > Service accounts.
  3. Create a service account. If you enabled metadata IAM access in Configuring GCP SDN Connector on FortiGate for GCP, you do not need to create a service account.
    1. Name the account, then click CREATE.

    2. From the Role dropdown list, select Viewer, then click CONTINUE.
    3. (Optional) Configure user access.
  4. Create the service account key. This example describes creating a private key in JSON format.
  5. Once created, the key automatically downloads to your PC. Click Done.
  6. Use a text editor to open the downloaded key. Find the line “"private_key": "-----BEGIN PRIVATE KEY-----\n……” This line contains line breaks with "\n". Therefore, copying and pasting the line into the FortiOS GUI will not work.
  7. Remove "\n" using a tool or command of your choice. For example, the Linux command shown removes "\n". In this example, output.json is the downloaded key file which includes line breaks:

    $cat <output>.json | sed -e 's/\\n/\n/g'

  8. Copy and paste the key content into the FortiOS GUI.

Resources

Creating a GCP service account

  1. Log into the GCP Compute Portal.

  2. Go to IAM & admin > Service accounts.
  3. Create a service account. If you enabled metadata IAM access in Configuring GCP SDN Connector on FortiGate for GCP, you do not need to create a service account.
    1. Name the account, then click CREATE.

    2. From the Role dropdown list, select Viewer, then click CONTINUE.
    3. (Optional) Configure user access.
  4. Create the service account key. This example describes creating a private key in JSON format.
  5. Once created, the key automatically downloads to your PC. Click Done.
  6. Use a text editor to open the downloaded key. Find the line “"private_key": "-----BEGIN PRIVATE KEY-----\n……” This line contains line breaks with "\n". Therefore, copying and pasting the line into the FortiOS GUI will not work.
  7. Remove "\n" using a tool or command of your choice. For example, the Linux command shown removes "\n". In this example, output.json is the downloaded key file which includes line breaks:

    $cat <output>.json | sed -e 's/\\n/\n/g'

  8. Copy and paste the key content into the FortiOS GUI.