Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Use this data source to access the configuration of the Google Cloud provider.
Warning: This resource persists a sensitive credential in the remote state used by Terraform. Please take appropriate measures to protect your remote state.
Example Usage
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);
import pulumi
import pulumi_gcp as gcp
current = gcp.organizations.get_client_config()
pulumi.export("project", current.project)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/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, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("project", current.Project)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var current = Gcp.Organizations.GetClientConfig.Invoke();
return new Dictionary<string, object?>
{
["project"] = current.Apply(getClientConfigResult => getClientConfigResult.Project),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
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 = OrganizationsFunctions.getClientConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
ctx.export("project", current.project());
}
}
variables:
current:
fn::invoke:
function: gcp:organizations:getClientConfig
arguments: {}
outputs:
project: ${current.project}
Configure Kubernetes Provider With OAuth2 Access Token
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
variables:
default:
fn::invoke:
function: gcp:organizations:getClientConfig
arguments: {}
myCluster:
fn::invoke:
function: gcp:container:getCluster
arguments:
name: my-cluster
zone: us-east1-a
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: gcp:organizations/getClientConfig:getClientConfig
arguments:
# arguments dictionarygetClientConfig Result
The following output properties are available:
- Access
Token string - The OAuth2 access token used by the client to authenticate against the Google Cloud API.
- Default
Labels Dictionary<string, string> - The default labels configured on the provider.
- Id string
- 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 string - The OAuth2 access token used by the client to authenticate against the Google Cloud API.
- Default
Labels map[string]string - The default labels configured on the provider.
- Id string
- 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 String - The OAuth2 access token used by the client to authenticate against the Google Cloud API.
- default
Labels Map<String,String> - The default labels configured on the provider.
- id String
- 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 string - The OAuth2 access token used by the client to authenticate against the Google Cloud API.
- default
Labels {[key: string]: string} - The default labels configured on the provider.
- id string
- 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.
- default_
labels Mapping[str, str] - The default labels configured on the provider.
- id str
- 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.
- access
Token String - The OAuth2 access token used by the client to authenticate against the Google Cloud API.
- default
Labels Map<String> - The default labels configured on the provider.
- id String
- 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.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
