Yandex v0.13.0, Feb 22 22
Yandex v0.13.0, Feb 22 22
yandex.DnsRecordSet
Explore with Pulumi AI
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:
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.
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.