1. Packages
  2. Azure Classic
  3. API Docs
  4. core
  5. getClientConfig

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.core.getClientConfig

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Use this data source to access the configuration of the AzureRM provider.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const current = azure.core.getClientConfig({});
    export const accountId = current.then(current => current.clientId);
    
    import pulumi
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    pulumi.export("accountId", current.client_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("accountId", current.ClientId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Azure.Core.GetClientConfig.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["accountId"] = current.Apply(getClientConfigResult => getClientConfigResult.ClientId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    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) {
            final var current = CoreFunctions.getClientConfig();
    
            ctx.export("accountId", current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()));
        }
    }
    
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
    outputs:
      accountId: ${current.clientId}
    

    Using getClientConfig

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getClientConfig(opts?: InvokeOptions): Promise<GetClientConfigResult>
    function getClientConfigOutput(opts?: InvokeOptions): Output<GetClientConfigResult>
    def get_client_config(opts: Optional[InvokeOptions] = None) -> GetClientConfigResult
    def get_client_config_output(opts: Optional[InvokeOptions] = None) -> Output[GetClientConfigResult]
    func GetClientConfig(ctx *Context, opts ...InvokeOption) (*GetClientConfigResult, error)
    func GetClientConfigOutput(ctx *Context, opts ...InvokeOption) GetClientConfigResultOutput

    > Note: This function is named GetClientConfig in the Go SDK.

    public static class GetClientConfig 
    {
        public static Task<GetClientConfigResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetClientConfigResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClientConfigResult> getClientConfig(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:core/getClientConfig:getClientConfig
      arguments:
        # arguments dictionary

    getClientConfig Result

    The following output properties are available:

    ClientId string
    is set to the Azure Client ID (Application Object ID).
    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    is set to the Azure Object ID.
    SubscriptionId string
    is set to the Azure Subscription ID.
    TenantId string
    is set to the Azure Tenant ID.
    ClientId string
    is set to the Azure Client ID (Application Object ID).
    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    is set to the Azure Object ID.
    SubscriptionId string
    is set to the Azure Subscription ID.
    TenantId string
    is set to the Azure Tenant ID.
    clientId String
    is set to the Azure Client ID (Application Object ID).
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    is set to the Azure Object ID.
    subscriptionId String
    is set to the Azure Subscription ID.
    tenantId String
    is set to the Azure Tenant ID.
    clientId string
    is set to the Azure Client ID (Application Object ID).
    id string
    The provider-assigned unique ID for this managed resource.
    objectId string
    is set to the Azure Object ID.
    subscriptionId string
    is set to the Azure Subscription ID.
    tenantId string
    is set to the Azure Tenant ID.
    client_id str
    is set to the Azure Client ID (Application Object ID).
    id str
    The provider-assigned unique ID for this managed resource.
    object_id str
    is set to the Azure Object ID.
    subscription_id str
    is set to the Azure Subscription ID.
    tenant_id str
    is set to the Azure Tenant ID.
    clientId String
    is set to the Azure Client ID (Application Object ID).
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    is set to the Azure Object ID.
    subscriptionId String
    is set to the Azure Subscription ID.
    tenantId String
    is set to the Azure Tenant ID.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi