1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. organizations
  5. getClientConfig
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

gcp.organizations.getClientConfig

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Example Usage

    data "google_client_config" "current" {
    }
    
    output "project" {
      value = data.google_client_config.current.project
    }
    

    Configure Kubernetes Provider With OAuth2 Access Token

    data "google_client_config" "default" {
    }
    
    data "google_container_cluster" "my_cluster" {
      name = "my-cluster"
      zone = "us-east1-a"
    }
    
    provider "kubernetes" {
      host  = "https://${data.google_container_cluster.my_cluster.endpoint}"
      token = data.google_client_config.default.access_token
      cluster_ca_certificate = base64decode(
        data.google_container_cluster.my_cluster.master_auth[0].cluster_ca_certificate,
      )
    }
    

    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: gcp:organizations/getClientConfig:getClientConfig
      arguments:
        # arguments dictionary

    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
    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
    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
    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
    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
    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.
    accessToken String
    The OAuth2 access token used by the client to authenticate against the Google Cloud API.
    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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi