Skip to main content

Creating a GCP Service Account for Nife-Cost Integration

To enable Nife-Cost to collect your GCP resources, you need to set up a Service Account with the necessary permissions. Follow these steps to create the Service Account and obtain the JSON key.

Step 1: Create a Service Account​

  1. Go to the GCP Console: Open the Google Cloud Console at https://console.cloud.google.com/.

  2. Select or Create a Project: Ensure you have the correct project selected, or create a new project if necessary. You can select a project from the project dropdown at the top of the page.

  3. Navigate to the IAM & Admin: In the left-hand menu, click on IAM & Admin, then select Service Accounts.

  4. Create a Service Account:

    • Click + CREATE SERVICE ACCOUNT.
    • Enter a Service Account Name (e.g., Nife-Cost-read-only).
    • (Optional) Enter a Service Account Description.
    • Click CREATE AND CONTINUE.
  5. Grant the Service Account Permissions:

    • In the Grant this service account access to project section, click Select a role.
    • Choose Viewer under the Basic category to provide read-only access.
    • Click + ADD ANOTHER ROLE.
    • Select Storage Object Viewer to list Buckets.
    • Click + ADD ANOTHER ROLE.
    • Select Compute Viewer to list VM instances.
    • Click + ADD ANOTHER ROLE.
    • Select Monitoring Viewer to allow for cost estimation of your Buckets.
    • Click CONTINUE.
  6. Skip Granting Users Access:

    • Click DONE on the next screen to skip granting users access to this service account.

Step 2: Create and Download the JSON Key​

  1. Navigate to the Service Account:

    • Find the newly created service account in the list and click on it.
  2. Create a Key:

    • Click on the KEYS tab.
    • Click ADD KEY, then select Create new key.
    • Ensure the key type is set to JSON and click CREATE.
  3. Download the JSON Key:

    • The JSON key file will be automatically downloaded to your computer. Store this file securely, as it contains the credentials needed to authenticate Nife-Cost with your GCP account.

Step 3: Connect GCP Account in Nife Dashboard​

  1. In the Nife console, navigate to Cloud Accounts from the left navigation.
  2. Click + Add Account (indicated by the arrow below).
  3. Select Google Cloud Platform (GCP), assign an account label, and upload or paste the JSON service account key.
Connect GCP Account in Nife Cloud Accounts