1. Packages
  2. Packages
  3. Newrelic Provider
  4. API Docs
  5. cloud
  6. GcpLinkAccount
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
newrelic logo
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    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. bash

     $ pulumi import newrelic:cloud/gcpLinkAccount:GcpLinkAccount newrelic_cloud_gcp_link_account.foo <id>
    

    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[int] = None,
                       name: Optional[str] = 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.
    
    

    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 = 0,
        Name = "string",
    });
    
    example, err := cloud.NewGcpLinkAccount(ctx, "gcpLinkAccountResource", &cloud.GcpLinkAccountArgs{
    	ProjectId: pulumi.String("string"),
    	AccountId: pulumi.Int(0),
    	Name:      pulumi.String("string"),
    })
    
    var gcpLinkAccountResource = new GcpLinkAccount("gcpLinkAccountResource", GcpLinkAccountArgs.builder()
        .projectId("string")
        .accountId(0)
        .name("string")
        .build());
    
    gcp_link_account_resource = newrelic.cloud.GcpLinkAccount("gcpLinkAccountResource",
        project_id="string",
        account_id=0,
        name="string")
    
    const gcpLinkAccountResource = new newrelic.cloud.GcpLinkAccount("gcpLinkAccountResource", {
        projectId: "string",
        accountId: 0,
        name: "string",
    });
    
    type: newrelic:cloud:GcpLinkAccount
    properties:
        accountId: 0
        name: string
        projectId: string
    

    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:

    ProjectId string
    • Project ID of the GCP account.
    AccountId int
    • Account ID of the New Relic account.
    Name string
    • The name of the GCP account in New Relic.
    ProjectId string
    • Project ID of the GCP account.
    AccountId int
    • Account ID of the New Relic account.
    Name string
    • The name of the GCP account in New Relic.
    projectId String
    • Project ID of the GCP account.
    accountId Integer
    • Account ID of the New Relic account.
    name String
    • The name of the GCP account in New Relic.
    projectId string
    • Project ID of the GCP account.
    accountId number
    • Account ID of the New Relic account.
    name string
    • The name of the GCP account in New Relic.
    project_id str
    • Project ID of the GCP account.
    account_id int
    • Account ID of the New Relic account.
    name str
    • The name of the GCP account in New Relic.
    projectId String
    • Project ID of the GCP account.
    accountId Number
    • Account ID of the New Relic account.
    name String
    • The name of the GCP account in New Relic.

    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 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[int] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None) -> GcpLinkAccount
    func 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}
    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.
    The following state arguments are supported:
    AccountId int
    • Account ID of the New Relic account.
    Name string
    • The name of the GCP account in New Relic.
    ProjectId string
    • Project ID of the GCP account.
    AccountId int
    • Account ID of the New Relic account.
    Name string
    • The name of the GCP account in New Relic.
    ProjectId string
    • Project ID of the GCP account.
    accountId Integer
    • Account ID of the New Relic account.
    name String
    • The name of the GCP account in New Relic.
    projectId String
    • Project ID of the GCP account.
    accountId number
    • Account ID of the New Relic account.
    name string
    • The name of the GCP account in New Relic.
    projectId string
    • Project ID of the GCP account.
    account_id int
    • Account ID of the New Relic account.
    name str
    • The name of the GCP account in New Relic.
    project_id str
    • Project ID of the GCP account.
    accountId Number
    • Account ID of the New Relic account.
    name String
    • The name of the GCP account in New Relic.
    projectId String
    • Project ID of the GCP account.

    Package Details

    Repository
    New Relic pulumi/pulumi-newrelic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the newrelic Terraform Provider.
    newrelic logo
    Viewing docs for New Relic v4.20.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.