• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

Manually integrate your Google Cloud Platform

Workload Identity Federation (WIF) lets New Relic access your GCP metrics using short-lived tokens instead of long-lived keys. You create and control the service account in your own GCP project, so New Relic never stores static credentials.

This guide covers manual setup through the New Relic UI. If you prefer infrastructure as code, see Automate with Terraform.

ヒント

Already have projects connected with a service account? Add new projects with WIF alongside them — both methods work under the same New Relic account. Just follow this guide to add a WIF-based connection.

Requirements

These are the requirements for the integration:

Requirement

Details

New Relic account

You need a New Relic account with admin permissions. If you don't have one already, create a New Relic account.

GCP APIs

In your GCP project's API & Services Library, enable five APIs: IAM, Security Token Service, Service Account Credentials, Stackdriver Monitoring, and Asset. For the full list with links, see Enable required GCP APIs.

GCP permissions

You need permissions to create service accounts, workload identity pools, and IAM bindings — typically the Owner or IAM Admin role.

Service account

You create a service account with the Viewer, Service Usage Consumer, Cloud Asset Viewer, and Folder Viewer roles. New Relic impersonates this account to read your metrics. For setup steps, see Create or select a service account.

Workload Identity Pool

A WIF pool with an OIDC provider configured to trust New Relic. The setup wizard guides you through creating it. For setup steps, see Create a Workload Identity Pool through Configure provider attributes.

重要

Due to security and compliance requirements, you must not use the New Relic GCP integration if your accounts or data fall under FedRAMP. Use of this feature with FedRAMP regulated accounts is strictly prohibited.

Manually integrate GCP

Start the integration in New Relic

  1. Go to Infrastructure > Google Cloud Platform in New Relic.
  2. Select Add a GCP account (or the primary action button if this is your first integration).
  3. Select the New Relic account you want to use.
  4. Under Select instrumentation method, choose Workload Identity Federation.
  5. Under Choose setup method, select Manually integrate your GCP project or folder.

Enable required GCP APIs

  1. Enable these five APIs in your GCP project. They let New Relic authenticate and collect data:

  2. Confirm the checkbox once all five are enabled, then select Continue.

Create or select a service account

In your GCP project, create a service account for New Relic to impersonate:

  1. In the GCP Console, go to IAM & Admin > Service Accounts.

  2. Create a new service account, or use an existing one.

  3. Assign the following roles to the service account:

    • Viewer

    • Service Usage Consumer

    • Cloud Asset Viewer

    • Folder Viewer (required only for integrations configured at the folder level)
  4. Select Save.

    重要

    To monitor every project in a folder through one connection, grant these roles on the folder instead of on a single project. See Integrate at the folder level.

Create a Workload Identity Pool

A workload identity pool is a container for external identities (such as New Relic) that you trust.

  1. In the GCP Console, go to IAM & Admin > Workload Identity Federation.
  2. Select Get Started (or Create Pool).
  3. Enter a pool name and description, then enable the pool.
  4. Select Continue.

Add an OIDC provider to the pool

This tells GCP to trust tokens signed by New Relic.

  1. Under Select a provider, choose OpenID Connect (OIDC).

  2. Copy these values from the New Relic UI into the GCP Console:

    • Provider pool name: shown in the New Relic setup screen.
    • Issuer URL: shown in the New Relic setup screen (for example, https://oidc.newrelic.com/r/gcp-cmp).
  3. Under Allowed audiences, select it and keep the default audience unselected.

  4. Copy the Audience URL from the New Relic UI.

  5. Select Continue.

Configure provider attributes

Attribute mappings tell GCP how to read New Relic's tokens. Add these two mappings:

Google attributeOIDC attribute
google.subjectassertion.sub
attribute.nr_account_idassertion.nr_account_id

The New Relic UI shows your account ID pre-filled. Copy it into the condition field in GCP.

重要

The attribute condition ensures only your New Relic account can use this pool. Without it, any New Relic account could potentially access your GCP project.

Grant access to the pool

Connect the identity pool to your service account so New Relic can impersonate it:

  1. In the pool details, select Grant Access.

  2. Enable Grant access using service account impersonation.

  3. Select the service account you created in the Create or select a service account step.

  4. Under Add principals, select Principal with access.

  5. Add the identity attribute nr_account_id with your New Relic account ID value.

  6. Select Save.

Download and upload the configuration file

This step links your GCP setup to New Relic:

  1. In the GCP Console, in the pool's Connected Service Accounts section, select the service account.

  2. Set these parameters:

    • Service Provider: select the provider you just created.
    • OIDC ID Token Path: select /
    • Format Type: JSON
  3. Select Download Config to get a JSON file.

  4. Return to the New Relic setup screen and upload this JSON file.

    New Relic validates the configuration with a test authentication. If it succeeds, you'll see a Connection succeeded message.

    重要

    Don't close the browser tab before selecting Continue after uploading. If you do, you lose your progress.

Select projects and services

After the connection is verified:

  1. New Relic lists the GCP projects your service account can access.

  2. Expand a project to see available services.

  3. Select the services you want to monitor.

  4. Select Instrument to start collecting data.

    Services fall into two categories:

  • Full entity support — metrics, entities in the entity explorer, and dashboards.
  • Metrics only — New Relic collects metrics, but doesn't create an entity.

Integrate at the folder level

With Workload Identity Federation, you can integrate a single project or an entire folder of projects. In GCP, when you grant IAM roles at the folder level, every project within that folder inherits them. So if you grant the service account's roles on a folder instead of on one project, New Relic can monitor all the projects in that folder through a single connection.

To do this, in Create or select a service account grant the service account the Viewer, Service Usage Consumer, Cloud Asset Viewer, and Folder Viewer roles on the folder rather than on a single project. When you reach Select projects and services, New Relic lists every project in that folder so you can choose which ones to monitor.

View your GCP data

After you complete the setup, New Relic starts monitoring your GCP data at regular polling intervals, and your data appears in the New Relic UI after a few minutes. To learn how to view, query, and explore it — including dashboards, alerts, and entities — see View and query your GCP data.

A single WIF configuration grants access to the GCP projects your service account has permissions for. During setup, New Relic lists all accessible projects so you can select which ones to monitor.

To monitor additional GCP projects later:

  • If the new projects are in the same GCP organization and your service account already has access, go to Infrastructure > GCP > Manage services and add them.
  • If the new projects require a different service account or identity pool, repeat the setup to create a new WIF connection.

Manage services

After setup, you can change which services are monitored for each project:

  1. Go to one.newrelic.com > All capabilities > Infrastructure > GCP.
  2. Select Manage services next to your account.
  3. Toggle services on or off per project.
  4. Save your changes.

You can disable individual services or completely disconnect your GCP project from New Relic.

Disable one or more GCP services

  1. Go to Infrastructure > GCP > Manage services.
  2. Clear the checkbox for each service you want to disable.
  3. Save your changes.

Disconnect the GCP account entirely

  1. Go to Infrastructure > GCP > Manage services.
  2. Select Unlink this account.
  3. Save your changes.

After unlinking in New Relic, clean up on the GCP side:

  1. Open the GCP Console and go to IAM & Admin > Workload Identity Federation.
  2. Delete the identity pool you created for New Relic, or remove the OIDC provider from it.
  3. Optionally, delete the service account if it was created solely for New Relic.
Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.