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 dictionaryThe following arguments are supported:
- Location string
- The location for the GKE Hub Membership Binding.
Currently only
globalis supported. - Membership
Binding stringId - The ID of the membership binding.
- Membership
Id 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
globalis supported. - Membership
Binding stringId - The ID of the membership binding.
- Membership
Id 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
globalis supported. - membership
Binding StringId - The ID of the membership binding.
- membership
Id 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
globalis supported. - membership
Binding stringId - The ID of the membership binding.
- membership
Id 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
globalis supported. - membership_
binding_ strid - 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
globalis supported. - membership
Binding StringId - The ID of the membership binding.
- membership
Id 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:
- Create
Time string - Delete
Time string - Effective
Labels Dictionary<string, string> - Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Location string
- Membership
Binding stringId - Membership
Id string - Name string
- Pulumi
Labels Dictionary<string, string> - Scope string
- States
List<Get
Membership Binding State> - Uid string
- Update
Time string - Project string
- Create
Time string - Delete
Time string - Effective
Labels map[string]string - Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Location string
- Membership
Binding stringId - Membership
Id string - Name string
- Pulumi
Labels map[string]string - Scope string
- States
[]Get
Membership Binding State - Uid string
- Update
Time string - Project string
- create
Time String - delete
Time String - effective
Labels Map<String,String> - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- location String
- membership
Binding StringId - membership
Id String - name String
- pulumi
Labels Map<String,String> - scope String
- states
List<Get
Membership Binding State> - uid String
- update
Time String - project String
- create
Time string - delete
Time string - effective
Labels {[key: string]: string} - id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- location string
- membership
Binding stringId - membership
Id string - name string
- pulumi
Labels {[key: string]: string} - scope string
- states
Get
Membership Binding State[] - uid string
- update
Time 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_ strid - membership_
id str - name str
- pulumi_
labels Mapping[str, str] - scope str
- states
Sequence[Get
Membership Binding State] - uid str
- update_
time str - project str
- create
Time String - delete
Time String - effective
Labels Map<String> - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- location String
- membership
Binding StringId - membership
Id String - name String
- pulumi
Labels Map<String> - scope String
- states List<Property Map>
- uid String
- update
Time 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-betaTerraform Provider.
