Record
Provides a DNSimple record resource.
Example Usage
using Pulumi;
using DNSimple = Pulumi.DNSimple;
class MyStack : Stack
{
public MyStack()
{
// Add a record to the root domain
var foobar = new DNSimple.Record("foobar", new DNSimple.RecordArgs
{
Domain = @var.Dnsimple_domain,
Name = "",
Ttl = 3600,
Type = "A",
Value = "192.168.0.11",
});
}
}
package main
import (
"github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dnsimple.NewRecord(ctx, "foobar", &dnsimple.RecordArgs{
Domain: pulumi.Any(_var.Dnsimple_domain),
Name: pulumi.String(""),
Ttl: pulumi.Float64(3600),
Type: pulumi.String("A"),
Value: pulumi.String("192.168.0.11"),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_dnsimple as dnsimple
# Add a record to the root domain
foobar = dnsimple.Record("foobar",
domain=var["dnsimple_domain"],
name="",
ttl=3600,
type="A",
value="192.168.0.11")
import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";
// Add a record to the root domain
const foobar = new dnsimple.Record("foobar", {
domain: var_dnsimple_domain,
name: "",
ttl: "3600",
type: "A",
value: "192.168.0.11",
});
Create a Record Resource
new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);
@overload
def Record(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[float] = None,
ttl: Optional[float] = None,
type: Optional[str] = None,
value: Optional[str] = None)
@overload
def Record(resource_name: str,
args: RecordArgs,
opts: Optional[ResourceOptions] = None)
func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)
public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args RecordArgs
- 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 RecordArgs
- 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 RecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Record Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Record resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Record resource produces the following output properties:
Look up an Existing Record Resource
Get an existing Record 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?: RecordState, opts?: CustomResourceOptions): Record
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
domain_id: Optional[str] = None,
hostname: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[float] = None,
ttl: Optional[float] = None,
type: Optional[str] = None,
value: Optional[str] = None) -> Record
func GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)
public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)
- 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.
The following state arguments are supported:
- Domain string
- The domain to add the record to
- Domain
Id string - The domain ID of the record
- Hostname string
- The FQDN of the record
- Name string
- The name of the record
- Priority double
- The priority of the record - only useful for some record types
- Ttl double
- The TTL of the record
- Type string
- The type of the record
- Value string
- The value of the record
- Domain string
- The domain to add the record to
- Domain
Id string - The domain ID of the record
- Hostname string
- The FQDN of the record
- Name string
- The name of the record
- Priority float64
- The priority of the record - only useful for some record types
- Ttl float64
- The TTL of the record
- Type string
- The type of the record
- Value string
- The value of the record
- domain string
- The domain to add the record to
- domain
Id string - The domain ID of the record
- hostname string
- The FQDN of the record
- name string
- The name of the record
- priority number
- The priority of the record - only useful for some record types
- ttl number
- The TTL of the record
- type
Record
Type - The type of the record
- value string
- The value of the record
- domain str
- The domain to add the record to
- domain_
id str - The domain ID of the record
- hostname str
- The FQDN of the record
- name str
- The name of the record
- priority float
- The priority of the record - only useful for some record types
- ttl float
- The TTL of the record
- type str
- The type of the record
- value str
- The value of the record
Import
DNSimple resources can be imported using their domain name and numeric ID, e.g.
$ pulumi import dnsimple:index/record:Record resource_name example.com_1234
The numeric ID can be found in the URL when editing a record on the dnsimple web dashboard.
Package Details
- Repository
- https://github.com/pulumi/pulumi-dnsimple
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dnsimple
Terraform Provider.