1. Packages
  2. Ibm Provider
  3. API Docs
  4. DnsLinkedZone
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.DnsLinkedZone

Explore with Pulumi AI

The DNS linked zone resource allows users to request and manage linked zones.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const test_pdns_instance = new ibm.ResourceInstance("test-pdns-instance", {
    resourceGroupId: data.ibm_resource_group.rg.id,
    location: "global",
    service: "dns-svcs",
    plan: "standard-dns",
});
const test_pdns_zone = new ibm.DnsZone("test-pdns-zone", {
    instanceId: test_pdns_instance.guid,
    description: "testdescription",
    label: "testlabel-updated",
});
const test = new ibm.DnsLinkedZone("test", {
    instanceId: test_pdns_instance.guid,
    description: "seczone terraform plugin test",
    ownerInstanceId: "OWNER Instance ID",
    ownerZoneId: "OWNER ZONE ID",
    label: "test",
});
Copy
import pulumi
import pulumi_ibm as ibm

test_pdns_instance = ibm.ResourceInstance("test-pdns-instance",
    resource_group_id=data["ibm_resource_group"]["rg"]["id"],
    location="global",
    service="dns-svcs",
    plan="standard-dns")
test_pdns_zone = ibm.DnsZone("test-pdns-zone",
    instance_id=test_pdns_instance.guid,
    description="testdescription",
    label="testlabel-updated")
test = ibm.DnsLinkedZone("test",
    instance_id=test_pdns_instance.guid,
    description="seczone terraform plugin test",
    owner_instance_id="OWNER Instance ID",
    owner_zone_id="OWNER ZONE ID",
    label="test")
