published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
DNS Record Set Resource schema.
Example Usage
resource "stackit_dns_record_set" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
zone_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-record-set"
type = "A"
comment = "Example comment"
records = ["1.2.3.4"]
}
# Only use the import statement, if you want to import an existing dns record set
import {
to = stackit_dns_record_set.import-example
id = "${var.project_id},${var.zone_id},${var.record_set_id}"
}
Create DnsRecordSet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsRecordSet(name: string, args: DnsRecordSetArgs, opts?: CustomResourceOptions);@overload
def DnsRecordSet(resource_name: str,
args: DnsRecordSetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnsRecordSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
records: Optional[Sequence[str]] = None,
type: Optional[str] = None,
zone_id: Optional[str] = None,
active: Optional[bool] = None,
comment: Optional[str] = None,
name: Optional[str] = None,
ttl: Optional[int] = None)func NewDnsRecordSet(ctx *Context, name string, args DnsRecordSetArgs, opts ...ResourceOption) (*DnsRecordSet, error)public DnsRecordSet(string name, DnsRecordSetArgs args, CustomResourceOptions? opts = null)
public DnsRecordSet(String name, DnsRecordSetArgs args)
public DnsRecordSet(String name, DnsRecordSetArgs args, CustomResourceOptions options)
type: stackit:DnsRecordSet
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 DnsRecordSetArgs
- 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 DnsRecordSetArgs
- 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 DnsRecordSetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsRecordSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsRecordSetArgs
- 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 dnsRecordSetResource = new Stackit.DnsRecordSet("dnsRecordSetResource", new()
{
ProjectId = "string",
Records = new[]
{
"string",
},
Type = "string",
ZoneId = "string",
Active = false,
Comment = "string",
Name = "string",
Ttl = 0,
});
example, err := stackit.NewDnsRecordSet(ctx, "dnsRecordSetResource", &stackit.DnsRecordSetArgs{
ProjectId: pulumi.String("string"),
Records: pulumi.StringArray{
pulumi.String("string"),
},
Type: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Active: pulumi.Bool(false),
Comment: pulumi.String("string"),
Name: pulumi.String("string"),
Ttl: pulumi.Int(0),
})
var dnsRecordSetResource = new DnsRecordSet("dnsRecordSetResource", DnsRecordSetArgs.builder()
.projectId("string")
.records("string")
.type("string")
.zoneId("string")
.active(false)
.comment("string")
.name("string")
.ttl(0)
.build());
dns_record_set_resource = stackit.DnsRecordSet("dnsRecordSetResource",
project_id="string",
records=["string"],
type="string",
zone_id="string",
active=False,
comment="string",
name="string",
ttl=0)
const dnsRecordSetResource = new stackit.DnsRecordSet("dnsRecordSetResource", {
projectId: "string",
records: ["string"],
type: "string",
zoneId: "string",
active: false,
comment: "string",
name: "string",
ttl: 0,
});
type: stackit:DnsRecordSet
properties:
active: false
comment: string
name: string
projectId: string
records:
- string
ttl: 0
type: string
zoneId: string
DnsRecordSet 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 DnsRecordSet resource accepts the following input properties:
- Project
Id string - STACKIT project ID to which the dns record set is associated.
- Records List<string>
- Records.
- Type string
- The record set type. E.g.
AorCNAME - Zone
Id string - The zone ID to which is dns record set is associated.
- Active bool
- Specifies if the record set is active or not. Defaults to
true - Comment string
- Comment.
- Name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - Ttl int
- Time to live. E.g. 3600
- Project
Id string - STACKIT project ID to which the dns record set is associated.
- Records []string
- Records.
- Type string
- The record set type. E.g.
AorCNAME - Zone
Id string - The zone ID to which is dns record set is associated.
- Active bool
- Specifies if the record set is active or not. Defaults to
true - Comment string
- Comment.
- Name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - Ttl int
- Time to live. E.g. 3600
- project
Id String - STACKIT project ID to which the dns record set is associated.
- records List<String>
- Records.
- type String
- The record set type. E.g.
AorCNAME - zone
Id String - The zone ID to which is dns record set is associated.
- active Boolean
- Specifies if the record set is active or not. Defaults to
true - comment String
- Comment.
- name String
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - ttl Integer
- Time to live. E.g. 3600
- project
Id string - STACKIT project ID to which the dns record set is associated.
- records string[]
- Records.
- type string
- The record set type. E.g.
AorCNAME - zone
Id string - The zone ID to which is dns record set is associated.
- active boolean
- Specifies if the record set is active or not. Defaults to
true - comment string
- Comment.
- name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - ttl number
- Time to live. E.g. 3600
- project_
id str - STACKIT project ID to which the dns record set is associated.
- records Sequence[str]
- Records.
- type str
- The record set type. E.g.
AorCNAME - zone_
id str - The zone ID to which is dns record set is associated.
- active bool
- Specifies if the record set is active or not. Defaults to
true - comment str
- Comment.
- name str
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - ttl int
- Time to live. E.g. 3600
- project
Id String - STACKIT project ID to which the dns record set is associated.
- records List<String>
- Records.
- type String
- The record set type. E.g.
AorCNAME - zone
Id String - The zone ID to which is dns record set is associated.
- active Boolean
- Specifies if the record set is active or not. Defaults to
true - comment String
- Comment.
- name String
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - ttl Number
- Time to live. E.g. 3600
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsRecordSet resource produces the following output properties:
- Error string
- Error shows error in case create/update/delete failed.
- Fqdn string
- Fully qualified domain name (FQDN) of the record set.
- Id string
- The provider-assigned unique ID for this managed resource.
- Record
Set stringId - The rr set id.
- State string
- Record set state.
- Error string
- Error shows error in case create/update/delete failed.
- Fqdn string
- Fully qualified domain name (FQDN) of the record set.
- Id string
- The provider-assigned unique ID for this managed resource.
- Record
Set stringId - The rr set id.
- State string
- Record set state.
- error String
- Error shows error in case create/update/delete failed.
- fqdn String
- Fully qualified domain name (FQDN) of the record set.
- id String
- The provider-assigned unique ID for this managed resource.
- record
Set StringId - The rr set id.
- state String
- Record set state.
- error string
- Error shows error in case create/update/delete failed.
- fqdn string
- Fully qualified domain name (FQDN) of the record set.
- id string
- The provider-assigned unique ID for this managed resource.
- record
Set stringId - The rr set id.
- state string
- Record set state.
- error str
- Error shows error in case create/update/delete failed.
- fqdn str
- Fully qualified domain name (FQDN) of the record set.
- id str
- The provider-assigned unique ID for this managed resource.
- record_
set_ strid - The rr set id.
- state str
- Record set state.
- error String
- Error shows error in case create/update/delete failed.
- fqdn String
- Fully qualified domain name (FQDN) of the record set.
- id String
- The provider-assigned unique ID for this managed resource.
- record
Set StringId - The rr set id.
- state String
- Record set state.
Look up Existing DnsRecordSet Resource
Get an existing DnsRecordSet 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?: DnsRecordSetState, opts?: CustomResourceOptions): DnsRecordSet@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
comment: Optional[str] = None,
error: Optional[str] = None,
fqdn: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
record_set_id: Optional[str] = None,
records: Optional[Sequence[str]] = None,
state: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
zone_id: Optional[str] = None) -> DnsRecordSetfunc GetDnsRecordSet(ctx *Context, name string, id IDInput, state *DnsRecordSetState, opts ...ResourceOption) (*DnsRecordSet, error)public static DnsRecordSet Get(string name, Input<string> id, DnsRecordSetState? state, CustomResourceOptions? opts = null)public static DnsRecordSet get(String name, Output<String> id, DnsRecordSetState state, CustomResourceOptions options)resources: _: type: stackit:DnsRecordSet 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.
- Active bool
- Specifies if the record set is active or not. Defaults to
true - Comment string
- Comment.
- Error string
- Error shows error in case create/update/delete failed.
- Fqdn string
- Fully qualified domain name (FQDN) of the record set.
- Name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - Project
Id string - STACKIT project ID to which the dns record set is associated.
- Record
Set stringId - The rr set id.
- Records List<string>
- Records.
- State string
- Record set state.
- Ttl int
- Time to live. E.g. 3600
- Type string
- The record set type. E.g.
AorCNAME - Zone
Id string - The zone ID to which is dns record set is associated.
- Active bool
- Specifies if the record set is active or not. Defaults to
true - Comment string
- Comment.
- Error string
- Error shows error in case create/update/delete failed.
- Fqdn string
- Fully qualified domain name (FQDN) of the record set.
- Name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - Project
Id string - STACKIT project ID to which the dns record set is associated.
- Record
Set stringId - The rr set id.
- Records []string
- Records.
- State string
- Record set state.
- Ttl int
- Time to live. E.g. 3600
- Type string
- The record set type. E.g.
AorCNAME - Zone
Id string - The zone ID to which is dns record set is associated.
- active Boolean
- Specifies if the record set is active or not. Defaults to
true - comment String
- Comment.
- error String
- Error shows error in case create/update/delete failed.
- fqdn String
- Fully qualified domain name (FQDN) of the record set.
- name String
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - project
Id String - STACKIT project ID to which the dns record set is associated.
- record
Set StringId - The rr set id.
- records List<String>
- Records.
- state String
- Record set state.
- ttl Integer
- Time to live. E.g. 3600
- type String
- The record set type. E.g.
AorCNAME - zone
Id String - The zone ID to which is dns record set is associated.
- active boolean
- Specifies if the record set is active or not. Defaults to
true - comment string
- Comment.
- error string
- Error shows error in case create/update/delete failed.
- fqdn string
- Fully qualified domain name (FQDN) of the record set.
- name string
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - project
Id string - STACKIT project ID to which the dns record set is associated.
- record
Set stringId - The rr set id.
- records string[]
- Records.
- state string
- Record set state.
- ttl number
- Time to live. E.g. 3600
- type string
- The record set type. E.g.
AorCNAME - zone
Id string - The zone ID to which is dns record set is associated.
- active bool
- Specifies if the record set is active or not. Defaults to
true - comment str
- Comment.
- error str
- Error shows error in case create/update/delete failed.
- fqdn str
- Fully qualified domain name (FQDN) of the record set.
- name str
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - project_
id str - STACKIT project ID to which the dns record set is associated.
- record_
set_ strid - The rr set id.
- records Sequence[str]
- Records.
- state str
- Record set state.
- ttl int
- Time to live. E.g. 3600
- type str
- The record set type. E.g.
AorCNAME - zone_
id str - The zone ID to which is dns record set is associated.
- active Boolean
- Specifies if the record set is active or not. Defaults to
true - comment String
- Comment.
- error String
- Error shows error in case create/update/delete failed.
- fqdn String
- Fully qualified domain name (FQDN) of the record set.
- name String
- Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g.
example.com - project
Id String - STACKIT project ID to which the dns record set is associated.
- record
Set StringId - The rr set id.
- records List<String>
- Records.
- state String
- Record set state.
- ttl Number
- Time to live. E.g. 3600
- type String
- The record set type. E.g.
AorCNAME - zone
Id String - The zone ID to which is dns record set is associated.
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
