ibm.ContainerNlbDns
Explore with Pulumi AI
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 runibmcloud ks cluster ls
. - Nlb
Host string - Host Name of load Balancer.
- Nlb
Ips List<string> - NLB IPs.
- Container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- Resource
Group stringId - 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 runibmcloud ks cluster ls
. - Nlb
Host string - Host Name of load Balancer.
- Nlb
Ips []string - NLB IPs.
- Container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- Resource
Group stringId - 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 runibmcloud ks cluster ls
. - nlb
Host String - Host Name of load Balancer.
- nlb
Ips List<String> - NLB IPs.
- container
Nlb StringDns Id - The unique identifier of the container_nlb_dns.
- resource
Group StringId - 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 runibmcloud ks cluster ls
. - nlb
Host string - Host Name of load Balancer.
- nlb
Ips string[] - NLB IPs.
- container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- resource
Group stringId - 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 runibmcloud ks cluster ls
. - nlb_
host str - Host Name of load Balancer.
- nlb_
ips Sequence[str] - NLB IPs.
- container_
nlb_ strdns_ id - The unique identifier of the container_nlb_dns.
- resource_
group_ strid - 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 runibmcloud ks cluster ls
. - nlb
Host String - Host Name of load Balancer.
- nlb
Ips List<String> - NLB IPs.
- container
Nlb StringDns Id - The unique identifier of the container_nlb_dns.
- resource
Group StringId - 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.
- Nlb
Dns stringType - Type of DNS.
- Nlb
Monitor stringState - Nlb monitor state.
- Nlb
Ssl stringSecret Name - Name of SSL Secret.
- Nlb
Ssl stringSecret Status - Status of SSL Secret.
- Nlb
Type string - Nlb Type.
- Secret
Namespace string - Namespace of Secret.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nlb
Dns stringType - Type of DNS.
- Nlb
Monitor stringState - Nlb monitor state.
- Nlb
Ssl stringSecret Name - Name of SSL Secret.
- Nlb
Ssl stringSecret Status - Status of SSL Secret.
- Nlb
Type string - Nlb Type.
- Secret
Namespace string - Namespace of Secret.
- id String
- The provider-assigned unique ID for this managed resource.
- nlb
Dns StringType - Type of DNS.
- nlb
Monitor StringState - Nlb monitor state.
- nlb
Ssl StringSecret Name - Name of SSL Secret.
- nlb
Ssl StringSecret Status - Status of SSL Secret.
- nlb
Type String - Nlb Type.
- secret
Namespace String - Namespace of Secret.
- id string
- The provider-assigned unique ID for this managed resource.
- nlb
Dns stringType - Type of DNS.
- nlb
Monitor stringState - Nlb monitor state.
- nlb
Ssl stringSecret Name - Name of SSL Secret.
- nlb
Ssl stringSecret Status - Status of SSL Secret.
- nlb
Type string - Nlb Type.
- secret
Namespace string - Namespace of Secret.
- id str
- The provider-assigned unique ID for this managed resource.
- nlb_
dns_ strtype - Type of DNS.
- nlb_
monitor_ strstate - Nlb monitor state.
- nlb_
ssl_ strsecret_ name - Name of SSL Secret.
- nlb_
ssl_ strsecret_ status - 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.
- nlb
Dns StringType - Type of DNS.
- nlb
Monitor StringState - Nlb monitor state.
- nlb
Ssl StringSecret Name - Name of SSL Secret.
- nlb
Ssl StringSecret Status - Status of SSL Secret.
- nlb
Type String - Nlb Type.
- secret
Namespace 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.
- 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 runibmcloud ks cluster ls
. - Container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- Nlb
Dns stringType - Type of DNS.
- Nlb
Host string - Host Name of load Balancer.
- Nlb
Ips List<string> - NLB IPs.
- Nlb
Monitor stringState - Nlb monitor state.
- Nlb
Ssl stringSecret Name - Name of SSL Secret.
- Nlb
Ssl stringSecret Status - Status of SSL Secret.
- Nlb
Type string - Nlb Type.
- Resource
Group stringId - 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 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 runibmcloud ks cluster ls
. - Container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- Nlb
Dns stringType - Type of DNS.
- Nlb
Host string - Host Name of load Balancer.
- Nlb
Ips []string - NLB IPs.
- Nlb
Monitor stringState - Nlb monitor state.
- Nlb
Ssl stringSecret Name - Name of SSL Secret.
- Nlb
Ssl stringSecret Status - Status of SSL Secret.
- Nlb
Type string - Nlb Type.
- Resource
Group stringId - 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 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 runibmcloud ks cluster ls
. - container
Nlb StringDns Id - The unique identifier of the container_nlb_dns.
- nlb
Dns StringType - Type of DNS.
- nlb
Host String - Host Name of load Balancer.
- nlb
Ips List<String> - NLB IPs.
- nlb
Monitor StringState - Nlb monitor state.
- nlb
Ssl StringSecret Name - Name of SSL Secret.
- nlb
Ssl StringSecret Status - Status of SSL Secret.
- nlb
Type String - Nlb Type.
- resource
Group StringId - 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 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 runibmcloud ks cluster ls
. - container
Nlb stringDns Id - The unique identifier of the container_nlb_dns.
- nlb
Dns stringType - Type of DNS.
- nlb
Host string - Host Name of load Balancer.
- nlb
Ips string[] - NLB IPs.
- nlb
Monitor stringState - Nlb monitor state.
- nlb
Ssl stringSecret Name - Name of SSL Secret.
- nlb
Ssl stringSecret Status - Status of SSL Secret.
- nlb
Type string - Nlb Type.
- resource
Group stringId - 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 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 runibmcloud ks cluster ls
. - container_
nlb_ strdns_ id - The unique identifier of the container_nlb_dns.
- nlb_
dns_ strtype - Type of DNS.
- nlb_
host str - Host Name of load Balancer.
- nlb_
ips Sequence[str] - NLB IPs.
- nlb_
monitor_ strstate - Nlb monitor state.
- nlb_
ssl_ strsecret_ name - Name of SSL Secret.
- nlb_
ssl_ strsecret_ status - Status of SSL Secret.
- nlb_
type str - Nlb Type.
- resource_
group_ strid - 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 runibmcloud ks cluster ls
. - container
Nlb StringDns Id - The unique identifier of the container_nlb_dns.
- nlb
Dns StringType - Type of DNS.
- nlb
Host String - Host Name of load Balancer.
- nlb
Ips List<String> - NLB IPs.
- nlb
Monitor StringState - Nlb monitor state.
- nlb
Ssl StringSecret Name - Name of SSL Secret.
- nlb
Ssl StringSecret Status - Status of SSL Secret.
- nlb
Type String - Nlb Type.
- resource
Group StringId - 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 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.