published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
DNS Zone resource schema.
Example Usage
resource "stackit_dns_zone" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "Example zone"
dns_name = "example-zone.com"
contact_email = "aa@bb.ccc"
type = "primary"
acl = "192.168.0.0/24"
description = "Example description"
default_ttl = 1230
}
# Only use the import statement, if you want to import an existing dns zone
import {
to = stackit_dns_zone.import-example
id = "${var.project_id},${var.zone_id}"
}
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,
dns_name: Optional[str] = None,
project_id: Optional[str] = None,
expire_time: Optional[int] = None,
default_ttl: Optional[int] = None,
description: Optional[str] = None,
contact_email: Optional[str] = None,
acl: Optional[str] = None,
is_reverse_zone: Optional[bool] = None,
name: Optional[str] = None,
negative_cache: Optional[int] = None,
primaries: Optional[Sequence[str]] = None,
active: Optional[bool] = None,
refresh_time: Optional[int] = None,
retry_time: Optional[int] = None,
type: Optional[str] = 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: stackit: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 Stackit.DnsZone("dnsZoneResource", new()
{
DnsName = "string",
ProjectId = "string",
ExpireTime = 0,
DefaultTtl = 0,
Description = "string",
ContactEmail = "string",
Acl = "string",
IsReverseZone = false,
Name = "string",
NegativeCache = 0,
Primaries = new[]
{
"string",
},
Active = false,
RefreshTime = 0,
RetryTime = 0,
Type = "string",
});
example, err := stackit.NewDnsZone(ctx, "dnsZoneResource", &stackit.DnsZoneArgs{
DnsName: pulumi.String("string"),
ProjectId: pulumi.String("string"),
ExpireTime: pulumi.Int(0),
DefaultTtl: pulumi.Int(0),
Description: pulumi.String("string"),
ContactEmail: pulumi.String("string"),
Acl: pulumi.String("string"),
IsReverseZone: pulumi.Bool(false),
Name: pulumi.String("string"),
NegativeCache: pulumi.Int(0),
Primaries: pulumi.StringArray{
pulumi.String("string"),
},
Active: pulumi.Bool(false),
RefreshTime: pulumi.Int(0),
RetryTime: pulumi.Int(0),
Type: pulumi.String("string"),
})
var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
.dnsName("string")
.projectId("string")
.expireTime(0)
.defaultTtl(0)
.description("string")
.contactEmail("string")
.acl("string")
.isReverseZone(false)
.name("string")
.negativeCache(0)
.primaries("string")
.active(false)
.refreshTime(0)
.retryTime(0)
.type("string")
.build());
dns_zone_resource = stackit.DnsZone("dnsZoneResource",
dns_name="string",
project_id="string",
expire_time=0,
default_ttl=0,
description="string",
contact_email="string",
acl="string",
is_reverse_zone=False,
name="string",
negative_cache=0,
primaries=["string"],
active=False,
refresh_time=0,
retry_time=0,
type="string")
const dnsZoneResource = new stackit.DnsZone("dnsZoneResource", {
dnsName: "string",
projectId: "string",
expireTime: 0,
defaultTtl: 0,
description: "string",
contactEmail: "string",
acl: "string",
isReverseZone: false,
name: "string",
negativeCache: 0,
primaries: ["string"],
active: false,
refreshTime: 0,
retryTime: 0,
type: "string",
});
type: stackit:DnsZone
properties:
acl: string
active: false
contactEmail: string
defaultTtl: 0
description: string
dnsName: string
expireTime: 0
isReverseZone: false
name: string
negativeCache: 0
primaries:
- string
projectId: string
refreshTime: 0
retryTime: 0
type: 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:
- Dns
Name string - The zone name. E.g.
example.com - Project
Id string - STACKIT project ID to which the dns zone is associated.
- Acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - Active bool
- Contact
Email string - A contact e-mail for the zone.
- Default
Ttl int - Default time to live. E.g. 3600.
- Description string
- Description of the zone.
- Expire
Time int - Expire time. E.g. 1209600.
- Is
Reverse boolZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - Name string
- The user given name of the zone.
- Negative
Cache int - Negative caching. E.g. 60
- Primaries List<string>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- Refresh
Time int - Refresh time. E.g. 3600
- Retry
Time int - Retry time. E.g. 600
- Type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
- Dns
Name string - The zone name. E.g.
example.com - Project
Id string - STACKIT project ID to which the dns zone is associated.
- Acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - Active bool
- Contact
Email string - A contact e-mail for the zone.
- Default
Ttl int - Default time to live. E.g. 3600.
- Description string
- Description of the zone.
- Expire
Time int - Expire time. E.g. 1209600.
- Is
Reverse boolZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - Name string
- The user given name of the zone.
- Negative
Cache int - Negative caching. E.g. 60
- Primaries []string
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- Refresh
Time int - Refresh time. E.g. 3600
- Retry
Time int - Retry time. E.g. 600
- Type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
- dns
Name String - The zone name. E.g.
example.com - project
Id String - STACKIT project ID to which the dns zone is associated.
- acl String
- The access control list. E.g.
0.0.0.0/0,::/0 - active Boolean
- contact
Email String - A contact e-mail for the zone.
- default
Ttl Integer - Default time to live. E.g. 3600.
- description String
- Description of the zone.
- expire
Time Integer - Expire time. E.g. 1209600.
- is
Reverse BooleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name String
- The user given name of the zone.
- negative
Cache Integer - Negative caching. E.g. 60
- primaries List<String>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- refresh
Time Integer - Refresh time. E.g. 3600
- retry
Time Integer - Retry time. E.g. 600
- type String
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
- dns
Name string - The zone name. E.g.
example.com - project
Id string - STACKIT project ID to which the dns zone is associated.
- acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - active boolean
- contact
Email string - A contact e-mail for the zone.
- default
Ttl number - Default time to live. E.g. 3600.
- description string
- Description of the zone.
- expire
Time number - Expire time. E.g. 1209600.
- is
Reverse booleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name string
- The user given name of the zone.
- negative
Cache number - Negative caching. E.g. 60
- primaries string[]
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- refresh
Time number - Refresh time. E.g. 3600
- retry
Time number - Retry time. E.g. 600
- type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
- dns_
name str - The zone name. E.g.
example.com - project_
id str - STACKIT project ID to which the dns zone is associated.
- acl str
- The access control list. E.g.
0.0.0.0/0,::/0 - active bool
- contact_
email str - A contact e-mail for the zone.
- default_
ttl int - Default time to live. E.g. 3600.
- description str
- Description of the zone.
- expire_
time int - Expire time. E.g. 1209600.
- is_
reverse_ boolzone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name str
- The user given name of the zone.
- negative_
cache int - Negative caching. E.g. 60
- primaries Sequence[str]
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- refresh_
time int - Refresh time. E.g. 3600
- retry_
time int - Retry time. E.g. 600
- type str
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
- dns
Name String - The zone name. E.g.
example.com - project
Id String - STACKIT project ID to which the dns zone is associated.
- acl String
- The access control list. E.g.
0.0.0.0/0,::/0 - active Boolean
- contact
Email String - A contact e-mail for the zone.
- default
Ttl Number - Default time to live. E.g. 3600.
- description String
- Description of the zone.
- expire
Time Number - Expire time. E.g. 1209600.
- is
Reverse BooleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name String
- The user given name of the zone.
- negative
Cache Number - Negative caching. E.g. 60
- primaries List<String>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- refresh
Time Number - Refresh time. E.g. 3600
- retry
Time Number - Retry time. E.g. 600
- type String
- Zone type. Defaults to
primary. Possible values are:primary,secondary.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsZone resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Name stringServer - Primary name server. FQDN.
- Record
Count int - Record count how many records are in the zone.
- Serial
Number int - Serial number. E.g.
2022111400. - State string
- Zone state. E.g.
CREATE_SUCCEEDED. - Visibility string
- Visibility of the zone. E.g.
public. - Zone
Id string - The zone ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Name stringServer - Primary name server. FQDN.
- Record
Count int - Record count how many records are in the zone.
- Serial
Number int - Serial number. E.g.
2022111400. - State string
- Zone state. E.g.
CREATE_SUCCEEDED. - Visibility string
- Visibility of the zone. E.g.
public. - Zone
Id string - The zone ID.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Name StringServer - Primary name server. FQDN.
- record
Count Integer - Record count how many records are in the zone.
- serial
Number Integer - Serial number. E.g.
2022111400. - state String
- Zone state. E.g.
CREATE_SUCCEEDED. - visibility String
- Visibility of the zone. E.g.
public. - zone
Id String - The zone ID.
- id string
- The provider-assigned unique ID for this managed resource.
- primary
Name stringServer - Primary name server. FQDN.
- record
Count number - Record count how many records are in the zone.
- serial
Number number - Serial number. E.g.
2022111400. - state string
- Zone state. E.g.
CREATE_SUCCEEDED. - visibility string
- Visibility of the zone. E.g.
public. - zone
Id string - The zone ID.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_
name_ strserver - Primary name server. FQDN.
- record_
count int - Record count how many records are in the zone.
- serial_
number int - Serial number. E.g.
2022111400. - state str
- Zone state. E.g.
CREATE_SUCCEEDED. - visibility str
- Visibility of the zone. E.g.
public. - zone_
id str - The zone ID.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Name StringServer - Primary name server. FQDN.
- record
Count Number - Record count how many records are in the zone.
- serial
Number Number - Serial number. E.g.
2022111400. - state String
- Zone state. E.g.
CREATE_SUCCEEDED. - visibility String
- Visibility of the zone. E.g.
public. - zone
Id String - The zone ID.
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,
acl: Optional[str] = None,
active: Optional[bool] = None,
contact_email: Optional[str] = None,
default_ttl: Optional[int] = None,
description: Optional[str] = None,
dns_name: Optional[str] = None,
expire_time: Optional[int] = None,
is_reverse_zone: Optional[bool] = None,
name: Optional[str] = None,
negative_cache: Optional[int] = None,
primaries: Optional[Sequence[str]] = None,
primary_name_server: Optional[str] = None,
project_id: Optional[str] = None,
record_count: Optional[int] = None,
refresh_time: Optional[int] = None,
retry_time: Optional[int] = None,
serial_number: Optional[int] = None,
state: Optional[str] = None,
type: Optional[str] = None,
visibility: Optional[str] = None,
zone_id: Optional[str] = None) -> DnsZonefunc 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: stackit: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.
- Acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - Active bool
- Contact
Email string - A contact e-mail for the zone.
- Default
Ttl int - Default time to live. E.g. 3600.
- Description string
- Description of the zone.
- Dns
Name string - The zone name. E.g.
example.com - Expire
Time int - Expire time. E.g. 1209600.
- Is
Reverse boolZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - Name string
- The user given name of the zone.
- Negative
Cache int - Negative caching. E.g. 60
- Primaries List<string>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- Primary
Name stringServer - Primary name server. FQDN.
- Project
Id string - STACKIT project ID to which the dns zone is associated.
- Record
Count int - Record count how many records are in the zone.
- Refresh
Time int - Refresh time. E.g. 3600
- Retry
Time int - Retry time. E.g. 600
- Serial
Number int - Serial number. E.g.
2022111400. - State string
- Zone state. E.g.
CREATE_SUCCEEDED. - Type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - Visibility string
- Visibility of the zone. E.g.
public. - Zone
Id string - The zone ID.
- Acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - Active bool
- Contact
Email string - A contact e-mail for the zone.
- Default
Ttl int - Default time to live. E.g. 3600.
- Description string
- Description of the zone.
- Dns
Name string - The zone name. E.g.
example.com - Expire
Time int - Expire time. E.g. 1209600.
- Is
Reverse boolZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - Name string
- The user given name of the zone.
- Negative
Cache int - Negative caching. E.g. 60
- Primaries []string
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- Primary
Name stringServer - Primary name server. FQDN.
- Project
Id string - STACKIT project ID to which the dns zone is associated.
- Record
Count int - Record count how many records are in the zone.
- Refresh
Time int - Refresh time. E.g. 3600
- Retry
Time int - Retry time. E.g. 600
- Serial
Number int - Serial number. E.g.
2022111400. - State string
- Zone state. E.g.
CREATE_SUCCEEDED. - Type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - Visibility string
- Visibility of the zone. E.g.
public. - Zone
Id string - The zone ID.
- acl String
- The access control list. E.g.
0.0.0.0/0,::/0 - active Boolean
- contact
Email String - A contact e-mail for the zone.
- default
Ttl Integer - Default time to live. E.g. 3600.
- description String
- Description of the zone.
- dns
Name String - The zone name. E.g.
example.com - expire
Time Integer - Expire time. E.g. 1209600.
- is
Reverse BooleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name String
- The user given name of the zone.
- negative
Cache Integer - Negative caching. E.g. 60
- primaries List<String>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- primary
Name StringServer - Primary name server. FQDN.
- project
Id String - STACKIT project ID to which the dns zone is associated.
- record
Count Integer - Record count how many records are in the zone.
- refresh
Time Integer - Refresh time. E.g. 3600
- retry
Time Integer - Retry time. E.g. 600
- serial
Number Integer - Serial number. E.g.
2022111400. - state String
- Zone state. E.g.
CREATE_SUCCEEDED. - type String
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - visibility String
- Visibility of the zone. E.g.
public. - zone
Id String - The zone ID.
- acl string
- The access control list. E.g.
0.0.0.0/0,::/0 - active boolean
- contact
Email string - A contact e-mail for the zone.
- default
Ttl number - Default time to live. E.g. 3600.
- description string
- Description of the zone.
- dns
Name string - The zone name. E.g.
example.com - expire
Time number - Expire time. E.g. 1209600.
- is
Reverse booleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name string
- The user given name of the zone.
- negative
Cache number - Negative caching. E.g. 60
- primaries string[]
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- primary
Name stringServer - Primary name server. FQDN.
- project
Id string - STACKIT project ID to which the dns zone is associated.
- record
Count number - Record count how many records are in the zone.
- refresh
Time number - Refresh time. E.g. 3600
- retry
Time number - Retry time. E.g. 600
- serial
Number number - Serial number. E.g.
2022111400. - state string
- Zone state. E.g.
CREATE_SUCCEEDED. - type string
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - visibility string
- Visibility of the zone. E.g.
public. - zone
Id string - The zone ID.
- acl str
- The access control list. E.g.
0.0.0.0/0,::/0 - active bool
- contact_
email str - A contact e-mail for the zone.
- default_
ttl int - Default time to live. E.g. 3600.
- description str
- Description of the zone.
- dns_
name str - The zone name. E.g.
example.com - expire_
time int - Expire time. E.g. 1209600.
- is_
reverse_ boolzone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name str
- The user given name of the zone.
- negative_
cache int - Negative caching. E.g. 60
- primaries Sequence[str]
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- primary_
name_ strserver - Primary name server. FQDN.
- project_
id str - STACKIT project ID to which the dns zone is associated.
- record_
count int - Record count how many records are in the zone.
- refresh_
time int - Refresh time. E.g. 3600
- retry_
time int - Retry time. E.g. 600
- serial_
number int - Serial number. E.g.
2022111400. - state str
- Zone state. E.g.
CREATE_SUCCEEDED. - type str
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - visibility str
- Visibility of the zone. E.g.
public. - zone_
id str - The zone ID.
- acl String
- The access control list. E.g.
0.0.0.0/0,::/0 - active Boolean
- contact
Email String - A contact e-mail for the zone.
- default
Ttl Number - Default time to live. E.g. 3600.
- description String
- Description of the zone.
- dns
Name String - The zone name. E.g.
example.com - expire
Time Number - Expire time. E.g. 1209600.
- is
Reverse BooleanZone - Specifies, if the zone is a reverse zone or not. Defaults to
false - name String
- The user given name of the zone.
- negative
Cache Number - Negative caching. E.g. 60
- primaries List<String>
- Primary name server for secondary zone. E.g. ["1.2.3.4"]
- primary
Name StringServer - Primary name server. FQDN.
- project
Id String - STACKIT project ID to which the dns zone is associated.
- record
Count Number - Record count how many records are in the zone.
- refresh
Time Number - Refresh time. E.g. 3600
- retry
Time Number - Retry time. E.g. 600
- serial
Number Number - Serial number. E.g.
2022111400. - state String
- Zone state. E.g.
CREATE_SUCCEEDED. - type String
- Zone type. Defaults to
primary. Possible values are:primary,secondary. - visibility String
- Visibility of the zone. E.g.
public. - zone
Id String - The zone ID.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Friday, Feb 20, 2026 by stackitcloud
