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
Retrieves the details of a specific GKE Hub Membership. Use this data source to retrieve the membership’s configuration and state.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = gcp.gkehub.getMembership({
project: "my-project-id",
location: "global",
membershipId: "my-membership-id",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.gkehub.get_membership(project="my-project-id",
location="global",
membership_id="my-membership-id")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/gkehub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gkehub.LookupMembership(ctx, &gkehub.LookupMembershipArgs{
Project: pulumi.StringRef("my-project-id"),
Location: "global",
MembershipId: "my-membership-id",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = Gcp.GkeHub.GetMembership.Invoke(new()
{
Project = "my-project-id",
Location = "global",
MembershipId = "my-membership-id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.gkehub.GkehubFunctions;
import com.pulumi.gcp.gkehub.inputs.GetMembershipArgs;
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 example = GkehubFunctions.getMembership(GetMembershipArgs.builder()
.project("my-project-id")
.location("global")
.membershipId("my-membership-id")
.build());
}
}
variables:
example:
fn::invoke:
function: gcp:gkehub:getMembership
arguments:
project: my-project-id
location: global
membershipId: my-membership-id
Using getMembership
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 getMembership(args: GetMembershipArgs, opts?: InvokeOptions): Promise<GetMembershipResult>
function getMembershipOutput(args: GetMembershipOutputArgs, opts?: InvokeOptions): Output<GetMembershipResult>def get_membership(location: Optional[str] = None,
membership_id: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMembershipResult
def get_membership_output(location: Optional[pulumi.Input[str]] = None,
membership_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMembershipResult]func LookupMembership(ctx *Context, args *LookupMembershipArgs, opts ...InvokeOption) (*LookupMembershipResult, error)
func LookupMembershipOutput(ctx *Context, args *LookupMembershipOutputArgs, opts ...InvokeOption) LookupMembershipResultOutput> Note: This function is named LookupMembership in the Go SDK.
public static class GetMembership
{
public static Task<GetMembershipResult> InvokeAsync(GetMembershipArgs args, InvokeOptions? opts = null)
public static Output<GetMembershipResult> Invoke(GetMembershipInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMembershipResult> getMembership(GetMembershipArgs args, InvokeOptions options)
public static Output<GetMembershipResult> getMembership(GetMembershipArgs args, InvokeOptions options)
fn::invoke:
function: gcp:gkehub/getMembership:getMembership
arguments:
# arguments dictionaryThe following arguments are supported:
- Location string
- The location for the GKE Hub Membership.
Currently only
globalis supported. - Membership
Id string - The GKE Hub Membership id or GKE Cluster's name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- The location for the GKE Hub Membership.
Currently only
globalis supported. - Membership
Id string - The GKE Hub Membership id or GKE Cluster's name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location for the GKE Hub Membership.
Currently only
globalis supported. - membership
Id String - The GKE Hub Membership id or GKE Cluster's name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- The location for the GKE Hub Membership.
Currently only
globalis supported. - membership
Id string - The GKE Hub Membership id or GKE Cluster's name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- The location for the GKE Hub Membership.
Currently only
globalis supported. - membership_
id str - The GKE Hub Membership id or GKE Cluster's name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location for the GKE Hub Membership.
Currently only
globalis supported. - membership
Id String - The GKE Hub Membership id or GKE Cluster's name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
getMembership Result
The following output properties are available:
-
List<Get
Membership Authority> - Effective
Labels Dictionary<string, string> - Endpoints
List<Get
Membership Endpoint> - Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Location string
- Membership
Id string - Name string
- Pulumi
Labels Dictionary<string, string> - Project string
-
[]Get
Membership Authority - Effective
Labels map[string]string - Endpoints
[]Get
Membership Endpoint - Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Location string
- Membership
Id string - Name string
- Pulumi
Labels map[string]string - Project string
-
List<Get
Membership Authority> - effective
Labels Map<String,String> - endpoints
List<Get
Membership Endpoint> - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- location String
- membership
Id String - name String
- pulumi
Labels Map<String,String> - project String
-
Get
Membership Authority[] - effective
Labels {[key: string]: string} - endpoints
Get
Membership Endpoint[] - id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- location string
- membership
Id string - name string
- pulumi
Labels {[key: string]: string} - project string
-
Sequence[Get
Membership Authority] - effective_
labels Mapping[str, str] - endpoints
Sequence[Get
Membership Endpoint] - id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- location str
- membership_
id str - name str
- pulumi_
labels Mapping[str, str] - project str
- List<Property Map>
- effective
Labels Map<String> - endpoints List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- location String
- membership
Id String - name String
- pulumi
Labels Map<String> - project String
Supporting Types
GetMembershipAuthority
- Issuer string
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
- Issuer string
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
- issuer String
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
- issuer string
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
- issuer str
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
- issuer String
- A JSON Web Token (JWT) issuer URI. 'issuer' must start with 'https://' and // be a valid with length <2000 characters. For example: 'https://container.googleapis.com/v1/projects/my-project/locations/us-west1/clusters/my-cluster'. If the cluster is provisioned with Terraform, this is '"https://container.googleapis.com/v1/${google_container_cluster.my-cluster.id}"'.
GetMembershipEndpoint
- Gke
Clusters List<GetMembership Endpoint Gke Cluster> - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
- Gke
Clusters []GetMembership Endpoint Gke Cluster - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
- gke
Clusters List<GetMembership Endpoint Gke Cluster> - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
- gke
Clusters GetMembership Endpoint Gke Cluster[] - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
- gke_
clusters Sequence[GetMembership Endpoint Gke Cluster] - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
- gke
Clusters List<Property Map> - If this Membership is a Kubernetes API server hosted on GKE, this is a self link to its GCP resource.
GetMembershipEndpointGkeCluster
- Resource
Link string - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
- Resource
Link string - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
- resource
Link String - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
- resource
Link string - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
- resource_
link str - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
- resource
Link String - Self-link of the GCP resource for the GKE cluster. For example: '//container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster'. It can be at the most 1000 characters in length. If the cluster is provisioned with Terraform, this can be '"//container.googleapis.com/${google_container_cluster.my-cluster.id}"' or 'google_container_cluster.my-cluster.id'.
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
