1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. iam
  5. getWorkloadIdentityPool
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.iam.getWorkloadIdentityPool

Explore with Pulumi AI

Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

Get a IAM workload identity pool from Google Cloud by its id.

Note: The following resource requires the Beta IAM role roles/iam.workloadIdentityPoolAdmin in order to succeed. OWNER and EDITOR roles do not include the necessary permissions.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const foo = gcp.iam.getWorkloadIdentityPool({
    workloadIdentityPoolId: "foo-pool",
});
Copy
import pulumi
import pulumi_gcp as gcp

foo = gcp.iam.get_workload_identity_pool(workload_identity_pool_id="foo-pool")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupWorkloadIdentityPool(ctx, &iam.LookupWorkloadIdentityPoolArgs{
			WorkloadIdentityPoolId: "foo-pool",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var foo = Gcp.Iam.GetWorkloadIdentityPool.Invoke(new()
    {
        WorkloadIdentityPoolId = "foo-pool",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.iam.IamFunctions;
import com.pulumi.gcp.iam.inputs.GetWorkloadIdentityPoolArgs;
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 foo = IamFunctions.getWorkloadIdentityPool(GetWorkloadIdentityPoolArgs.builder()
            .workloadIdentityPoolId("foo-pool")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: gcp:iam:getWorkloadIdentityPool
      arguments:
        workloadIdentityPoolId: foo-pool
Copy

Using getWorkloadIdentityPool

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 getWorkloadIdentityPool(args: GetWorkloadIdentityPoolArgs, opts?: InvokeOptions): Promise<GetWorkloadIdentityPoolResult>
function getWorkloadIdentityPoolOutput(args: GetWorkloadIdentityPoolOutputArgs, opts?: InvokeOptions): Output<GetWorkloadIdentityPoolResult>
Copy
def get_workload_identity_pool(project: Optional[str] = None,
                               workload_identity_pool_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetWorkloadIdentityPoolResult
def get_workload_identity_pool_output(project: Optional[pulumi.Input[str]] = None,
                               workload_identity_pool_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetWorkloadIdentityPoolResult]
Copy
func LookupWorkloadIdentityPool(ctx *Context, args *LookupWorkloadIdentityPoolArgs, opts ...InvokeOption) (*LookupWorkloadIdentityPoolResult, error)
func LookupWorkloadIdentityPoolOutput(ctx *Context, args *LookupWorkloadIdentityPoolOutputArgs, opts ...InvokeOption) LookupWorkloadIdentityPoolResultOutput
Copy

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

public static class GetWorkloadIdentityPool 
{
    public static Task<GetWorkloadIdentityPoolResult> InvokeAsync(GetWorkloadIdentityPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkloadIdentityPoolResult> Invoke(GetWorkloadIdentityPoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWorkloadIdentityPoolResult> getWorkloadIdentityPool(GetWorkloadIdentityPoolArgs args, InvokeOptions options)
public static Output<GetWorkloadIdentityPoolResult> getWorkloadIdentityPool(GetWorkloadIdentityPoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:iam/getWorkloadIdentityPool:getWorkloadIdentityPool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

WorkloadIdentityPoolId This property is required. string
The id of the pool which is the final component of the resource name.


Project string
The project in which the resource belongs. If it is not provided, the provider project is used.
WorkloadIdentityPoolId This property is required. string
The id of the pool which is the final component of the resource name.


Project string
The project in which the resource belongs. If it is not provided, the provider project is used.
workloadIdentityPoolId This property is required. String
The id of the pool which is the final component of the resource name.


project String
The project in which the resource belongs. If it is not provided, the provider project is used.
workloadIdentityPoolId This property is required. string
The id of the pool which is the final component of the resource name.


project string
The project in which the resource belongs. If it is not provided, the provider project is used.
workload_identity_pool_id This property is required. str
The id of the pool which is the final component of the resource name.


project str
The project in which the resource belongs. If it is not provided, the provider project is used.
workloadIdentityPoolId This property is required. String
The id of the pool which is the final component of the resource name.


project String
The project in which the resource belongs. If it is not provided, the provider project is used.

getWorkloadIdentityPool Result

The following output properties are available:

Description string
Disabled bool
DisplayName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
State string
WorkloadIdentityPoolId string
Project string
Description string
Disabled bool
DisplayName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
State string
WorkloadIdentityPoolId string
Project string
description String
disabled Boolean
displayName String
id String
The provider-assigned unique ID for this managed resource.
name String
state String
workloadIdentityPoolId String
project String
description string
disabled boolean
displayName string
id string
The provider-assigned unique ID for this managed resource.
name string
state string
workloadIdentityPoolId string
project string
description str
disabled bool
display_name str
id str
The provider-assigned unique ID for this managed resource.
name str
state str
workload_identity_pool_id str
project str
description String
disabled Boolean
displayName String
id String
The provider-assigned unique ID for this managed resource.
name String
state String
workloadIdentityPoolId String
project String

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.
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi