Record
Provides a DNS Record resource.
DEPRECATED: This resource has been deprecated from version
1.85.0
. Please use new resource alicloud_alidns_record. NOTE: When the site is an international site, thetype
neither supportsREDIRECT_URL
norREDIRECT_URL
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Create a new Domain record
const record = new alicloud.dns.Record("record", {
name: "domainname",
hostRecord: "@",
type: "A",
value: "192.168.99.99",
});
import pulumi
import pulumi_alicloud as alicloud
# Create a new Domain record
record = alicloud.dns.Record("record",
name="domainname",
host_record="@",
type="A",
value="192.168.99.99")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Create a new Domain record
var record = new AliCloud.Dns.Record("record", new()
{
Name = "domainname",
HostRecord = "@",
Type = "A",
Value = "192.168.99.99",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new Domain record
_, err := dns.NewRecord(ctx, "record", &dns.RecordArgs{
Name: pulumi.String("domainname"),
HostRecord: pulumi.String("@"),
Type: pulumi.String("A"),
Value: pulumi.String("192.168.99.99"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.Record;
import com.pulumi.alicloud.dns.RecordArgs;
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) {
// Create a new Domain record
var record = new Record("record", RecordArgs.builder()
.name("domainname")
.hostRecord("@")
.type("A")
.value("192.168.99.99")
.build());
}
}
resources:
# Create a new Domain record
record:
type: alicloud:dns:Record
properties:
name: domainname
hostRecord: '@'
type: A
value: 192.168.99.99
Import
RDS record can be imported using the id, e.g.
$ pulumi import alicloud:dns/record:Record example <id>
Properties
Host record for the domain record. This host_record can have at most 253 characters, and each part split with "." can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as "-",".","*","@", and must not begin or end with "-".
Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh
and .tel
are not supported.
The resolution line of domain record. Valid values are default
, telecom
, unicom
, mobile
, oversea
, edu
, drpeng
, btvn
, .etc. When the type
is FORWORD_URL
, this parameter must be default
. Default value is default
. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc or using alicloud.dns.getResolutionLines in data source to get the value.