published on Wednesday, Aug 12, 2026 by Pulumi
published on Wednesday, Aug 12, 2026 by Pulumi
Use this resource to link a GCP account to New Relic.
Prerequisite
To start receiving Google Cloud Platform (GCP) data with New Relic GCP integrations, connect your Google project to New Relic infrastructure monitoring. If you don’t have one already, create a New Relic account. It’s free, forever.
Setup is required in GCP for this resource to work properly. The New Relic GCP integration can be done by creating a user account or a service account.
A user with Project IAM Admin role is needed to add the service account ID as a member in your GCP project.
In the GCP project IAM & admin, the service account must have the Project Viewer role and the Service Usage Consumer role or, alternatively, a custom role.
Follow the steps outlined here to set up the integration.
Example Usage
You can also use the full example, including the GCP set up, found in our guides.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.cloud.GcpLinkAccount("foo", {
accountId: "account id of newrelic account",
projectId: "id of the Project",
name: "account name",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.cloud.GcpLinkAccount("foo",
account_id="account id of newrelic account",
project_id="id of the Project",
name="account name")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/cloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloud.NewGcpLinkAccount(ctx, "foo", &cloud.GcpLinkAccountArgs{
AccountId: pulumi.String("account id of newrelic account"),
ProjectId: pulumi.String("id of the Project"),
Name: pulumi.String("account name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.Cloud.GcpLinkAccount("foo", new()
{
AccountId = "account id of newrelic account",
ProjectId = "id of the Project",
Name = "account name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.cloud.GcpLinkAccount;
import com.pulumi.newrelic.cloud.GcpLinkAccountArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new GcpLinkAccount("foo", GcpLinkAccountArgs.builder()
.accountId("account id of newrelic account")
.projectId("id of the Project")
.name("account name")
.build());
}
}
resources:
foo:
type: newrelic:cloud:GcpLinkAccount
properties:
accountId: account id of newrelic account
projectId: id of the Project
name: account name
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cloud_gcplinkaccount" "foo" {
account_id = "account id of newrelic account"
project_id = "id of the Project"
name = "account name"
}
GCP Dimensional Metrics (keyless / WIF) linking
To link a GCP project for GCP Dimensional Metrics using keyless authentication via Workload Identity Federation (WIF) instead of a service-account key, set useWorkloadIdentityFederation = true and provide audience and serviceAccountEmail. When enabled, the resource authenticates via WIF and links the project as a Dimensional Metrics account. Use this linked account with the newrelic.cloud.GcpDmIntegrations resource.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const dm = new newrelic.cloud.GcpLinkAccount("dm", {
accountId: "account id of newrelic account",
name: "account name",
projectId: "id of the Project",
useWorkloadIdentityFederation: true,
audience: "//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider",
serviceAccountEmail: "newrelic-integration@my-project.iam.gserviceaccount.com",
});
import pulumi
import pulumi_newrelic as newrelic
dm = newrelic.cloud.GcpLinkAccount("dm",
account_id="account id of newrelic account",
name="account name",
project_id="id of the Project",
use_workload_identity_federation=True,
audience="//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider",
service_account_email="newrelic-integration@my-project.iam.gserviceaccount.com")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/cloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloud.NewGcpLinkAccount(ctx, "dm", &cloud.GcpLinkAccountArgs{
AccountId: pulumi.String("account id of newrelic account"),
Name: pulumi.String("account name"),
ProjectId: pulumi.String("id of the Project"),
UseWorkloadIdentityFederation: pulumi.Bool(true),
Audience: pulumi.String("//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider"),
ServiceAccountEmail: pulumi.String("newrelic-integration@my-project.iam.gserviceaccount.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var dm = new NewRelic.Cloud.GcpLinkAccount("dm", new()
{
AccountId = "account id of newrelic account",
Name = "account name",
ProjectId = "id of the Project",
UseWorkloadIdentityFederation = true,
Audience = "//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider",
ServiceAccountEmail = "newrelic-integration@my-project.iam.gserviceaccount.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.cloud.GcpLinkAccount;
import com.pulumi.newrelic.cloud.GcpLinkAccountArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dm = new GcpLinkAccount("dm", GcpLinkAccountArgs.builder()
.accountId("account id of newrelic account")
.name("account name")
.projectId("id of the Project")
.useWorkloadIdentityFederation(true)
.audience("//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider")
.serviceAccountEmail("newrelic-integration@my-project.iam.gserviceaccount.com")
.build());
}
}
resources:
dm:
type: newrelic:cloud:GcpLinkAccount
properties:
accountId: account id of newrelic account
name: account name
projectId: id of the Project
useWorkloadIdentityFederation: true
audience: //iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider
serviceAccountEmail: newrelic-integration@my-project.iam.gserviceaccount.com
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cloud_gcplinkaccount" "dm" {
account_id = "account id of newrelic account"
name = "account name"
project_id = "id of the Project"
use_workload_identity_federation = true
audience = "//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/newrelic-wif-pool/providers/newrelic-oidc-provider"
service_account_email = "newrelic-integration@my-project.iam.gserviceaccount.com"
}
Create GcpLinkAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GcpLinkAccount(name: string, args: GcpLinkAccountArgs, opts?: CustomResourceOptions);@overload
def GcpLinkAccount(resource_name: str,
args: GcpLinkAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GcpLinkAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
account_id: Optional[str] = None,
audience: Optional[str] = None,
name: Optional[str] = None,
service_account_email: Optional[str] = None,
use_workload_identity_federation: Optional[bool] = None)func NewGcpLinkAccount(ctx *Context, name string, args GcpLinkAccountArgs, opts ...ResourceOption) (*GcpLinkAccount, error)public GcpLinkAccount(string name, GcpLinkAccountArgs args, CustomResourceOptions? opts = null)
public GcpLinkAccount(String name, GcpLinkAccountArgs args)
public GcpLinkAccount(String name, GcpLinkAccountArgs args, CustomResourceOptions options)
type: newrelic:cloud:GcpLinkAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "newrelic_cloud_gcp_link_account" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args GcpLinkAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GcpLinkAccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GcpLinkAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GcpLinkAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GcpLinkAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var gcpLinkAccountResource = new NewRelic.Cloud.GcpLinkAccount("gcpLinkAccountResource", new()
{
ProjectId = "string",
AccountId = "string",
Audience = "string",
Name = "string",
ServiceAccountEmail = "string",
UseWorkloadIdentityFederation = false,
});
example, err := cloud.NewGcpLinkAccount(ctx, "gcpLinkAccountResource", &cloud.GcpLinkAccountArgs{
ProjectId: pulumi.String("string"),
AccountId: pulumi.String("string"),
Audience: pulumi.String("string"),
Name: pulumi.String("string"),
ServiceAccountEmail: pulumi.String("string"),
UseWorkloadIdentityFederation: pulumi.Bool(false),
})
resource "newrelic_cloud_gcp_link_account" "gcpLinkAccountResource" {
lifecycle {
create_before_destroy = true
}
project_id = "string"
account_id = "string"
audience = "string"
name = "string"
service_account_email = "string"
use_workload_identity_federation = false
}
var gcpLinkAccountResource = new GcpLinkAccount("gcpLinkAccountResource", GcpLinkAccountArgs.builder()
.projectId("string")
.accountId("string")
.audience("string")
.name("string")
.serviceAccountEmail("string")
.useWorkloadIdentityFederation(false)
.build());
gcp_link_account_resource = newrelic.cloud.GcpLinkAccount("gcpLinkAccountResource",
project_id="string",
account_id="string",
audience="string",
name="string",
service_account_email="string",
use_workload_identity_federation=False)
const gcpLinkAccountResource = new newrelic.cloud.GcpLinkAccount("gcpLinkAccountResource", {
projectId: "string",
accountId: "string",
audience: "string",
name: "string",
serviceAccountEmail: "string",
useWorkloadIdentityFederation: false,
});
type: newrelic:cloud:GcpLinkAccount
properties:
accountId: string
audience: string
name: string
projectId: string
serviceAccountEmail: string
useWorkloadIdentityFederation: false
GcpLinkAccount Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GcpLinkAccount resource accepts the following input properties:
- Project
Id string - Project ID of the GCP account.
- Account
Id string - Account ID of the New Relic account.
- Audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - Name string
- The name of the GCP account in New Relic.
- Service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- Use
Workload boolIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- Project
Id string - Project ID of the GCP account.
- Account
Id string - Account ID of the New Relic account.
- Audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - Name string
- The name of the GCP account in New Relic.
- Service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- Use
Workload boolIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- project_
id string - Project ID of the GCP account.
- account_
id string - Account ID of the New Relic account.
- audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name string
- The name of the GCP account in New Relic.
- service_
account_ stringemail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use_
workload_ boolidentity_ federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- project
Id String - Project ID of the GCP account.
- account
Id String - Account ID of the New Relic account.
- audience String
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name String
- The name of the GCP account in New Relic.
- service
Account StringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload BooleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- project
Id string - Project ID of the GCP account.
- account
Id string - Account ID of the New Relic account.
- audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name string
- The name of the GCP account in New Relic.
- service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload booleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- project_
id str - Project ID of the GCP account.
- account_
id str - Account ID of the New Relic account.
- audience str
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name str
- The name of the GCP account in New Relic.
- service_
account_ stremail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use_
workload_ boolidentity_ federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- project
Id String - Project ID of the GCP account.
- account
Id String - Account ID of the New Relic account.
- audience String
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name String
- The name of the GCP account in New Relic.
- service
Account StringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload BooleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
Outputs
All input properties are implicitly available as output properties. Additionally, the GcpLinkAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GcpLinkAccount Resource
Get an existing GcpLinkAccount resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GcpLinkAccountState, opts?: CustomResourceOptions): GcpLinkAccount@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
audience: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
service_account_email: Optional[str] = None,
use_workload_identity_federation: Optional[bool] = None) -> GcpLinkAccountfunc GetGcpLinkAccount(ctx *Context, name string, id IDInput, state *GcpLinkAccountState, opts ...ResourceOption) (*GcpLinkAccount, error)public static GcpLinkAccount Get(string name, Input<string> id, GcpLinkAccountState? state, CustomResourceOptions? opts = null)public static GcpLinkAccount get(String name, Output<String> id, GcpLinkAccountState state, CustomResourceOptions options)resources: _: type: newrelic:cloud:GcpLinkAccount get: id: ${id}import {
to = newrelic_cloud_gcp_link_account.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Account ID of the New Relic account.
- Audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - Name string
- The name of the GCP account in New Relic.
- Project
Id string - Project ID of the GCP account.
- Service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- Use
Workload boolIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- Account
Id string - Account ID of the New Relic account.
- Audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - Name string
- The name of the GCP account in New Relic.
- Project
Id string - Project ID of the GCP account.
- Service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- Use
Workload boolIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- account_
id string - Account ID of the New Relic account.
- audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name string
- The name of the GCP account in New Relic.
- project_
id string - Project ID of the GCP account.
- service_
account_ stringemail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use_
workload_ boolidentity_ federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- account
Id String - Account ID of the New Relic account.
- audience String
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name String
- The name of the GCP account in New Relic.
- project
Id String - Project ID of the GCP account.
- service
Account StringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload BooleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- account
Id string - Account ID of the New Relic account.
- audience string
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name string
- The name of the GCP account in New Relic.
- project
Id string - Project ID of the GCP account.
- service
Account stringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload booleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- account_
id str - Account ID of the New Relic account.
- audience str
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name str
- The name of the GCP account in New Relic.
- project_
id str - Project ID of the GCP account.
- service_
account_ stremail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use_
workload_ boolidentity_ federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
- account
Id String - Account ID of the New Relic account.
- audience String
- The Workload Identity Federation pool provider audience URI. Format:
//iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/providers/{PROVIDER_ID}. Required whenuseWorkloadIdentityFederation = true. - name String
- The name of the GCP account in New Relic.
- project
Id String - Project ID of the GCP account.
- service
Account StringEmail The GCP service account email New Relic impersonates to collect metrics when linking via WIF. The service account must grant the WIF pool the
roles/iam.workloadIdentityUserbinding. Required whenuseWorkloadIdentityFederation = true.NOTE:
audienceandserviceAccountEmailare write-only,ForceNewfields used to construct the WIF credential internally; they are never returned by the API and are retained from state. When importing a WIF-linked account, also setuseWorkloadIdentityFederation = truein your configuration (it is not returned by the API and defaults tofalse), and addaudienceandserviceAccountEmailtoImportStateVerifyIgnore(or runpulumi upafterwards to reconcile them).WARNING: Starting with v3.27.2 of the New Relic Terraform Provider, updating any of the aforementioned attributes (except
name) of anewrelic.cloud.GcpLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.- use
Workload BooleanIdentity Federation - Set to
trueto link the GCP account for GCP Dimensional Metrics using keyless Workload Identity Federation (WIF) instead of a service-account key. Whentrue,audienceandserviceAccountEmailare required. Defaults tofalse(legacy service-account-key linking).
Import
Linked GCP accounts can be imported using id, you can find the id of an existing GCP linked accounts in GCP dashboard under Infrastructure in Newrelic Console.
$ pulumi import newrelic:cloud/gcpLinkAccount:GcpLinkAccount foo <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Wednesday, Aug 12, 2026 by Pulumi