ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getContainerBindService
Explore with Pulumi AI
Retrieve information of a service attached to IBM Cloud cluster. For more information, about service binding, see Adding services by using IBM Cloud service binding.
Example Usage
The following example retrieves service information attached to a cluster.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const bindService = ibm.getContainerBindService({
clusterNameId: "cluster_name",
namespaceId: "default",
serviceInstanceName: "service_name",
});
import pulumi
import pulumi_ibm as ibm
bind_service = ibm.get_container_bind_service(cluster_name_id="cluster_name",
namespace_id="default",
service_instance_name="service_name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupContainerBindService(ctx, &ibm.LookupContainerBindServiceArgs{
ClusterNameId: "cluster_name",
NamespaceId: "default",
ServiceInstanceName: pulumi.StringRef("service_name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var bindService = Ibm.GetContainerBindService.Invoke(new()
{
ClusterNameId = "cluster_name",
NamespaceId = "default",
ServiceInstanceName = "service_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetContainerBindServiceArgs;
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 bindService = IbmFunctions.getContainerBindService(GetContainerBindServiceArgs.builder()
.clusterNameId("cluster_name")
.namespaceId("default")
.serviceInstanceName("service_name")
.build());
}
}
variables:
bindService:
fn::invoke:
function: ibm:getContainerBindService
arguments:
clusterNameId: cluster_name
namespaceId: default
serviceInstanceName: service_name
Using getContainerBindService
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 getContainerBindService(args: GetContainerBindServiceArgs, opts?: InvokeOptions): Promise<GetContainerBindServiceResult>
function getContainerBindServiceOutput(args: GetContainerBindServiceOutputArgs, opts?: InvokeOptions): Output<GetContainerBindServiceResult>
def get_container_bind_service(cluster_name_id: Optional[str] = None,
id: Optional[str] = None,
namespace_id: Optional[str] = None,
service_instance_id: Optional[str] = None,
service_instance_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetContainerBindServiceResult
def get_container_bind_service_output(cluster_name_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
namespace_id: Optional[pulumi.Input[str]] = None,
service_instance_id: Optional[pulumi.Input[str]] = None,
service_instance_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetContainerBindServiceResult]
func LookupContainerBindService(ctx *Context, args *LookupContainerBindServiceArgs, opts ...InvokeOption) (*LookupContainerBindServiceResult, error)
func LookupContainerBindServiceOutput(ctx *Context, args *LookupContainerBindServiceOutputArgs, opts ...InvokeOption) LookupContainerBindServiceResultOutput
> Note: This function is named LookupContainerBindService
in the Go SDK.
public static class GetContainerBindService
{
public static Task<GetContainerBindServiceResult> InvokeAsync(GetContainerBindServiceArgs args, InvokeOptions? opts = null)
public static Output<GetContainerBindServiceResult> Invoke(GetContainerBindServiceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetContainerBindServiceResult> getContainerBindService(GetContainerBindServiceArgs args, InvokeOptions options)
public static Output<GetContainerBindServiceResult> getContainerBindService(GetContainerBindServiceArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getContainerBindService:getContainerBindService
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Name stringId - The name or ID of the cluster.
- Namespace
Id string - The Kubernetes namespace.
- Id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - Service
Instance stringId - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - Service
Instance stringName - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
- Cluster
Name stringId - The name or ID of the cluster.
- Namespace
Id string - The Kubernetes namespace.
- Id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - Service
Instance stringId - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - Service
Instance stringName - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
- cluster
Name StringId - The name or ID of the cluster.
- namespace
Id String - The Kubernetes namespace.
- id String
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - service
Instance StringId - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - service
Instance StringName - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
- cluster
Name stringId - The name or ID of the cluster.
- namespace
Id string - The Kubernetes namespace.
- id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - service
Instance stringId - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - service
Instance stringName - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
- cluster_
name_ strid - The name or ID of the cluster.
- namespace_
id str - The Kubernetes namespace.
- id str
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - service_
instance_ strid - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - service_
instance_ strname - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
- cluster
Name StringId - The name or ID of the cluster.
- namespace
Id String - The Kubernetes namespace.
- id String
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - service
Instance StringId - The ID of the service that is attached to the cluster. This conflicts with the
service_instance_name
parameter. - service
Instance StringName - The name of the service that is attached to the cluster. This conflicts with the
service_instance_id
parameter.
getContainerBindService Result
The following output properties are available:
- Cluster
Name stringId - Id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - Namespace
Id string - Service
Instance stringId - Service
Instance stringName - Service
Key stringName - (String) The service key name.
- Cluster
Name stringId - Id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - Namespace
Id string - Service
Instance stringId - Service
Instance stringName - Service
Key stringName - (String) The service key name.
- cluster
Name StringId - id String
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - namespace
Id String - service
Instance StringId - service
Instance StringName - service
Key StringName - (String) The service key name.
- cluster
Name stringId - id string
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - namespace
Id string - service
Instance stringId - service
Instance stringName - service
Key stringName - (String) The service key name.
- cluster_
name_ strid - id str
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - namespace_
id str - service_
instance_ strid - service_
instance_ strname - service_
key_ strname - (String) The service key name.
- cluster
Name StringId - id String
- (String) The unique Id of the bind service resource. The ID is composed of
<cluster_name_id>/<service_instance_name or service_instance_id>/<namespace_id/>
. - namespace
Id String - service
Instance StringId - service
Instance StringName - service
Key StringName - (String) The service key name.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.