Copy
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 {
		test_pdns_instance, err := ibm.NewResourceInstance(ctx, "test-pdns-instance", &ibm.ResourceInstanceArgs{
			ResourceGroupId: pulumi.Any(data.Ibm_resource_group.Rg.Id),
			Location:        pulumi.String("global"),
			Service:         pulumi.String("dns-svcs"),
			Plan:            pulumi.String("standard-dns"),
		})
		if err != nil {
			return err
		}
		_, err = ibm.NewDnsZone(ctx, "test-pdns-zone", &ibm.DnsZoneArgs{
			InstanceId:  test_pdns_instance.Guid,
			Description: pulumi.String("testdescription"),
			Label:       pulumi.String("testlabel-updated"),
		})
		if err != nil {
			return err
		}
		_, err = ibm.NewDnsLinkedZone(ctx, "test", &ibm.DnsLinkedZoneArgs{
			InstanceId:      test_pdns_instance.Guid,
			Description:     pulumi.String("seczone terraform plugin test"),
			OwnerInstanceId: pulumi.String("OWNER Instance ID"),
			OwnerZoneId:     pulumi.String("OWNER ZONE ID"),
			Label:           pulumi.String("test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var test_pdns_instance = new Ibm.ResourceInstance("test-pdns-instance", new()
    {
        ResourceGroupId = data.Ibm_resource_group.Rg.Id,
        Location = "global",
        Service = "dns-svcs",
        Plan = "standard-dns",
    });

    var test_pdns_zone = new Ibm.DnsZone("test-pdns-zone", new()
    {
        InstanceId = test_pdns_instance.Guid,
        Description = "testdescription",
        Label = "testlabel-updated",
    });

    var test = new Ibm.DnsLinkedZone("test", new()
    {
        InstanceId = test_pdns_instance.Guid,
        Description = "seczone terraform plugin test",
        OwnerInstanceId = "OWNER Instance ID",
        OwnerZoneId = "OWNER ZONE ID",
        Label = "test",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.ResourceInstance;
import com.pulumi.ibm.ResourceInstanceArgs;
import com.pulumi.ibm.DnsZone;
import com.pulumi.ibm.DnsZoneArgs;
import com.pulumi.ibm.DnsLinkedZone;
import com.pulumi.ibm.DnsLinkedZoneArgs;
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) {
        var test_pdns_instance = new ResourceInstance("test-pdns-instance", ResourceInstanceArgs.builder()
            .resourceGroupId(data.ibm_resource_group().rg().id())
            .location("global")
            .service("dns-svcs")
            .plan("standard-dns")
            .build());

        var test_pdns_zone = new DnsZone("test-pdns-zone", DnsZoneArgs.builder()
            .instanceId(test_pdns_instance.guid())
            .description("testdescription")
            .label("testlabel-updated")
            .build());

        var test = new DnsLinkedZone("test", DnsLinkedZoneArgs.builder()
            .instanceId(test_pdns_instance.guid())
            .description("seczone terraform plugin test")
            .ownerInstanceId("OWNER Instance ID")
            .ownerZoneId("OWNER ZONE ID")
            .label("test")
            .build());

    }
}
Copy
resources:
  test-pdns-instance:
    type: ibm:ResourceInstance
    properties:
      resourceGroupId: ${data.ibm_resource_group.rg.id}
      location: global
      service: dns-svcs
      plan: standard-dns
  test-pdns-zone:
    type: ibm:DnsZone
    properties:
      instanceId: ${["test-pdns-instance"].guid}
      description: testdescription
      label: testlabel-updated
  test:
    type: ibm:DnsLinkedZone
    properties:
      instanceId: ${["test-pdns-instance"].guid}
      description: seczone terraform plugin test
      ownerInstanceId: OWNER Instance ID
      ownerZoneId: OWNER ZONE ID
      label: test
Copy

Create DnsLinkedZone Resource

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

Constructor syntax

new DnsLinkedZone(name: string, args: DnsLinkedZoneArgs, opts?: CustomResourceOptions);
@overload
def DnsLinkedZone(resource_name: str,
                  args: DnsLinkedZoneArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def DnsLinkedZone(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  instance_id: Optional[str] = None,
                  owner_instance_id: Optional[str] = None,
                  owner_zone_id: Optional[str] = None,
                  approval_required_before: Optional[str] = None,
                  description: Optional[str] = None,
                  dns_linked_zone_id: Optional[str] = None,
                  label: Optional[str] = None,
                  linked_to: Optional[str] = None,
                  name: Optional[str] = None)
func NewDnsLinkedZone(ctx *Context, name string, args DnsLinkedZoneArgs, opts ...ResourceOption) (*DnsLinkedZone, error)
public DnsLinkedZone(string name, DnsLinkedZoneArgs args, CustomResourceOptions? opts = null)
public DnsLinkedZone(String name, DnsLinkedZoneArgs args)
public DnsLinkedZone(String name, DnsLinkedZoneArgs args, CustomResourceOptions options)
type: ibm:DnsLinkedZone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DnsLinkedZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DnsLinkedZoneArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DnsLinkedZoneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DnsLinkedZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DnsLinkedZoneArgs
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 dnsLinkedZoneResource = new Ibm.DnsLinkedZone("dnsLinkedZoneResource", new()
{
    InstanceId = "string",
    OwnerInstanceId = "string",
    OwnerZoneId = "string",
    ApprovalRequiredBefore = "string",
    Description = "string",
    DnsLinkedZoneId = "string",
    Label = "string",
    LinkedTo = "string",
    Name = "string",
});
Copy
example, err := ibm.NewDnsLinkedZone(ctx, "dnsLinkedZoneResource", &ibm.DnsLinkedZoneArgs{
InstanceId: pulumi.String("string"),
OwnerInstanceId: pulumi.String("string"),
OwnerZoneId: pulumi.String("string"),
ApprovalRequiredBefore: pulumi.String("string"),
Description: pulumi.String("string"),
DnsLinkedZoneId: pulumi.String("string"),
Label: pulumi.String("string"),
LinkedTo: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var dnsLinkedZoneResource = new DnsLinkedZone("dnsLinkedZoneResource", DnsLinkedZoneArgs.builder()
    .instanceId("string")
    .ownerInstanceId("string")
    .ownerZoneId("string")
    .approvalRequiredBefore("string")
    .description("string")
    .dnsLinkedZoneId("string")
    .label("string")
    .linkedTo("string")
    .name("string")
    .build());
Copy
dns_linked_zone_resource = ibm.DnsLinkedZone("dnsLinkedZoneResource",
    instance_id="string",
    owner_instance_id="string",
    owner_zone_id="string",
    approval_required_before="string",
    description="string",
    dns_linked_zone_id="string",
    label="string",
    linked_to="string",
    name="string")
Copy
const dnsLinkedZoneResource = new ibm.DnsLinkedZone("dnsLinkedZoneResource", {
    instanceId: "string",
    ownerInstanceId: "string",
    ownerZoneId: "string",
    approvalRequiredBefore: "string",
    description: "string",
    dnsLinkedZoneId: "string",
    label: "string",
    linkedTo: "string",
    name: "string",
});
Copy
type: ibm:DnsLinkedZone
properties:
    approvalRequiredBefore: string
    description: string
    dnsLinkedZoneId: string
    instanceId: string
    label: string
    linkedTo: string
    name: string
    ownerInstanceId: string
    ownerZoneId: string
Copy

DnsLinkedZone 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 DnsLinkedZone resource accepts the following input properties:

InstanceId This property is required. string
The unique identifier of a DNS Linked zone.
OwnerInstanceId This property is required. string
The unique identifier of the owner DNS instance.
OwnerZoneId This property is required. string
The unique identifier of the owner DNS zone.
ApprovalRequiredBefore string
DNS Linked Approval required before.
Description string
Descriptive text of the DNS Linked zone.
DnsLinkedZoneId string
Label string
The label of the DNS Linked zone.
LinkedTo string
The zone that is linked to the DNS Linked zone
Name string
The name of the DNS Linked zone.
InstanceId This property is required. string
The unique identifier of a DNS Linked zone.
OwnerInstanceId This property is required. string
The unique identifier of the owner DNS instance.
OwnerZoneId This property is required. string
The unique identifier of the owner DNS zone.
ApprovalRequiredBefore string
DNS Linked Approval required before.
Description string
Descriptive text of the DNS Linked zone.
DnsLinkedZoneId string
Label string
The label of the DNS Linked zone.
LinkedTo string
The zone that is linked to the DNS Linked zone
Name string
The name of the DNS Linked zone.
instanceId This property is required. String
The unique identifier of a DNS Linked zone.
ownerInstanceId This property is required. String
The unique identifier of the owner DNS instance.
ownerZoneId This property is required. String
The unique identifier of the owner DNS zone.
approvalRequiredBefore String
DNS Linked Approval required before.
description String
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId String
label String
The label of the DNS Linked zone.
linkedTo String
The zone that is linked to the DNS Linked zone
name String
The name of the DNS Linked zone.
instanceId This property is required. string
The unique identifier of a DNS Linked zone.
ownerInstanceId This property is required. string
The unique identifier of the owner DNS instance.
ownerZoneId This property is required. string
The unique identifier of the owner DNS zone.
approvalRequiredBefore string
DNS Linked Approval required before.
description string
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId string
label string
The label of the DNS Linked zone.
linkedTo string
The zone that is linked to the DNS Linked zone
name string
The name of the DNS Linked zone.
instance_id This property is required. str
The unique identifier of a DNS Linked zone.
owner_instance_id This property is required. str
The unique identifier of the owner DNS instance.
owner_zone_id This property is required. str
The unique identifier of the owner DNS zone.
approval_required_before str
DNS Linked Approval required before.
description str
Descriptive text of the DNS Linked zone.
dns_linked_zone_id str
label str
The label of the DNS Linked zone.
linked_to str
The zone that is linked to the DNS Linked zone
name str
The name of the DNS Linked zone.
instanceId This property is required. String
The unique identifier of a DNS Linked zone.
ownerInstanceId This property is required. String
The unique identifier of the owner DNS instance.
ownerZoneId This property is required. String
The unique identifier of the owner DNS zone.
approvalRequiredBefore String
DNS Linked Approval required before.
description String
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId String
label String
The label of the DNS Linked zone.
linkedTo String
The zone that is linked to the DNS Linked zone
name String
The name of the DNS Linked zone.

Outputs

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

CreatedOn string
(Timestamp) The time (created On) of the Linked Zone.
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
State string
(String) The state of the DNS Linked zone.
CreatedOn string
(Timestamp) The time (created On) of the Linked Zone.
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
State string
(String) The state of the DNS Linked zone.
createdOn String
(Timestamp) The time (created On) of the Linked Zone.
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
(Timestamp) The time (modified On) of the Linked Zone.
state String
(String) The state of the DNS Linked zone.
createdOn string
(Timestamp) The time (created On) of the Linked Zone.
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
state string
(String) The state of the DNS Linked zone.
created_on str
(Timestamp) The time (created On) of the Linked Zone.
id str
The provider-assigned unique ID for this managed resource.
modified_on str
(Timestamp) The time (modified On) of the Linked Zone.
state str
(String) The state of the DNS Linked zone.
createdOn String
(Timestamp) The time (created On) of the Linked Zone.
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
(Timestamp) The time (modified On) of the Linked Zone.
state String
(String) The state of the DNS Linked zone.

Look up Existing DnsLinkedZone Resource

Get an existing DnsLinkedZone 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?: DnsLinkedZoneState, opts?: CustomResourceOptions): DnsLinkedZone
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        approval_required_before: Optional[str] = None,
        created_on: Optional[str] = None,
        description: Optional[str] = None,
        dns_linked_zone_id: Optional[str] = None,
        instance_id: Optional[str] = None,
        label: Optional[str] = None,
        linked_to: Optional[str] = None,
        modified_on: Optional[str] = None,
        name: Optional[str] = None,
        owner_instance_id: Optional[str] = None,
        owner_zone_id: Optional[str] = None,
        state: Optional[str] = None) -> DnsLinkedZone
func GetDnsLinkedZone(ctx *Context, name string, id IDInput, state *DnsLinkedZoneState, opts ...ResourceOption) (*DnsLinkedZone, error)
public static DnsLinkedZone Get(string name, Input<string> id, DnsLinkedZoneState? state, CustomResourceOptions? opts = null)
public static DnsLinkedZone get(String name, Output<String> id, DnsLinkedZoneState state, CustomResourceOptions options)
resources:  _:    type: ibm:DnsLinkedZone    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApprovalRequiredBefore string
DNS Linked Approval required before.
CreatedOn string
(Timestamp) The time (created On) of the Linked Zone.
Description string
Descriptive text of the DNS Linked zone.
DnsLinkedZoneId string
InstanceId string
The unique identifier of a DNS Linked zone.
Label string
The label of the DNS Linked zone.
LinkedTo string
The zone that is linked to the DNS Linked zone
ModifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
Name string
The name of the DNS Linked zone.
OwnerInstanceId string
The unique identifier of the owner DNS instance.
OwnerZoneId string
The unique identifier of the owner DNS zone.
State string
(String) The state of the DNS Linked zone.
ApprovalRequiredBefore string
DNS Linked Approval required before.
CreatedOn string
(Timestamp) The time (created On) of the Linked Zone.
Description string
Descriptive text of the DNS Linked zone.
DnsLinkedZoneId string
InstanceId string
The unique identifier of a DNS Linked zone.
Label string
The label of the DNS Linked zone.
LinkedTo string
The zone that is linked to the DNS Linked zone
ModifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
Name string
The name of the DNS Linked zone.
OwnerInstanceId string
The unique identifier of the owner DNS instance.
OwnerZoneId string
The unique identifier of the owner DNS zone.
State string
(String) The state of the DNS Linked zone.
approvalRequiredBefore String
DNS Linked Approval required before.
createdOn String
(Timestamp) The time (created On) of the Linked Zone.
description String
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId String
instanceId String
The unique identifier of a DNS Linked zone.
label String
The label of the DNS Linked zone.
linkedTo String
The zone that is linked to the DNS Linked zone
modifiedOn String
(Timestamp) The time (modified On) of the Linked Zone.
name String
The name of the DNS Linked zone.
ownerInstanceId String
The unique identifier of the owner DNS instance.
ownerZoneId String
The unique identifier of the owner DNS zone.
state String
(String) The state of the DNS Linked zone.
approvalRequiredBefore string
DNS Linked Approval required before.
createdOn string
(Timestamp) The time (created On) of the Linked Zone.
description string
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId string
instanceId string
The unique identifier of a DNS Linked zone.
label string
The label of the DNS Linked zone.
linkedTo string
The zone that is linked to the DNS Linked zone
modifiedOn string
(Timestamp) The time (modified On) of the Linked Zone.
name string
The name of the DNS Linked zone.
ownerInstanceId string
The unique identifier of the owner DNS instance.
ownerZoneId string
The unique identifier of the owner DNS zone.
state string
(String) The state of the DNS Linked zone.
approval_required_before str
DNS Linked Approval required before.
created_on str
(Timestamp) The time (created On) of the Linked Zone.
description str
Descriptive text of the DNS Linked zone.
dns_linked_zone_id str
instance_id str
The unique identifier of a DNS Linked zone.
label str
The label of the DNS Linked zone.
linked_to str
The zone that is linked to the DNS Linked zone
modified_on str
(Timestamp) The time (modified On) of the Linked Zone.
name str
The name of the DNS Linked zone.
owner_instance_id str
The unique identifier of the owner DNS instance.
owner_zone_id str
The unique identifier of the owner DNS zone.
state str
(String) The state of the DNS Linked zone.
approvalRequiredBefore String
DNS Linked Approval required before.
createdOn String
(Timestamp) The time (created On) of the Linked Zone.
description String
Descriptive text of the DNS Linked zone.
dnsLinkedZoneId String
instanceId String
The unique identifier of a DNS Linked zone.
label String
The label of the DNS Linked zone.
linkedTo String
The zone that is linked to the DNS Linked zone
modifiedOn String
(Timestamp) The time (modified On) of the Linked Zone.
name String
The name of the DNS Linked zone.
ownerInstanceId String
The unique identifier of the owner DNS instance.
ownerZoneId String
The unique identifier of the owner DNS zone.
state String
(String) The state of the DNS Linked zone.

Import

The ibm_dns_linked_zone can be imported by using DNS Services instance ID, Linked Zone ID.

The id property can be formed from instance_id, linked_zone_id in the following format:

<instance_id>/<linked_zone_id>

Example

$ pulumi import ibm:index/dnsLinkedZone:DnsLinkedZone sample "d10e6956-377a-43fb-a5a6-54763a6b1dc2/63481bef-3759-4b5e-99df-73be7ba40a8a"
Copy

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.