1. Packages
  2. Yandex
  3. API Docs
  4. DnsRecordSet
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.DnsRecordSet

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    Manages a DNS Recordset.

    Example Usage

    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var foo = new Yandex.VpcNetwork("foo", new Yandex.VpcNetworkArgs
            {
            });
            var zone1 = new Yandex.DnsZone("zone1", new Yandex.DnsZoneArgs
            {
                Description = "desc",
                Labels = 
                {
                    { "label1", "label-1-value" },
                },
                Zone = "example.com.",
                Public = false,
                PrivateNetworks = 
                {
                    foo.Id,
                },
            });
            var rs1 = new Yandex.DnsRecordSet("rs1", new Yandex.DnsRecordSetArgs
            {
                ZoneId = zone1.Id,
                Type = "A",
                Ttl = 200,
                Datas = 
                {
                    "10.1.0.1",
                },
            });
            var rs2 = new Yandex.DnsRecordSet("rs2", new Yandex.DnsRecordSetArgs
            {
                ZoneId = zone1.Id,
                Type = "A",
                Ttl = 200,
                Datas = 
                {
                    "10.1.0.2",
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foo, err := yandex.NewVpcNetwork(ctx, "foo", nil)
    		if err != nil {
    			return err
    		}
    		zone1, err := yandex.NewDnsZone(ctx, "zone1", &yandex.DnsZoneArgs{
    			Description: pulumi.String("desc"),
    			Labels: pulumi.StringMap{
    				"label1": pulumi.String("label-1-value"),
    			},
    			Zone:   pulumi.String("example.com."),
    			Public: pulumi.Bool(false),
    			PrivateNetworks: pulumi.StringArray{
    				foo.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = yandex.NewDnsRecordSet(ctx, "rs1", &yandex.DnsRecordSetArgs{
    			ZoneId: zone1.ID(),
    			Type:   pulumi.String("A"),
    			Ttl:    pulumi.Int(200),
    			Datas: pulumi.StringArray{
    				pulumi.String("10.1.0.1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = yandex.NewDnsRecordSet(ctx, "rs2", &yandex.DnsRecordSetArgs{
    			ZoneId: zone1.ID(),
    			Type:   pulumi.String("A"),
    			Ttl:    pulumi.Int(200),
    			Datas: pulumi.StringArray{
    				pulumi.String("10.1.0.2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_yandex as yandex
    
    foo = yandex.VpcNetwork("foo")
    zone1 = yandex.DnsZone("zone1",
        description="desc",
        labels={
            "label1": "label-1-value",
        },
        zone="example.com.",
        public=False,
        private_networks=[foo.id])
    rs1 = yandex.DnsRecordSet("rs1",
        zone_id=zone1.id,
        type="A",
        ttl=200,
        datas=["10.1.0.1"])
    rs2 = yandex.DnsRecordSet("rs2",
        zone_id=zone1.id,
        type="A",
        ttl=200,
        datas=["10.1.0.2"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as yandex from "@pulumi/yandex";
    
    const foo = new yandex.VpcNetwork("foo", {});
    const zone1 = new yandex.DnsZone("zone1", {
        description: "desc",
        labels: {
            label1: "label-1-value",
        },
        zone: "example.com.",
        "public": false,
        privateNetworks: [foo.id],
    });
    const rs1 = new yandex.DnsRecordSet("rs1", {
        zoneId: zone1.id,
        type: "A",
        ttl: 200,
        datas: ["10.1.0.1"],
    });
    const rs2 = new yandex.DnsRecordSet("rs2", {
        zoneId: zone1.id,
        type: "A",
        ttl: 200,
        datas: ["10.1.0.2"],
    });
    

    Coming soon!

    Create DnsRecordSet Resource

    new DnsRecordSet(name: string, args: DnsRecordSetArgs, opts?: CustomResourceOptions);
    @overload
    def DnsRecordSet(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     datas: Optional[Sequence[str]] = None,
                     name: Optional[str] = None,
                     ttl: Optional[int] = None,
                     type: Optional[str] = None,
                     zone_id: Optional[str] = None)
    @overload
    def DnsRecordSet(resource_name: str,
                     args: DnsRecordSetArgs,
                     opts: Optional[ResourceOptions] = 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: yandex:DnsRecordSet
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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

    The DnsRecordSet resource accepts the following input properties:

    Datas List<string>

    The string data for the records in this record set.

    Ttl int

    The time-to-live of this record set (seconds).

    Type string

    The DNS record set type.

    ZoneId string

    The id of the zone in which this record set will reside.

    Name string

    The DNS name this record set will apply to.

    Datas []string

    The string data for the records in this record set.

    Ttl int

    The time-to-live of this record set (seconds).

    Type string

    The DNS record set type.

    ZoneId string

    The id of the zone in which this record set will reside.

    Name string

    The DNS name this record set will apply to.

    datas List<String>

    The string data for the records in this record set.

    ttl Integer

    The time-to-live of this record set (seconds).

    type String

    The DNS record set type.

    zoneId String

    The id of the zone in which this record set will reside.

    name String

    The DNS name this record set will apply to.

    datas string[]

    The string data for the records in this record set.

    ttl number

    The time-to-live of this record set (seconds).

    type string

    The DNS record set type.

    zoneId string

    The id of the zone in which this record set will reside.

    name string

    The DNS name this record set will apply to.

    datas Sequence[str]

    The string data for the records in this record set.

    ttl int

    The time-to-live of this record set (seconds).

    type str

    The DNS record set type.

    zone_id str

    The id of the zone in which this record set will reside.

    name str

    The DNS name this record set will apply to.

    datas List<String>

    The string data for the records in this record set.

    ttl Number

    The time-to-live of this record set (seconds).

    type String

    The DNS record set type.

    zoneId String

    The id of the zone in which this record set will reside.

    name String

    The DNS name this record set will apply to.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DnsRecordSet resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    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,
            datas: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            ttl: Optional[int] = None,
            type: Optional[str] = None,
            zone_id: Optional[str] = None) -> DnsRecordSet
    func 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)
    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.
    The following state arguments are supported:
    Datas List<string>

    The string data for the records in this record set.

    Name string

    The DNS name this record set will apply to.

    Ttl int

    The time-to-live of this record set (seconds).

    Type string

    The DNS record set type.

    ZoneId string

    The id of the zone in which this record set will reside.

    Datas []string

    The string data for the records in this record set.

    Name string

    The DNS name this record set will apply to.

    Ttl int

    The time-to-live of this record set (seconds).

    Type string

    The DNS record set type.

    ZoneId string

    The id of the zone in which this record set will reside.

    datas List<String>

    The string data for the records in this record set.

    name String

    The DNS name this record set will apply to.

    ttl Integer

    The time-to-live of this record set (seconds).

    type String

    The DNS record set type.

    zoneId String

    The id of the zone in which this record set will reside.

    datas string[]

    The string data for the records in this record set.

    name string

    The DNS name this record set will apply to.

    ttl number

    The time-to-live of this record set (seconds).

    type string

    The DNS record set type.

    zoneId string

    The id of the zone in which this record set will reside.

    datas Sequence[str]

    The string data for the records in this record set.

    name str

    The DNS name this record set will apply to.

    ttl int

    The time-to-live of this record set (seconds).

    type str

    The DNS record set type.

    zone_id str

    The id of the zone in which this record set will reside.

    datas List<String>

    The string data for the records in this record set.

    name String

    The DNS name this record set will apply to.

    ttl Number

    The time-to-live of this record set (seconds).

    type String

    The DNS record set type.

    zoneId String

    The id of the zone in which this record set will reside.

    Import

    DNS recordset can be imported using this format

     $ pulumi import yandex:index/dnsRecordSet:DnsRecordSet rs1 {{zone_id}}/{{name}}/{{type}}
    

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the yandex Terraform Provider.

    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi