Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 4, 2022 by Pulumi

getClientConfig

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/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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var current = Output.of(CoreFunctions.getClientConfig());

        ctx.export("accountId", current.apply(getClientConfigResult -> getClientConfigResult.getClientId()));
        }
}
import pulumi
import pulumi_azure as azure

current = azure.core.get_client_config()
pulumi.export("accountId", current.client_id)
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);
variables:
  current:
    Fn::Invoke:
      Function: azure:core:getClientConfig
      Arguments: {}
outputs:
  accountId: ${current.clientId}

Using getClientConfig

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

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

public static class GetClientConfig 
{
    public static Task<GetClientConfigResult> InvokeAsync(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
Id string

The provider-assigned unique ID for this managed resource.

ObjectId string
SubscriptionId string
TenantId string
ClientId string
Id string

The provider-assigned unique ID for this managed resource.

ObjectId string
SubscriptionId string
TenantId string
clientId String
id String

The provider-assigned unique ID for this managed resource.

objectId String
subscriptionId String
tenantId String
clientId string
id string

The provider-assigned unique ID for this managed resource.

objectId string
subscriptionId string
tenantId string
client_id str
id str

The provider-assigned unique ID for this managed resource.

object_id str
subscription_id str
tenant_id str
clientId String
id String

The provider-assigned unique ID for this managed resource.

objectId String
subscriptionId String
tenantId String

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.