We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access the configuration of the AzureRM provider.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
this.AccountId = current.Apply(current => current.ClientId);
}
[Output("accountId")]
public Output<string> AccountId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/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
})
}
Example coming soon!
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)
Example coming soon!
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)
public static Output<GetClientConfigResult> getClientConfig(InvokeOptions options)
fn::invoke:
function: azure:core/getClientConfig:getClientConfig
arguments:
# arguments dictionarygetClientConfig Result
The following output properties are available:
- Client
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Object
Id string - Subscription
Id string - Tenant
Id string
- Client
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Object
Id string - Subscription
Id string - Tenant
Id string
- client
Id String - id String
- The provider-assigned unique ID for this managed resource.
- object
Id String - subscription
Id String - tenant
Id String
- client
Id string - id string
- The provider-assigned unique ID for this managed resource.
- object
Id string - subscription
Id string - tenant
Id string
- client_
id str - id str
- The provider-assigned unique ID for this managed resource.
- object_
id str - subscription_
id str - tenant_
id str
- client
Id String - id String
- The provider-assigned unique ID for this managed resource.
- object
Id String - subscription
Id String - tenant
Id String
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
