1. Packages
  2. Ibm Provider
  3. API Docs
  4. ContainerNlbDns
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.ContainerNlbDns

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a resource for container_nlb_dns. This allows to add an NLB IP’s to an existing host name that you created with ‘ibmcloud ks nlb-dns create’.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dns = ibm.getContainerNlbDns({
        cluster: _var.cluster,
    });
    const containerNlbDns = new ibm.ContainerNlbDns("containerNlbDns", {
        cluster: _var.cluster,
        nlbHost: dns.then(dns => dns.nlbConfigs?.[0]?.nlbSubDomain),
        nlbIps: _var.cluster_ips,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    dns = ibm.get_container_nlb_dns(cluster=var["cluster"])
    container_nlb_dns = ibm.ContainerNlbDns("containerNlbDns",
        cluster=var["cluster"],
        nlb_host=dns.nlb_configs[0].nlb_sub_domain,
        nlb_ips=var["cluster_ips"])
    
    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 {
    		dns, err := ibm.LookupContainerNlbDns(ctx, &ibm.LookupContainerNlbDnsArgs{
    			Cluster: _var.Cluster,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewContainerNlbDns(ctx, "containerNlbDns", &ibm.ContainerNlbDnsArgs{
    			Cluster: pulumi.Any(_var.Cluster),
    			NlbHost: pulumi.String(dns.NlbConfigs[0].NlbSubDomain),
    			NlbIps:  pulumi.Any(_var.Cluster_ips),
    		})
    		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 dns = Ibm.GetContainerNlbDns.Invoke(new()
        {
            Cluster = @var.Cluster,
        });
    
        var containerNlbDns = new Ibm.ContainerNlbDns("containerNlbDns", new()
        {
            Cluster = @var.Cluster,
            NlbHost = dns.Apply(getContainerNlbDnsResult => getContainerNlbDnsResult.NlbConfigs[0]?.NlbSubDomain),
            NlbIps = @var.Cluster_ips,
        });
    
    });
    
    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.GetContainerNlbDnsArgs;
    import com.pulumi.ibm.ContainerNlbDns;
    import com.pulumi.ibm.ContainerNlbDnsArgs;
    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 dns = IbmFunctions.getContainerNlbDns(GetContainerNlbDnsArgs.builder()
                .cluster(var_.cluster())
                .build());
    
            var containerNlbDns = new ContainerNlbDns("containerNlbDns", ContainerNlbDnsArgs.builder()
                .cluster(var_.cluster())
                .nlbHost(dns.applyValue(getContainerNlbDnsResult -> getContainerNlbDnsResult.nlbConfigs()[0].nlbSubDomain()))
                .nlbIps(var_.cluster_ips())
                .build());
    
        }
    }
    
    resources:
      containerNlbDns:
        type: ibm:ContainerNlbDns
        properties:
          cluster: ${var.cluster}
          nlbHost: ${dns.nlbConfigs[0].nlbSubDomain}
          nlbIps: ${var.cluster_ips}
    variables:
      dns:
        fn::invoke:
          function: ibm:getContainerNlbDns
          arguments:
            cluster: ${var.cluster}
    

    Create ContainerNlbDns Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ContainerNlbDns(name: string, args: ContainerNlbDnsArgs, opts?: CustomResourceOptions);
    @overload
    def ContainerNlbDns(resource_name: str,
                        args: ContainerNlbDnsArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContainerNlbDns(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster: Optional[str] = None,
                        nlb_host: Optional[str] = None,
                        nlb_ips: Optional[Sequence[str]] = None,
                        container_nlb_dns_id: Optional[str] = None,
                        resource_group_id: Optional[str] = None)
    func NewContainerNlbDns(ctx *Context, name string, args ContainerNlbDnsArgs, opts ...ResourceOption) (*ContainerNlbDns, error)
    public ContainerNlbDns(string name, ContainerNlbDnsArgs args, CustomResourceOptions? opts = null)
    public ContainerNlbDns(String name, ContainerNlbDnsArgs args)
    public ContainerNlbDns(String name, ContainerNlbDnsArgs args, CustomResourceOptions options)
    
    type: ibm:ContainerNlbDns
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ContainerNlbDnsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ContainerNlbDnsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ContainerNlbDnsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerNlbDnsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContainerNlbDnsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var containerNlbDnsResource = new Ibm.ContainerNlbDns("containerNlbDnsResource", new()
    {
        Cluster = "string",
        NlbHost = "string",
        NlbIps = new[]
        {
            "string",
        },
        ContainerNlbDnsId = "string",
        ResourceGroupId = "string",
    });
    
    example, err := ibm.NewContainerNlbDns(ctx, "containerNlbDnsResource", &ibm.ContainerNlbDnsArgs{
    	Cluster: pulumi.String("string"),
    	NlbHost: pulumi.String("string"),
    	NlbIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ContainerNlbDnsId: pulumi.String("string"),
    	ResourceGroupId:   pulumi.String("string"),
    })
    
    var containerNlbDnsResource = new ContainerNlbDns("containerNlbDnsResource", ContainerNlbDnsArgs.builder()
        .cluster("string")
        .nlbHost("string")
        .nlbIps("string")
        .containerNlbDnsId("string")
        .resourceGroupId("string")
        .build());
    
    container_nlb_dns_resource = ibm.ContainerNlbDns("containerNlbDnsResource",
        cluster="string",
        nlb_host="string",
        nlb_ips=["string"],
        container_nlb_dns_id="string",
        resource_group_id="string")
    
    const containerNlbDnsResource = new ibm.ContainerNlbDns("containerNlbDnsResource", {
        cluster: "string",
        nlbHost: "string",
        nlbIps: ["string"],
        containerNlbDnsId: "string",
        resourceGroupId: "string",
    });
    
    type: ibm:ContainerNlbDns
    properties:
        cluster: string
        containerNlbDnsId: string
        nlbHost: string
        nlbIps:
            - string
        resourceGroupId: string
    

    ContainerNlbDns Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ContainerNlbDns resource accepts the following input properties:

    Cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    NlbHost string
    Host Name of load Balancer.
    NlbIps List<string>
    NLB IPs.
    ContainerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    ResourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    Cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    NlbHost string
    Host Name of load Balancer.
    NlbIps []string
    NLB IPs.
    ContainerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    ResourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    cluster String
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    nlbHost String
    Host Name of load Balancer.
    nlbIps List<String>
    NLB IPs.
    containerNlbDnsId String
    The unique identifier of the container_nlb_dns.
    resourceGroupId String
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    nlbHost string
    Host Name of load Balancer.
    nlbIps string[]
    NLB IPs.
    containerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    resourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    cluster str
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    nlb_host str
    Host Name of load Balancer.
    nlb_ips Sequence[str]
    NLB IPs.
    container_nlb_dns_id str
    The unique identifier of the container_nlb_dns.
    resource_group_id str
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    cluster String
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    nlbHost String
    Host Name of load Balancer.
    nlbIps List<String>
    NLB IPs.
    containerNlbDnsId String
    The unique identifier of the container_nlb_dns.
    resourceGroupId String
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ContainerNlbDns resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NlbDnsType string
    Type of DNS.
    NlbMonitorState string
    Nlb monitor state.
    NlbSslSecretName string
    Name of SSL Secret.
    NlbSslSecretStatus string
    Status of SSL Secret.
    NlbType string
    Nlb Type.
    SecretNamespace string
    Namespace of Secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    NlbDnsType string
    Type of DNS.
    NlbMonitorState string
    Nlb monitor state.
    NlbSslSecretName string
    Name of SSL Secret.
    NlbSslSecretStatus string
    Status of SSL Secret.
    NlbType string
    Nlb Type.
    SecretNamespace string
    Namespace of Secret.
    id String
    The provider-assigned unique ID for this managed resource.
    nlbDnsType String
    Type of DNS.
    nlbMonitorState String
    Nlb monitor state.
    nlbSslSecretName String
    Name of SSL Secret.
    nlbSslSecretStatus String
    Status of SSL Secret.
    nlbType String
    Nlb Type.
    secretNamespace String
    Namespace of Secret.
    id string
    The provider-assigned unique ID for this managed resource.
    nlbDnsType string
    Type of DNS.
    nlbMonitorState string
    Nlb monitor state.
    nlbSslSecretName string
    Name of SSL Secret.
    nlbSslSecretStatus string
    Status of SSL Secret.
    nlbType string
    Nlb Type.
    secretNamespace string
    Namespace of Secret.
    id str
    The provider-assigned unique ID for this managed resource.
    nlb_dns_type str
    Type of DNS.
    nlb_monitor_state str
    Nlb monitor state.
    nlb_ssl_secret_name str
    Name of SSL Secret.
    nlb_ssl_secret_status str
    Status of SSL Secret.
    nlb_type str
    Nlb Type.
    secret_namespace str
    Namespace of Secret.
    id String
    The provider-assigned unique ID for this managed resource.
    nlbDnsType String
    Type of DNS.
    nlbMonitorState String
    Nlb monitor state.
    nlbSslSecretName String
    Name of SSL Secret.
    nlbSslSecretStatus String
    Status of SSL Secret.
    nlbType String
    Nlb Type.
    secretNamespace String
    Namespace of Secret.

    Look up Existing ContainerNlbDns Resource

    Get an existing ContainerNlbDns resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ContainerNlbDnsState, opts?: CustomResourceOptions): ContainerNlbDns
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster: Optional[str] = None,
            container_nlb_dns_id: Optional[str] = None,
            nlb_dns_type: Optional[str] = None,
            nlb_host: Optional[str] = None,
            nlb_ips: Optional[Sequence[str]] = None,
            nlb_monitor_state: Optional[str] = None,
            nlb_ssl_secret_name: Optional[str] = None,
            nlb_ssl_secret_status: Optional[str] = None,
            nlb_type: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            secret_namespace: Optional[str] = None) -> ContainerNlbDns
    func GetContainerNlbDns(ctx *Context, name string, id IDInput, state *ContainerNlbDnsState, opts ...ResourceOption) (*ContainerNlbDns, error)
    public static ContainerNlbDns Get(string name, Input<string> id, ContainerNlbDnsState? state, CustomResourceOptions? opts = null)
    public static ContainerNlbDns get(String name, Output<String> id, ContainerNlbDnsState state, CustomResourceOptions options)
    resources:  _:    type: ibm:ContainerNlbDns    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    ContainerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    NlbDnsType string
    Type of DNS.
    NlbHost string
    Host Name of load Balancer.
    NlbIps List<string>
    NLB IPs.
    NlbMonitorState string
    Nlb monitor state.
    NlbSslSecretName string
    Name of SSL Secret.
    NlbSslSecretStatus string
    Status of SSL Secret.
    NlbType string
    Nlb Type.
    ResourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    SecretNamespace string
    Namespace of Secret.
    Cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    ContainerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    NlbDnsType string
    Type of DNS.
    NlbHost string
    Host Name of load Balancer.
    NlbIps []string
    NLB IPs.
    NlbMonitorState string
    Nlb monitor state.
    NlbSslSecretName string
    Name of SSL Secret.
    NlbSslSecretStatus string
    Status of SSL Secret.
    NlbType string
    Nlb Type.
    ResourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    SecretNamespace string
    Namespace of Secret.
    cluster String
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    containerNlbDnsId String
    The unique identifier of the container_nlb_dns.
    nlbDnsType String
    Type of DNS.
    nlbHost String
    Host Name of load Balancer.
    nlbIps List<String>
    NLB IPs.
    nlbMonitorState String
    Nlb monitor state.
    nlbSslSecretName String
    Name of SSL Secret.
    nlbSslSecretStatus String
    Status of SSL Secret.
    nlbType String
    Nlb Type.
    resourceGroupId String
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    secretNamespace String
    Namespace of Secret.
    cluster string
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    containerNlbDnsId string
    The unique identifier of the container_nlb_dns.
    nlbDnsType string
    Type of DNS.
    nlbHost string
    Host Name of load Balancer.
    nlbIps string[]
    NLB IPs.
    nlbMonitorState string
    Nlb monitor state.
    nlbSslSecretName string
    Name of SSL Secret.
    nlbSslSecretStatus string
    Status of SSL Secret.
    nlbType string
    Nlb Type.
    resourceGroupId string
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    secretNamespace string
    Namespace of Secret.
    cluster str
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    container_nlb_dns_id str
    The unique identifier of the container_nlb_dns.
    nlb_dns_type str
    Type of DNS.
    nlb_host str
    Host Name of load Balancer.
    nlb_ips Sequence[str]
    NLB IPs.
    nlb_monitor_state str
    Nlb monitor state.
    nlb_ssl_secret_name str
    Name of SSL Secret.
    nlb_ssl_secret_status str
    Status of SSL Secret.
    nlb_type str
    Nlb Type.
    resource_group_id str
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    secret_namespace str
    Namespace of Secret.
    cluster String
    The name or ID of the cluster. To list the clusters that you have access to, use the GET /v1/clusters API or run ibmcloud ks cluster ls.
    containerNlbDnsId String
    The unique identifier of the container_nlb_dns.
    nlbDnsType String
    Type of DNS.
    nlbHost String
    Host Name of load Balancer.
    nlbIps List<String>
    NLB IPs.
    nlbMonitorState String
    Nlb monitor state.
    nlbSslSecretName String
    Name of SSL Secret.
    nlbSslSecretStatus String
    Status of SSL Secret.
    nlbType String
    Nlb Type.
    resourceGroupId String
    The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the GET /v1/clusters/idOrName API. To list available resource group IDs, run ibmcloud resource groups.
    secretNamespace String
    Namespace of Secret.

    Import

    The import functionality is not supported for this resource.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud