dnsimple.ZoneRecord
Explore with Pulumi AI
Provides a DNSimple zone record resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";
// Add a record to the root domain
const foobar = new dnsimple.ZoneRecord("foobar", {
zoneName: dnsimpleDomain,
name: "",
value: "192.168.0.11",
type: "A",
ttl: 3600,
});
import pulumi
import pulumi_dnsimple as dnsimple
# Add a record to the root domain
foobar = dnsimple.ZoneRecord("foobar",
zone_name=dnsimple_domain,
name="",
value="192.168.0.11",
type="A",
ttl=3600)
package main
import (
"github.com/pulumi/pulumi-dnsimple/sdk/v4/go/dnsimple"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Add a record to the root domain
_, err := dnsimple.NewZoneRecord(ctx, "foobar", &dnsimple.ZoneRecordArgs{
ZoneName: pulumi.Any(dnsimpleDomain),
Name: pulumi.String(""),
Value: pulumi.String("192.168.0.11"),
Type: pulumi.String("A"),
Ttl: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DNSimple = Pulumi.DNSimple;
return await Deployment.RunAsync(() =>
{
// Add a record to the root domain
var foobar = new DNSimple.ZoneRecord("foobar", new()
{
ZoneName = dnsimpleDomain,
Name = "",
Value = "192.168.0.11",
Type = "A",
Ttl = 3600,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dnsimple.ZoneRecord;
import com.pulumi.dnsimple.ZoneRecordArgs;
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) {
// Add a record to the root domain
var foobar = new ZoneRecord("foobar", ZoneRecordArgs.builder()
.zoneName(dnsimpleDomain)
.name("")
.value("192.168.0.11")
.type("A")
.ttl(3600)
.build());
}
}
resources:
# Add a record to the root domain
foobar:
type: dnsimple:ZoneRecord
properties:
zoneName: ${dnsimpleDomain}
name:
value: 192.168.0.11
type: A
ttl: 3600
import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";
// Add a record to a sub-domain
const foobar = new dnsimple.ZoneRecord("foobar", {
zoneName: dnsimpleDomain,
name: "terraform",
value: "192.168.0.11",
type: "A",
ttl: 3600,
});
import pulumi
import pulumi_dnsimple as dnsimple
# Add a record to a sub-domain
foobar = dnsimple.ZoneRecord("foobar",
zone_name=dnsimple_domain,
name="terraform",
value="192.168.0.11",
type="A",
ttl=3600)
package main
import (
"github.com/pulumi/pulumi-dnsimple/sdk/v4/go/dnsimple"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Add a record to a sub-domain
_, err := dnsimple.NewZoneRecord(ctx, "foobar", &dnsimple.ZoneRecordArgs{
ZoneName: pulumi.Any(dnsimpleDomain),
Name: pulumi.String("terraform"),
Value: pulumi.String("192.168.0.11"),
Type: pulumi.String("A"),
Ttl: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DNSimple = Pulumi.DNSimple;
return await Deployment.RunAsync(() =>
{
// Add a record to a sub-domain
var foobar = new DNSimple.ZoneRecord("foobar", new()
{
ZoneName = dnsimpleDomain,
Name = "terraform",
Value = "192.168.0.11",
Type = "A",
Ttl = 3600,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dnsimple.ZoneRecord;
import com.pulumi.dnsimple.ZoneRecordArgs;
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) {
// Add a record to a sub-domain
var foobar = new ZoneRecord("foobar", ZoneRecordArgs.builder()
.zoneName(dnsimpleDomain)
.name("terraform")
.value("192.168.0.11")
.type("A")
.ttl(3600)
.build());
}
}
resources:
# Add a record to a sub-domain
foobar:
type: dnsimple:ZoneRecord
properties:
zoneName: ${dnsimpleDomain}
name: terraform
value: 192.168.0.11
type: A
ttl: 3600
Create ZoneRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZoneRecord(name: string, args: ZoneRecordArgs, opts?: CustomResourceOptions);
@overload
def ZoneRecord(resource_name: str,
args: ZoneRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZoneRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
type: Optional[str] = None,
value: Optional[str] = None,
zone_name: Optional[str] = None,
priority: Optional[int] = None,
regions: Optional[Sequence[str]] = None,
ttl: Optional[int] = None)
func NewZoneRecord(ctx *Context, name string, args ZoneRecordArgs, opts ...ResourceOption) (*ZoneRecord, error)
public ZoneRecord(string name, ZoneRecordArgs args, CustomResourceOptions? opts = null)
public ZoneRecord(String name, ZoneRecordArgs args)
public ZoneRecord(String name, ZoneRecordArgs args, CustomResourceOptions options)
type: dnsimple:ZoneRecord
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 ZoneRecordArgs
- 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 ZoneRecordArgs
- 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 ZoneRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneRecordArgs
- 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 zoneRecordResource = new DNSimple.ZoneRecord("zoneRecordResource", new()
{
Name = "string",
Type = "string",
Value = "string",
ZoneName = "string",
Priority = 0,
Regions = new[]
{
"string",
},
Ttl = 0,
});
example, err := dnsimple.NewZoneRecord(ctx, "zoneRecordResource", &dnsimple.ZoneRecordArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
ZoneName: pulumi.String("string"),
Priority: pulumi.Int(0),
Regions: pulumi.StringArray{
pulumi.String("string"),
},
Ttl: pulumi.Int(0),
})
var zoneRecordResource = new ZoneRecord("zoneRecordResource", ZoneRecordArgs.builder()
.name("string")
.type("string")
.value("string")
.zoneName("string")
.priority(0)
.regions("string")
.ttl(0)
.build());
zone_record_resource = dnsimple.ZoneRecord("zoneRecordResource",
name="string",
type="string",
value="string",
zone_name="string",
priority=0,
regions=["string"],
ttl=0)
const zoneRecordResource = new dnsimple.ZoneRecord("zoneRecordResource", {
name: "string",
type: "string",
value: "string",
zoneName: "string",
priority: 0,
regions: ["string"],
ttl: 0,
});
type: dnsimple:ZoneRecord
properties:
name: string
priority: 0
regions:
- string
ttl: 0
type: string
value: string
zoneName: string
ZoneRecord Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ZoneRecord resource accepts the following input properties:
- Name string
- The name of the record
- Type string
- The type of the record
- Value string
- The value of the record
- Zone
Name string - The zone name to add the record to
- Priority int
- The priority of the record - only useful for some record types
- Regions List<string>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- Ttl int
- The TTL of the record - defaults to 3600
- Name string
- The name of the record
- Type string
- The type of the record
- Value string
- The value of the record
- Zone
Name string - The zone name to add the record to
- Priority int
- The priority of the record - only useful for some record types
- Regions []string
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- Ttl int
- The TTL of the record - defaults to 3600
- name String
- The name of the record
- type String
- The type of the record
- value String
- The value of the record
- zone
Name String - The zone name to add the record to
- priority Integer
- The priority of the record - only useful for some record types
- regions List<String>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl Integer
- The TTL of the record - defaults to 3600
- name string
- The name of the record
- type string
- The type of the record
- value string
- The value of the record
- zone
Name string - The zone name to add the record to
- priority number
- The priority of the record - only useful for some record types
- regions string[]
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl number
- The TTL of the record - defaults to 3600
- name str
- The name of the record
- type str
- The type of the record
- value str
- The value of the record
- zone_
name str - The zone name to add the record to
- priority int
- The priority of the record - only useful for some record types
- regions Sequence[str]
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl int
- The TTL of the record - defaults to 3600
- name String
- The name of the record
- type String
- The type of the record
- value String
- The value of the record
- zone
Name String - The zone name to add the record to
- priority Number
- The priority of the record - only useful for some record types
- regions List<String>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl Number
- The TTL of the record - defaults to 3600
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneRecord resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name
Normalized string - Qualified
Name string - The FQDN of the record
- Value
Normalized string - The normalized value of the record
- Zone
Id string - The zone ID of the record
- Id string
- The provider-assigned unique ID for this managed resource.
- Name
Normalized string - Qualified
Name string - The FQDN of the record
- Value
Normalized string - The normalized value of the record
- Zone
Id string - The zone ID of the record
- id String
- The provider-assigned unique ID for this managed resource.
- name
Normalized String - qualified
Name String - The FQDN of the record
- value
Normalized String - The normalized value of the record
- zone
Id String - The zone ID of the record
- id string
- The provider-assigned unique ID for this managed resource.
- name
Normalized string - qualified
Name string - The FQDN of the record
- value
Normalized string - The normalized value of the record
- zone
Id string - The zone ID of the record
- id str
- The provider-assigned unique ID for this managed resource.
- name_
normalized str - qualified_
name str - The FQDN of the record
- value_
normalized str - The normalized value of the record
- zone_
id str - The zone ID of the record
- id String
- The provider-assigned unique ID for this managed resource.
- name
Normalized String - qualified
Name String - The FQDN of the record
- value
Normalized String - The normalized value of the record
- zone
Id String - The zone ID of the record
Look up Existing ZoneRecord Resource
Get an existing ZoneRecord 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?: ZoneRecordState, opts?: CustomResourceOptions): ZoneRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
name_normalized: Optional[str] = None,
priority: Optional[int] = None,
qualified_name: Optional[str] = None,
regions: Optional[Sequence[str]] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
value: Optional[str] = None,
value_normalized: Optional[str] = None,
zone_id: Optional[str] = None,
zone_name: Optional[str] = None) -> ZoneRecord
func GetZoneRecord(ctx *Context, name string, id IDInput, state *ZoneRecordState, opts ...ResourceOption) (*ZoneRecord, error)
public static ZoneRecord Get(string name, Input<string> id, ZoneRecordState? state, CustomResourceOptions? opts = null)
public static ZoneRecord get(String name, Output<String> id, ZoneRecordState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Name string
- The name of the record
- Name
Normalized string - Priority int
- The priority of the record - only useful for some record types
- Qualified
Name string - The FQDN of the record
- Regions List<string>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- Ttl int
- The TTL of the record - defaults to 3600
- Type string
- The type of the record
- Value string
- The value of the record
- Value
Normalized string - The normalized value of the record
- Zone
Id string - The zone ID of the record
- Zone
Name string - The zone name to add the record to
- Name string
- The name of the record
- Name
Normalized string - Priority int
- The priority of the record - only useful for some record types
- Qualified
Name string - The FQDN of the record
- Regions []string
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- Ttl int
- The TTL of the record - defaults to 3600
- Type string
- The type of the record
- Value string
- The value of the record
- Value
Normalized string - The normalized value of the record
- Zone
Id string - The zone ID of the record
- Zone
Name string - The zone name to add the record to
- name String
- The name of the record
- name
Normalized String - priority Integer
- The priority of the record - only useful for some record types
- qualified
Name String - The FQDN of the record
- regions List<String>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl Integer
- The TTL of the record - defaults to 3600
- type String
- The type of the record
- value String
- The value of the record
- value
Normalized String - The normalized value of the record
- zone
Id String - The zone ID of the record
- zone
Name String - The zone name to add the record to
- name string
- The name of the record
- name
Normalized string - priority number
- The priority of the record - only useful for some record types
- qualified
Name string - The FQDN of the record
- regions string[]
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl number
- The TTL of the record - defaults to 3600
- type string
- The type of the record
- value string
- The value of the record
- value
Normalized string - The normalized value of the record
- zone
Id string - The zone ID of the record
- zone
Name string - The zone name to add the record to
- name str
- The name of the record
- name_
normalized str - priority int
- The priority of the record - only useful for some record types
- qualified_
name str - The FQDN of the record
- regions Sequence[str]
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl int
- The TTL of the record - defaults to 3600
- type str
- The type of the record
- value str
- The value of the record
- value_
normalized str - The normalized value of the record
- zone_
id str - The zone ID of the record
- zone_
name str - The zone name to add the record to
- name String
- The name of the record
- name
Normalized String - priority Number
- The priority of the record - only useful for some record types
- qualified
Name String - The FQDN of the record
- regions List<String>
- A list of regions to serve the record from. You can find a list of supported values in our developer documentation.
- ttl Number
- The TTL of the record - defaults to 3600
- type String
- The type of the record
- value String
- The value of the record
- value
Normalized String - The normalized value of the record
- zone
Id String - The zone ID of the record
- zone
Name String - The zone name to add the record to
Import
DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID.
Importing record example.com with record ID 1234
bash
$ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234
Importing record www.example.com with record ID 1234
bash
$ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234
The record ID can be found in the URL when editing a record on the DNSimple web dashboard.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- DNSimple pulumi/pulumi-dnsimple
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dnsimple
Terraform Provider.