1. Packages
  2. New Relic
  3. API Docs
  4. cloud
  5. AzureLinkAccount
New Relic v5.36.1 published on Tuesday, Nov 12, 2024 by Pulumi

newrelic.cloud.AzureLinkAccount

Explore with Pulumi AI

newrelic logo
New Relic v5.36.1 published on Tuesday, Nov 12, 2024 by Pulumi

    Use this resource to link an Azure account to New Relic.

    Prerequisite

    Some configuration is required in Azure for the New Relic Azure cloud integrations to be able to pull data.

    To start receiving Azure data with New Relic Azure integrations, connect your Azure account 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 Azure for this resource to work properly. You can find instructions on how to set up Azure on our documentation.

    Example Usage

    You can also use the full example, including the Azure set up, found in our guides.

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.cloud.AzureLinkAccount("foo", {
        accountId: "The New Relic account ID where you want to link the Azure account",
        applicationId: "ID of the application",
        clientSecret: "Secret value of client's Azure account",
        subscriptionId: "Subscription ID of Azure",
        tenantId: "Tenant ID of the Azure",
        name: "Name of the linked account",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.cloud.AzureLinkAccount("foo",
        account_id="The New Relic account ID where you want to link the Azure account",
        application_id="ID of the application",
        client_secret="Secret value of client's Azure account",
        subscription_id="Subscription ID of Azure",
        tenant_id="Tenant ID of the Azure",
        name="Name of the linked account")
    
    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.NewAzureLinkAccount(ctx, "foo", &cloud.AzureLinkAccountArgs{
    			AccountId:      pulumi.String("The New Relic account ID where you want to link the Azure account"),
    			ApplicationId:  pulumi.String("ID of the application"),
    			ClientSecret:   pulumi.String("Secret value of client's Azure account"),
    			SubscriptionId: pulumi.String("Subscription ID of Azure"),
    			TenantId:       pulumi.String("Tenant ID of the Azure"),
    			Name:           pulumi.String("Name of the linked account"),
    		})
    		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.AzureLinkAccount("foo", new()
        {
            AccountId = "The New Relic account ID where you want to link the Azure account",
            ApplicationId = "ID of the application",
            ClientSecret = "Secret value of client's Azure account",
            SubscriptionId = "Subscription ID of Azure",
            TenantId = "Tenant ID of the Azure",
            Name = "Name of the linked account",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.cloud.AzureLinkAccount;
    import com.pulumi.newrelic.cloud.AzureLinkAccountArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 AzureLinkAccount("foo", AzureLinkAccountArgs.builder()
                .accountId("The New Relic account ID where you want to link the Azure account")
                .applicationId("ID of the application")
                .clientSecret("Secret value of client's Azure account")
                .subscriptionId("Subscription ID of Azure")
                .tenantId("Tenant ID of the Azure")
                .name("Name of the linked account")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:cloud:AzureLinkAccount
        properties:
          accountId: The New Relic account ID where you want to link the Azure account
          applicationId: ID of the application
          clientSecret: Secret value of client's Azure account
          subscriptionId: Subscription ID of Azure
          tenantId: Tenant ID of the Azure
          name: Name of the linked account
    

    Create AzureLinkAccount Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AzureLinkAccount(name: string, args: AzureLinkAccountArgs, opts?: CustomResourceOptions);
    @overload
    def AzureLinkAccount(resource_name: str,
                         args: AzureLinkAccountArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def AzureLinkAccount(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         application_id: Optional[str] = None,
                         client_secret: Optional[str] = None,
                         subscription_id: Optional[str] = None,
                         tenant_id: Optional[str] = None,
                         account_id: Optional[str] = None,
                         name: Optional[str] = None)
    func NewAzureLinkAccount(ctx *Context, name string, args AzureLinkAccountArgs, opts ...ResourceOption) (*AzureLinkAccount, error)
    public AzureLinkAccount(string name, AzureLinkAccountArgs args, CustomResourceOptions? opts = null)
    public AzureLinkAccount(String name, AzureLinkAccountArgs args)
    public AzureLinkAccount(String name, AzureLinkAccountArgs args, CustomResourceOptions options)
    
    type: newrelic:cloud:AzureLinkAccount
    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 AzureLinkAccountArgs
    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 AzureLinkAccountArgs
    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 AzureLinkAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AzureLinkAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AzureLinkAccountArgs
    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 azureLinkAccountResource = new NewRelic.Cloud.AzureLinkAccount("azureLinkAccountResource", new()
    {
        ApplicationId = "string",
        ClientSecret = "string",
        SubscriptionId = "string",
        TenantId = "string",
        AccountId = "string",
        Name = "string",
    });
    
    example, err := cloud.NewAzureLinkAccount(ctx, "azureLinkAccountResource", &cloud.AzureLinkAccountArgs{
    	ApplicationId:  pulumi.String("string"),
    	ClientSecret:   pulumi.String("string"),
    	SubscriptionId: pulumi.String("string"),
    	TenantId:       pulumi.String("string"),
    	AccountId:      pulumi.String("string"),
    	Name:           pulumi.String("string"),
    })
    
    var azureLinkAccountResource = new AzureLinkAccount("azureLinkAccountResource", AzureLinkAccountArgs.builder()
        .applicationId("string")
        .clientSecret("string")
        .subscriptionId("string")
        .tenantId("string")
        .accountId("string")
        .name("string")
        .build());
    
    azure_link_account_resource = newrelic.cloud.AzureLinkAccount("azureLinkAccountResource",
        application_id="string",
        client_secret="string",
        subscription_id="string",
        tenant_id="string",
        account_id="string",
        name="string")
    
    const azureLinkAccountResource = new newrelic.cloud.AzureLinkAccount("azureLinkAccountResource", {
        applicationId: "string",
        clientSecret: "string",
        subscriptionId: "string",
        tenantId: "string",
        accountId: "string",
        name: "string",
    });
    
    type: newrelic:cloud:AzureLinkAccount
    properties:
        accountId: string
        applicationId: string
        clientSecret: string
        name: string
        subscriptionId: string
        tenantId: string
    

    AzureLinkAccount 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 AzureLinkAccount resource accepts the following input properties:

    ApplicationId string
    Application ID of the App.
    ClientSecret string
    Secret Value of the client.
    SubscriptionId string
    Subscription ID of the Azure cloud account.
    TenantId string
    Tenant ID of the Azure cloud account.
    AccountId string
    Account ID of the New Relic.
    Name string
    The name of the application in New Relic APM.
    ApplicationId string
    Application ID of the App.
    ClientSecret string
    Secret Value of the client.
    SubscriptionId string
    Subscription ID of the Azure cloud account.
    TenantId string
    Tenant ID of the Azure cloud account.
    AccountId string
    Account ID of the New Relic.
    Name string
    The name of the application in New Relic APM.
    applicationId String
    Application ID of the App.
    clientSecret String
    Secret Value of the client.
    subscriptionId String
    Subscription ID of the Azure cloud account.
    tenantId String
    Tenant ID of the Azure cloud account.
    accountId String
    Account ID of the New Relic.
    name String
    The name of the application in New Relic APM.
    applicationId string
    Application ID of the App.
    clientSecret string
    Secret Value of the client.
    subscriptionId string
    Subscription ID of the Azure cloud account.
    tenantId string
    Tenant ID of the Azure cloud account.
    accountId string
    Account ID of the New Relic.
    name string
    The name of the application in New Relic APM.
    application_id str
    Application ID of the App.
    client_secret str
    Secret Value of the client.
    subscription_id str
    Subscription ID of the Azure cloud account.
    tenant_id str
    Tenant ID of the Azure cloud account.
    account_id str
    Account ID of the New Relic.
    name str
    The name of the application in New Relic APM.
    applicationId String
    Application ID of the App.
    clientSecret String
    Secret Value of the client.
    subscriptionId String
    Subscription ID of the Azure cloud account.
    tenantId String
    Tenant ID of the Azure cloud account.
    accountId String
    Account ID of the New Relic.
    name String
    The name of the application in New Relic APM.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AzureLinkAccount 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 AzureLinkAccount Resource

    Get an existing AzureLinkAccount 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?: AzureLinkAccountState, opts?: CustomResourceOptions): AzureLinkAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            application_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            name: Optional[str] = None,
            subscription_id: Optional[str] = None,
            tenant_id: Optional[str] = None) -> AzureLinkAccount
    func GetAzureLinkAccount(ctx *Context, name string, id IDInput, state *AzureLinkAccountState, opts ...ResourceOption) (*AzureLinkAccount, error)
    public static AzureLinkAccount Get(string name, Input<string> id, AzureLinkAccountState? state, CustomResourceOptions? opts = null)
    public static AzureLinkAccount get(String name, Output<String> id, AzureLinkAccountState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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 string
    Account ID of the New Relic.
    ApplicationId string
    Application ID of the App.
    ClientSecret string
    Secret Value of the client.
    Name string
    The name of the application in New Relic APM.
    SubscriptionId string
    Subscription ID of the Azure cloud account.
    TenantId string
    Tenant ID of the Azure cloud account.
    AccountId string
    Account ID of the New Relic.
    ApplicationId string
    Application ID of the App.
    ClientSecret string
    Secret Value of the client.
    Name string
    The name of the application in New Relic APM.
    SubscriptionId string
    Subscription ID of the Azure cloud account.
    TenantId string
    Tenant ID of the Azure cloud account.
    accountId String
    Account ID of the New Relic.
    applicationId String
    Application ID of the App.
    clientSecret String
    Secret Value of the client.
    name String
    The name of the application in New Relic APM.
    subscriptionId String
    Subscription ID of the Azure cloud account.
    tenantId String
    Tenant ID of the Azure cloud account.
    accountId string
    Account ID of the New Relic.
    applicationId string
    Application ID of the App.
    clientSecret string
    Secret Value of the client.
    name string
    The name of the application in New Relic APM.
    subscriptionId string
    Subscription ID of the Azure cloud account.
    tenantId string
    Tenant ID of the Azure cloud account.
    account_id str
    Account ID of the New Relic.
    application_id str
    Application ID of the App.
    client_secret str
    Secret Value of the client.
    name str
    The name of the application in New Relic APM.
    subscription_id str
    Subscription ID of the Azure cloud account.
    tenant_id str
    Tenant ID of the Azure cloud account.
    accountId String
    Account ID of the New Relic.
    applicationId String
    Application ID of the App.
    clientSecret String
    Secret Value of the client.
    name String
    The name of the application in New Relic APM.
    subscriptionId String
    Subscription ID of the Azure cloud account.
    tenantId String
    Tenant ID of the Azure cloud account.

    Import

    Linked Azure accounts can be imported using id, you can find the id of existing Azure linked accounts in Azure dashboard under Infrastructure in NewRelic

    bash

    $ pulumi import newrelic:cloud/azureLinkAccount:AzureLinkAccount 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 newrelic Terraform Provider.
    newrelic logo
    New Relic v5.36.1 published on Tuesday, Nov 12, 2024 by Pulumi