getClientConfig

Use this data source to access the configuration of the Google Cloud provider.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var current = Output.Create(Gcp.Organizations.GetClientConfig.InvokeAsync());
        this.Project = current.Apply(current => current.Project);
    }

    [Output("project")]
    public Output<string> Project { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := organizations.GetClientConfig(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("project", current.Project)
		return nil
	})
}
import pulumi
import pulumi_gcp as gcp

current = gcp.organizations.get_client_config()
pulumi.export("project", current.project)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const current = gcp.organizations.getClientConfig({});
export const project = current.then(current => current.project);

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)
}

getClientConfig Result

The following output properties are available:

AccessToken string
The OAuth2 access token used by the client to authenticate against the Google Cloud API.
Id string
The provider-assigned unique ID for this managed resource.
Project string
The ID of the project to apply any resources to.
Region string
The region to operate under.
Zone string
The zone to operate under.
AccessToken string
The OAuth2 access token used by the client to authenticate against the Google Cloud API.
Id string
The provider-assigned unique ID for this managed resource.
Project string
The ID of the project to apply any resources to.
Region string
The region to operate under.
Zone string
The zone to operate under.
accessToken string
The OAuth2 access token used by the client to authenticate against the Google Cloud API.
id string
The provider-assigned unique ID for this managed resource.
project string
The ID of the project to apply any resources to.
region string
The region to operate under.
zone string
The zone to operate under.
access_token str
The OAuth2 access token used by the client to authenticate against the Google Cloud API.
id str
The provider-assigned unique ID for this managed resource.
project str
The ID of the project to apply any resources to.
region str
The region to operate under.
zone str
The zone to operate under.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.