1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. gkehub
  5. getMembershipBinding
Google Cloud v9.9.0 published on Wednesday, Jan 7, 2026 by Pulumi
gcp logo
Google Cloud v9.9.0 published on Wednesday, Jan 7, 2026 by Pulumi

    Retrieves the details of a specific GKE Hub Membership Binding. Use this data source to retrieve the membership binding’s configuration and state.

    A membership binding associates a GKE Hub membership with a scope, enabling the membership to participate in fleet-wide configurations and policies defined by the scope.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = gcp.gkehub.getMembershipBinding({
        location: "global",
        membershipId: "my-membership-id",
        membershipBindingId: "my-membership-binding-id",
        project: "my-project-id",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.gkehub.get_membership_binding(location="global",
        membership_id="my-membership-id",
        membership_binding_id="my-membership-binding-id",
        project="my-project-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.LookupMembershipBinding(ctx, &gkehub.LookupMembershipBindingArgs{
    			Location:            "global",
    			MembershipId:        "my-membership-id",
    			MembershipBindingId: "my-membership-binding-id",
    			Project:             pulumi.StringRef("my-project-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.GetMembershipBinding.Invoke(new()
        {
            Location = "global",
            MembershipId = "my-membership-id",
            MembershipBindingId = "my-membership-binding-id",
            Project = "my-project-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.GetMembershipBindingArgs;
    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.getMembershipBinding(GetMembershipBindingArgs.builder()
                .location("global")
                .membershipId("my-membership-id")
                .membershipBindingId("my-membership-binding-id")
                .project("my-project-id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: gcp:gkehub:getMembershipBinding
          arguments:
            location: global
            membershipId: my-membership-id
            membershipBindingId: my-membership-binding-id
            project: my-project-id
    

    Using getMembershipBinding

    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 getMembershipBinding(args: GetMembershipBindingArgs, opts?: InvokeOptions): Promise<GetMembershipBindingResult>
    function getMembershipBindingOutput(args: GetMembershipBindingOutputArgs, opts?: InvokeOptions): Output<GetMembershipBindingResult>
    def get_membership_binding(location: Optional[str] = None,
                               membership_binding_id: Optional[str] = None,
                               membership_id: Optional[str] = None,
                               project: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetMembershipBindingResult
    def get_membership_binding_output(location: Optional[pulumi.Input[str]] = None,
                               membership_binding_id: Optional[pulumi.Input[str]] = None,
                               membership_id: Optional[pulumi.Input[str]] = None,
                               project: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetMembershipBindingResult]
    func LookupMembershipBinding(ctx *Context, args *LookupMembershipBindingArgs, opts ...InvokeOption) (*LookupMembershipBindingResult, error)
    func LookupMembershipBindingOutput(ctx *Context, args *LookupMembershipBindingOutputArgs, opts ...InvokeOption) LookupMembershipBindingResultOutput

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

    public static class GetMembershipBinding 
    {
        public static Task<GetMembershipBindingResult> InvokeAsync(GetMembershipBindingArgs args, InvokeOptions? opts = null)
        public static Output<GetMembershipBindingResult> Invoke(GetMembershipBindingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMembershipBindingResult> getMembershipBinding(GetMembershipBindingArgs args, InvokeOptions options)
    public static Output<GetMembershipBindingResult> getMembershipBinding(GetMembershipBindingArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:gkehub/getMembershipBinding:getMembershipBinding
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location for the GKE Hub Membership Binding. Currently only global is supported.
    MembershipBindingId string
    The ID of the membership binding.
    MembershipId string
    The ID of the membership that this binding applies to.
    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 Binding. Currently only global is supported.
    MembershipBindingId string
    The ID of the membership binding.
    MembershipId string
    The ID of the membership that this binding applies to.
    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 Binding. Currently only global is supported.
    membershipBindingId String
    The ID of the membership binding.
    membershipId String
    The ID of the membership that this binding applies to.
    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 Binding. Currently only global is supported.
    membershipBindingId string
    The ID of the membership binding.
    membershipId string
    The ID of the membership that this binding applies to.
    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 Binding. Currently only global is supported.
    membership_binding_id str
    The ID of the membership binding.
    membership_id str
    The ID of the membership that this binding applies to.
    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 Binding. Currently only global is supported.
    membershipBindingId String
    The ID of the membership binding.
    membershipId String
    The ID of the membership that this binding applies to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    getMembershipBinding Result

    The following output properties are available:

    CreateTime string
    DeleteTime string
    EffectiveLabels Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels Dictionary<string, string>
    Location string
    MembershipBindingId string
    MembershipId string
    Name string
    PulumiLabels Dictionary<string, string>
    Scope string
    States List<GetMembershipBindingState>
    Uid string
    UpdateTime string
    Project string
    CreateTime string
    DeleteTime string
    EffectiveLabels map[string]string
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels map[string]string
    Location string
    MembershipBindingId string
    MembershipId string
    Name string
    PulumiLabels map[string]string
    Scope string
    States []GetMembershipBindingState
    Uid string
    UpdateTime string
    Project string
    createTime String
    deleteTime String
    effectiveLabels Map<String,String>
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String,String>
    location String
    membershipBindingId String
    membershipId String
    name String
    pulumiLabels Map<String,String>
    scope String
    states List<GetMembershipBindingState>
    uid String
    updateTime String
    project String
    createTime string
    deleteTime string
    effectiveLabels {[key: string]: string}
    id string
    The provider-assigned unique ID for this managed resource.
    labels {[key: string]: string}
    location string
    membershipBindingId string
    membershipId string
    name string
    pulumiLabels {[key: string]: string}
    scope string
    states GetMembershipBindingState[]
    uid string
    updateTime string
    project string
    create_time str
    delete_time str
    effective_labels Mapping[str, str]
    id str
    The provider-assigned unique ID for this managed resource.
    labels Mapping[str, str]
    location str
    membership_binding_id str
    membership_id str
    name str
    pulumi_labels Mapping[str, str]
    scope str
    states Sequence[GetMembershipBindingState]
    uid str
    update_time str
    project str
    createTime String
    deleteTime String
    effectiveLabels Map<String>
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String>
    location String
    membershipBindingId String
    membershipId String
    name String
    pulumiLabels Map<String>
    scope String
    states List<Property Map>
    uid String
    updateTime String
    project String

    Supporting Types

    GetMembershipBindingState

    Code string
    Code describes the state of a MembershipBinding resource.
    Code string
    Code describes the state of a MembershipBinding resource.
    code String
    Code describes the state of a MembershipBinding resource.
    code string
    Code describes the state of a MembershipBinding resource.
    code str
    Code describes the state of a MembershipBinding resource.
    code String
    Code describes the state of a MembershipBinding resource.

    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 v9.9.0 published on Wednesday, Jan 7, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate