Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi
yandex.DnsZone
Explore with Pulumi AI
Manages a DNS Zone.
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",
},
});
}
}
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
}
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"])
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"],
});
Coming soon!
Create DnsZone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsZone(name: string, args: DnsZoneArgs, opts?: CustomResourceOptions);
@overload
def DnsZone(resource_name: str,
args: DnsZoneArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnsZone(resource_name: str,
opts: Optional[ResourceOptions] = None,
zone: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
private_networks: Optional[Sequence[str]] = None,
public: Optional[bool] = None)
func NewDnsZone(ctx *Context, name string, args DnsZoneArgs, opts ...ResourceOption) (*DnsZone, error)
public DnsZone(string name, DnsZoneArgs args, CustomResourceOptions? opts = null)
public DnsZone(String name, DnsZoneArgs args)
public DnsZone(String name, DnsZoneArgs args, CustomResourceOptions options)
type: yandex:DnsZone
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 DnsZoneArgs
- 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 DnsZoneArgs
- 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 DnsZoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsZoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsZoneArgs
- 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 dnsZoneResource = new Yandex.DnsZone("dnsZoneResource", new()
{
Zone = "string",
Description = "string",
FolderId = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
PrivateNetworks = new[]
{
"string",
},
Public = false,
});
example, err := yandex.NewDnsZone(ctx, "dnsZoneResource", &yandex.DnsZoneArgs{
Zone: pulumi.String("string"),
Description: pulumi.String("string"),
FolderId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
PrivateNetworks: pulumi.StringArray{
pulumi.String("string"),
},
Public: pulumi.Bool(false),
})
var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
.zone("string")
.description("string")
.folderId("string")
.labels(Map.of("string", "string"))
.name("string")
.privateNetworks("string")
.public_(false)
.build());
dns_zone_resource = yandex.DnsZone("dnsZoneResource",
zone="string",
description="string",
folder_id="string",
labels={
"string": "string",
},
name="string",
private_networks=["string"],
public=False)
const dnsZoneResource = new yandex.DnsZone("dnsZoneResource", {
zone: "string",
description: "string",
folderId: "string",
labels: {
string: "string",
},
name: "string",
privateNetworks: ["string"],
"public": false,
});
type: yandex:DnsZone
properties:
description: string
folderId: string
labels:
string: string
name: string
privateNetworks:
- string
public: false
zone: string
DnsZone 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 DnsZone resource accepts the following input properties:
- Zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- Description string
- Description of the DNS zone.
- Folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the DNS zone.
- Name string
- User assigned name of a specific resource. Must be unique within the folder.
- Private
Networks List<string> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- Public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- Zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- Description string
- Description of the DNS zone.
- Folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- Labels map[string]string
- A set of key/value label pairs to assign to the DNS zone.
- Name string
- User assigned name of a specific resource. Must be unique within the folder.
- Private
Networks []string - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- Public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone String
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- description String
- Description of the DNS zone.
- folder
Id String - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- A set of key/value label pairs to assign to the DNS zone.
- name String
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks List<String> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public_ Boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- description string
- Description of the DNS zone.
- folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- A set of key/value label pairs to assign to the DNS zone.
- name string
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks string[] - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone str
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- description str
- Description of the DNS zone.
- folder_
id str - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- A set of key/value label pairs to assign to the DNS zone.
- name str
- User assigned name of a specific resource. Must be unique within the folder.
- private_
networks Sequence[str] - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone String
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- description String
- Description of the DNS zone.
- folder
Id String - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Map<String>
- A set of key/value label pairs to assign to the DNS zone.
- name String
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks List<String> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public Boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsZone resource produces the following output properties:
- created_
at str - (Computed) The DNS zone creation timestamp.
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing DnsZone Resource
Get an existing DnsZone 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?: DnsZoneState, opts?: CustomResourceOptions): DnsZone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
private_networks: Optional[Sequence[str]] = None,
public: Optional[bool] = None,
zone: Optional[str] = None) -> DnsZone
func GetDnsZone(ctx *Context, name string, id IDInput, state *DnsZoneState, opts ...ResourceOption) (*DnsZone, error)
public static DnsZone Get(string name, Input<string> id, DnsZoneState? state, CustomResourceOptions? opts = null)
public static DnsZone get(String name, Output<String> id, DnsZoneState 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.
- Created
At string - (Computed) The DNS zone creation timestamp.
- Description string
- Description of the DNS zone.
- Folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the DNS zone.
- Name string
- User assigned name of a specific resource. Must be unique within the folder.
- Private
Networks List<string> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- Public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- Zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- Created
At string - (Computed) The DNS zone creation timestamp.
- Description string
- Description of the DNS zone.
- Folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- Labels map[string]string
- A set of key/value label pairs to assign to the DNS zone.
- Name string
- User assigned name of a specific resource. Must be unique within the folder.
- Private
Networks []string - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- Public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- Zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- created
At String - (Computed) The DNS zone creation timestamp.
- description String
- Description of the DNS zone.
- folder
Id String - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- A set of key/value label pairs to assign to the DNS zone.
- name String
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks List<String> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public_ Boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone String
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- created
At string - (Computed) The DNS zone creation timestamp.
- description string
- Description of the DNS zone.
- folder
Id string - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- A set of key/value label pairs to assign to the DNS zone.
- name string
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks string[] - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone string
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- created_
at str - (Computed) The DNS zone creation timestamp.
- description str
- Description of the DNS zone.
- folder_
id str - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- A set of key/value label pairs to assign to the DNS zone.
- name str
- User assigned name of a specific resource. Must be unique within the folder.
- private_
networks Sequence[str] - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public bool
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone str
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
- created
At String - (Computed) The DNS zone creation timestamp.
- description String
- Description of the DNS zone.
- folder
Id String - ID of the folder to create a zone in. If it is not provided, the default provider folder is used.
- labels Map<String>
- A set of key/value label pairs to assign to the DNS zone.
- name String
- User assigned name of a specific resource. Must be unique within the folder.
- private
Networks List<String> - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
- public Boolean
- The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
- zone String
- The DNS name of this zone, e.g. "example.com.". Must ends with dot.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.