ibm.DnsZone
Explore with Pulumi AI
Create, update, or delete a DNS zone. For more information, see Managing DNS zones.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const pdns_1_zone = new ibm.DnsZone("pdns-1-zone", {
instanceId: p_dns_instance_id,
description: "testdescription",
label: "testlabel",
});
import pulumi
import pulumi_ibm as ibm
pdns_1_zone = ibm.DnsZone("pdns-1-zone",
instance_id=p_dns_instance_id,
description="testdescription",
label="testlabel")
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.NewDnsZone(ctx, "pdns-1-zone", &ibm.DnsZoneArgs{
InstanceId: pulumi.Any(p_dns_instance_id),
Description: pulumi.String("testdescription"),
Label: pulumi.String("testlabel"),
})
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 pdns_1_zone = new Ibm.DnsZone("pdns-1-zone", new()
{
InstanceId = p_dns_instance_id,
Description = "testdescription",
Label = "testlabel",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.DnsZone;
import com.pulumi.ibm.DnsZoneArgs;
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 pdns_1_zone = new DnsZone("pdns-1-zone", DnsZoneArgs.builder()
.instanceId(p_dns_instance_id)
.description("testdescription")
.label("testlabel")
.build());
}
}
resources:
pdns-1-zone:
type: ibm:DnsZone
properties:
instanceId: ${["p-dns-instance-id"]}
description: testdescription
label: testlabel
Create DnsZone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsZone(name: string, args: DnsZoneArgs, opts?: CustomResourceOptions);
@overload
def DnsZone(resource_name: str,
args: DnsZoneArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnsZone(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
description: Optional[str] = None,
dns_zone_id: Optional[str] = None,
label: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[DnsZoneTimeoutsArgs] = None)
func NewDnsZone(ctx *Context, name string, args DnsZoneArgs, opts ...ResourceOption) (*DnsZone, error)
public DnsZone(string name, DnsZoneArgs args, CustomResourceOptions? opts = null)
public DnsZone(String name, DnsZoneArgs args)
public DnsZone(String name, DnsZoneArgs args, CustomResourceOptions options)
type: ibm:DnsZone
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 DnsZoneArgs
- 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 DnsZoneArgs
- 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 DnsZoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsZoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsZoneArgs
- 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 dnsZoneResource = new Ibm.DnsZone("dnsZoneResource", new()
{
InstanceId = "string",
Description = "string",
DnsZoneId = "string",
Label = "string",
Name = "string",
Timeouts = new Ibm.Inputs.DnsZoneTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := ibm.NewDnsZone(ctx, "dnsZoneResource", &ibm.DnsZoneArgs{
InstanceId: pulumi.String("string"),
Description: pulumi.String("string"),
DnsZoneId: pulumi.String("string"),
Label: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &ibm.DnsZoneTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
.instanceId("string")
.description("string")
.dnsZoneId("string")
.label("string")
.name("string")
.timeouts(DnsZoneTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
dns_zone_resource = ibm.DnsZone("dnsZoneResource",
instance_id="string",
description="string",
dns_zone_id="string",
label="string",
name="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const dnsZoneResource = new ibm.DnsZone("dnsZoneResource", {
instanceId: "string",
description: "string",
dnsZoneId: "string",
label: "string",
name: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: ibm:DnsZone
properties:
description: string
dnsZoneId: string
instanceId: string
label: string
name: string
timeouts:
create: string
delete: string
update: string
DnsZone 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 DnsZone resource accepts the following input properties:
- Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- Description string
- The description of the DNS zone.
- Dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - Label string
- The label of the DNS zone.
- Name string
- The name of the DNS zone that you want to create.
- Timeouts
Dns
Zone Timeouts
- Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- Description string
- The description of the DNS zone.
- Dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - Label string
- The label of the DNS zone.
- Name string
- The name of the DNS zone that you want to create.
- Timeouts
Dns
Zone Timeouts Args
- instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- description String
- The description of the DNS zone.
- dns
Zone StringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - label String
- The label of the DNS zone.
- name String
- The name of the DNS zone that you want to create.
- timeouts
Dns
Zone Timeouts
- instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- description string
- The description of the DNS zone.
- dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - label string
- The label of the DNS zone.
- name string
- The name of the DNS zone that you want to create.
- timeouts
Dns
Zone Timeouts
- instance_
id str - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- description str
- The description of the DNS zone.
- dns_
zone_ strid - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - label str
- The label of the DNS zone.
- name str
- The name of the DNS zone that you want to create.
- timeouts
Dns
Zone Timeouts Args
- instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- description String
- The description of the DNS zone.
- dns
Zone StringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - label String
- The label of the DNS zone.
- name String
- The name of the DNS zone that you want to create.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsZone resource produces the following output properties:
- Created
On string - (Timestamp) The time when the DNS zone was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - (Timestamp) The time when the DNS zone was updated.
- State string
- (String) The state of the DNS zone.
- Zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- Created
On string - (Timestamp) The time when the DNS zone was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - (Timestamp) The time when the DNS zone was updated.
- State string
- (String) The state of the DNS zone.
- Zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- created
On String - (Timestamp) The time when the DNS zone was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - (Timestamp) The time when the DNS zone was updated.
- state String
- (String) The state of the DNS zone.
- zone
Id String - (String) The ID of the zone that is associated with the DNS zone.
- created
On string - (Timestamp) The time when the DNS zone was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - (Timestamp) The time when the DNS zone was updated.
- state string
- (String) The state of the DNS zone.
- zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- created_
on str - (Timestamp) The time when the DNS zone was created.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
on str - (Timestamp) The time when the DNS zone was updated.
- state str
- (String) The state of the DNS zone.
- zone_
id str - (String) The ID of the zone that is associated with the DNS zone.
- created
On String - (Timestamp) The time when the DNS zone was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - (Timestamp) The time when the DNS zone was updated.
- state String
- (String) The state of the DNS zone.
- zone
Id String - (String) The ID of the zone that is associated with the DNS zone.
Look up Existing DnsZone Resource
Get an existing DnsZone 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?: DnsZoneState, opts?: CustomResourceOptions): DnsZone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_on: Optional[str] = None,
description: Optional[str] = None,
dns_zone_id: Optional[str] = None,
instance_id: Optional[str] = None,
label: Optional[str] = None,
modified_on: Optional[str] = None,
name: Optional[str] = None,
state: Optional[str] = None,
timeouts: Optional[DnsZoneTimeoutsArgs] = None,
zone_id: Optional[str] = None) -> DnsZone
func GetDnsZone(ctx *Context, name string, id IDInput, state *DnsZoneState, opts ...ResourceOption) (*DnsZone, error)
public static DnsZone Get(string name, Input<string> id, DnsZoneState? state, CustomResourceOptions? opts = null)
public static DnsZone get(String name, Output<String> id, DnsZoneState state, CustomResourceOptions options)
resources: _: type: ibm:DnsZone 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.
- Created
On string - (Timestamp) The time when the DNS zone was created.
- Description string
- The description of the DNS zone.
- Dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- Label string
- The label of the DNS zone.
- Modified
On string - (Timestamp) The time when the DNS zone was updated.
- Name string
- The name of the DNS zone that you want to create.
- State string
- (String) The state of the DNS zone.
- Timeouts
Dns
Zone Timeouts - Zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- Created
On string - (Timestamp) The time when the DNS zone was created.
- Description string
- The description of the DNS zone.
- Dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- Label string
- The label of the DNS zone.
- Modified
On string - (Timestamp) The time when the DNS zone was updated.
- Name string
- The name of the DNS zone that you want to create.
- State string
- (String) The state of the DNS zone.
- Timeouts
Dns
Zone Timeouts Args - Zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- created
On String - (Timestamp) The time when the DNS zone was created.
- description String
- The description of the DNS zone.
- dns
Zone StringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- label String
- The label of the DNS zone.
- modified
On String - (Timestamp) The time when the DNS zone was updated.
- name String
- The name of the DNS zone that you want to create.
- state String
- (String) The state of the DNS zone.
- timeouts
Dns
Zone Timeouts - zone
Id String - (String) The ID of the zone that is associated with the DNS zone.
- created
On string - (Timestamp) The time when the DNS zone was created.
- description string
- The description of the DNS zone.
- dns
Zone stringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- label string
- The label of the DNS zone.
- modified
On string - (Timestamp) The time when the DNS zone was updated.
- name string
- The name of the DNS zone that you want to create.
- state string
- (String) The state of the DNS zone.
- timeouts
Dns
Zone Timeouts - zone
Id string - (String) The ID of the zone that is associated with the DNS zone.
- created_
on str - (Timestamp) The time when the DNS zone was created.
- description str
- The description of the DNS zone.
- dns_
zone_ strid - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - instance_
id str - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- label str
- The label of the DNS zone.
- modified_
on str - (Timestamp) The time when the DNS zone was updated.
- name str
- The name of the DNS zone that you want to create.
- state str
- (String) The state of the DNS zone.
- timeouts
Dns
Zone Timeouts Args - zone_
id str - (String) The ID of the zone that is associated with the DNS zone.
- created
On String - (Timestamp) The time when the DNS zone was created.
- description String
- The description of the DNS zone.
- dns
Zone StringId - (String) The ID of the DNS zone. The ID is composed of
<instance_id>/<zone_id>
. - instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to create a DNS zone.
- label String
- The label of the DNS zone.
- modified
On String - (Timestamp) The time when the DNS zone was updated.
- name String
- The name of the DNS zone that you want to create.
- state String
- (String) The state of the DNS zone.
- timeouts Property Map
- zone
Id String - (String) The ID of the zone that is associated with the DNS zone.
Supporting Types
DnsZoneTimeouts, DnsZoneTimeoutsArgs
Import
The ibm_dns_zone
resource can be imported by using private DNS instance ID and zone ID.
Example
$ pulumi import ibm:index/dnsZone:DnsZone example 6ffda12064634723b079acdb018ef308/5ffda12064634723b079acdb018ef308
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.