1. Packages
  2. Vkcs Provider
  3. API Docs
  4. PublicdnsZone
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.PublicdnsZone

Explore with Pulumi AI

Manages a public DNS record resource within VKCS.

New since v0.2.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";

const zone = new vkcs.PublicdnsZone("zone", {
    zone: local.zone_name,
    primaryDns: "ns1.mcs.mail.ru",
    adminEmail: "admin@example.com",
    expire: 3600000,
});
Copy
import pulumi
import pulumi_vkcs as vkcs

zone = vkcs.PublicdnsZone("zone",
    zone=local["zone_name"],
    primary_dns="ns1.mcs.mail.ru",
    admin_email="admin@example.com",
    expire=3600000)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vkcs.NewPublicdnsZone(ctx, "zone", &vkcs.PublicdnsZoneArgs{
			Zone:       pulumi.Any(local.Zone_name),
			PrimaryDns: pulumi.String("ns1.mcs.mail.ru"),
			AdminEmail: pulumi.String("admin@example.com"),
			Expire:     pulumi.Float64(3600000),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var zone = new Vkcs.PublicdnsZone("zone", new()
    {
        Zone = local.Zone_name,
        PrimaryDns = "ns1.mcs.mail.ru",
        AdminEmail = "admin@example.com",
        Expire = 3600000,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.PublicdnsZone;
import com.pulumi.vkcs.PublicdnsZoneArgs;
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) {
        var zone = new PublicdnsZone("zone", PublicdnsZoneArgs.builder()
            .zone(local.zone_name())
            .primaryDns("ns1.mcs.mail.ru")
            .adminEmail("admin@example.com")
            .expire(3600000)
            .build());

    }
}
Copy
resources:
  zone:
    type: vkcs:PublicdnsZone
    properties:
      zone: ${local.zone_name}
      primaryDns: ns1.mcs.mail.ru
      adminEmail: admin@example.com
      expire: 3.6e+06
Copy

Create PublicdnsZone Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PublicdnsZone(name: string, args: PublicdnsZoneArgs, opts?: CustomResourceOptions);
@overload
def PublicdnsZone(resource_name: str,
                  args: PublicdnsZoneArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def PublicdnsZone(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  zone: Optional[str] = None,
                  admin_email: Optional[str] = None,
                  expire: Optional[float] = None,
                  primary_dns: Optional[str] = None,
                  publicdns_zone_id: Optional[str] = None,
                  refresh: Optional[float] = None,
                  region: Optional[str] = None,
                  retry: Optional[float] = None,
                  timeouts: Optional[PublicdnsZoneTimeoutsArgs] = None,
                  ttl: Optional[float] = None)
func NewPublicdnsZone(ctx *Context, name string, args PublicdnsZoneArgs, opts ...ResourceOption) (*PublicdnsZone, error)
public PublicdnsZone(string name, PublicdnsZoneArgs args, CustomResourceOptions? opts = null)
public PublicdnsZone(String name, PublicdnsZoneArgs args)
public PublicdnsZone(String name, PublicdnsZoneArgs args, CustomResourceOptions options)
type: vkcs:PublicdnsZone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PublicdnsZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PublicdnsZoneArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PublicdnsZoneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PublicdnsZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PublicdnsZoneArgs
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 publicdnsZoneResource = new Vkcs.PublicdnsZone("publicdnsZoneResource", new()
{
    Zone = "string",
    AdminEmail = "string",
    Expire = 0,
    PrimaryDns = "string",
    PublicdnsZoneId = "string",
    Refresh = 0,
    Region = "string",
    Retry = 0,
    Timeouts = new Vkcs.Inputs.PublicdnsZoneTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    Ttl = 0,
});
Copy
example, err := vkcs.NewPublicdnsZone(ctx, "publicdnsZoneResource", &vkcs.PublicdnsZoneArgs{
Zone: pulumi.String("string"),
AdminEmail: pulumi.String("string"),
Expire: pulumi.Float64(0),
PrimaryDns: pulumi.String("string"),
PublicdnsZoneId: pulumi.String("string"),
Refresh: pulumi.Float64(0),
Region: pulumi.String("string"),
Retry: pulumi.Float64(0),
Timeouts: &.PublicdnsZoneTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
Ttl: pulumi.Float64(0),
})
Copy
var publicdnsZoneResource = new PublicdnsZone("publicdnsZoneResource", PublicdnsZoneArgs.builder()
    .zone("string")
    .adminEmail("string")
    .expire(0)
    .primaryDns("string")
    .publicdnsZoneId("string")
    .refresh(0)
    .region("string")
    .retry(0)
    .timeouts(PublicdnsZoneTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .ttl(0)
    .build());
Copy
publicdns_zone_resource = vkcs.PublicdnsZone("publicdnsZoneResource",
    zone="string",
    admin_email="string",
    expire=0,
    primary_dns="string",
    publicdns_zone_id="string",
    refresh=0,
    region="string",
    retry=0,
    timeouts={
        "create": "string",
        "delete": "string",
    },
    ttl=0)
Copy
const publicdnsZoneResource = new vkcs.PublicdnsZone("publicdnsZoneResource", {
    zone: "string",
    adminEmail: "string",
    expire: 0,
    primaryDns: "string",
    publicdnsZoneId: "string",
    refresh: 0,
    region: "string",
    retry: 0,
    timeouts: {
        create: "string",
        "delete": "string",
    },
    ttl: 0,
});
Copy
type: vkcs:PublicdnsZone
properties:
    adminEmail: string
    expire: 0
    primaryDns: string
    publicdnsZoneId: string
    refresh: 0
    region: string
    retry: 0
    timeouts:
        create: string
        delete: string
    ttl: 0
    zone: string
Copy

PublicdnsZone Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PublicdnsZone resource accepts the following input properties:

Zone This property is required. string
required string → The name of the zone. Changes this creates a new zone.
AdminEmail string
optional string → The admin email of the zone SOA.
Expire double
optional number → The expire time of the zone SOA.
PrimaryDns string
optional string → The primary DNS of the zone SOA.
PublicdnsZoneId string
string → ID of the resource.
Refresh double
optional number → The refresh time of the zone SOA.
Region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
Retry double
optional number → The retry time of the zone SOA.
Timeouts PublicdnsZoneTimeouts
Ttl double
optional number → The TTL (time to live) of the zone SOA.
Zone This property is required. string
required string → The name of the zone. Changes this creates a new zone.
AdminEmail string
optional string → The admin email of the zone SOA.
Expire float64
optional number → The expire time of the zone SOA.
PrimaryDns string
optional string → The primary DNS of the zone SOA.
PublicdnsZoneId string
string → ID of the resource.
Refresh float64
optional number → The refresh time of the zone SOA.
Region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
Retry float64
optional number → The retry time of the zone SOA.
Timeouts PublicdnsZoneTimeoutsArgs
Ttl float64
optional number → The TTL (time to live) of the zone SOA.
zone This property is required. String
required string → The name of the zone. Changes this creates a new zone.
adminEmail String
optional string → The admin email of the zone SOA.
expire Double
optional number → The expire time of the zone SOA.
primaryDns String
optional string → The primary DNS of the zone SOA.
publicdnsZoneId String
string → ID of the resource.
refresh Double
optional number → The refresh time of the zone SOA.
region String
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry Double
optional number → The retry time of the zone SOA.
timeouts PublicdnsZoneTimeouts
ttl Double
optional number → The TTL (time to live) of the zone SOA.
zone This property is required. string
required string → The name of the zone. Changes this creates a new zone.
adminEmail string
optional string → The admin email of the zone SOA.
expire number
optional number → The expire time of the zone SOA.
primaryDns string
optional string → The primary DNS of the zone SOA.
publicdnsZoneId string
string → ID of the resource.
refresh number
optional number → The refresh time of the zone SOA.
region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry number
optional number → The retry time of the zone SOA.
timeouts PublicdnsZoneTimeouts
ttl number
optional number → The TTL (time to live) of the zone SOA.
zone This property is required. str
required string → The name of the zone. Changes this creates a new zone.
admin_email str
optional string → The admin email of the zone SOA.
expire float
optional number → The expire time of the zone SOA.
primary_dns str
optional string → The primary DNS of the zone SOA.
publicdns_zone_id str
string → ID of the resource.
refresh float
optional number → The refresh time of the zone SOA.
region str
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry float
optional number → The retry time of the zone SOA.
timeouts PublicdnsZoneTimeoutsArgs
ttl float
optional number → The TTL (time to live) of the zone SOA.
zone This property is required. String
required string → The name of the zone. Changes this creates a new zone.
adminEmail String
optional string → The admin email of the zone SOA.
expire Number
optional number → The expire time of the zone SOA.
primaryDns String
optional string → The primary DNS of the zone SOA.
publicdnsZoneId String
string → ID of the resource.
refresh Number
optional number → The refresh time of the zone SOA.
region String
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry Number
optional number → The retry time of the zone SOA.
timeouts Property Map
ttl Number
optional number → The TTL (time to live) of the zone SOA.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Serial double
number → The serial number of the zone SOA.
Status string
string → The status of the zone.
Id string
The provider-assigned unique ID for this managed resource.
Serial float64
number → The serial number of the zone SOA.
Status string
string → The status of the zone.
id String
The provider-assigned unique ID for this managed resource.
serial Double
number → The serial number of the zone SOA.
status String
string → The status of the zone.
id string
The provider-assigned unique ID for this managed resource.
serial number
number → The serial number of the zone SOA.
status string
string → The status of the zone.
id str
The provider-assigned unique ID for this managed resource.
serial float
number → The serial number of the zone SOA.
status str
string → The status of the zone.
id String
The provider-assigned unique ID for this managed resource.
serial Number
number → The serial number of the zone SOA.
status String
string → The status of the zone.

Look up Existing PublicdnsZone Resource

Get an existing PublicdnsZone 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?: PublicdnsZoneState, opts?: CustomResourceOptions): PublicdnsZone
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        admin_email: Optional[str] = None,
        expire: Optional[float] = None,
        primary_dns: Optional[str] = None,
        publicdns_zone_id: Optional[str] = None,
        refresh: Optional[float] = None,
        region: Optional[str] = None,
        retry: Optional[float] = None,
        serial: Optional[float] = None,
        status: Optional[str] = None,
        timeouts: Optional[PublicdnsZoneTimeoutsArgs] = None,
        ttl: Optional[float] = None,
        zone: Optional[str] = None) -> PublicdnsZone
func GetPublicdnsZone(ctx *Context, name string, id IDInput, state *PublicdnsZoneState, opts ...ResourceOption) (*PublicdnsZone, error)
public static PublicdnsZone Get(string name, Input<string> id, PublicdnsZoneState? state, CustomResourceOptions? opts = null)
public static PublicdnsZone get(String name, Output<String> id, PublicdnsZoneState state, CustomResourceOptions options)
resources:  _:    type: vkcs:PublicdnsZone    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AdminEmail string
optional string → The admin email of the zone SOA.
Expire double
optional number → The expire time of the zone SOA.
PrimaryDns string
optional string → The primary DNS of the zone SOA.
PublicdnsZoneId string
string → ID of the resource.
Refresh double
optional number → The refresh time of the zone SOA.
Region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
Retry double
optional number → The retry time of the zone SOA.
Serial double
number → The serial number of the zone SOA.
Status string
string → The status of the zone.
Timeouts PublicdnsZoneTimeouts
Ttl double
optional number → The TTL (time to live) of the zone SOA.
Zone string
required string → The name of the zone. Changes this creates a new zone.
AdminEmail string
optional string → The admin email of the zone SOA.
Expire float64
optional number → The expire time of the zone SOA.
PrimaryDns string
optional string → The primary DNS of the zone SOA.
PublicdnsZoneId string
string → ID of the resource.
Refresh float64
optional number → The refresh time of the zone SOA.
Region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
Retry float64
optional number → The retry time of the zone SOA.
Serial float64
number → The serial number of the zone SOA.
Status string
string → The status of the zone.
Timeouts PublicdnsZoneTimeoutsArgs
Ttl float64
optional number → The TTL (time to live) of the zone SOA.
Zone string
required string → The name of the zone. Changes this creates a new zone.
adminEmail String
optional string → The admin email of the zone SOA.
expire Double
optional number → The expire time of the zone SOA.
primaryDns String
optional string → The primary DNS of the zone SOA.
publicdnsZoneId String
string → ID of the resource.
refresh Double
optional number → The refresh time of the zone SOA.
region String
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry Double
optional number → The retry time of the zone SOA.
serial Double
number → The serial number of the zone SOA.
status String
string → The status of the zone.
timeouts PublicdnsZoneTimeouts
ttl Double
optional number → The TTL (time to live) of the zone SOA.
zone String
required string → The name of the zone. Changes this creates a new zone.
adminEmail string
optional string → The admin email of the zone SOA.
expire number
optional number → The expire time of the zone SOA.
primaryDns string
optional string → The primary DNS of the zone SOA.
publicdnsZoneId string
string → ID of the resource.
refresh number
optional number → The refresh time of the zone SOA.
region string
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry number
optional number → The retry time of the zone SOA.
serial number
number → The serial number of the zone SOA.
status string
string → The status of the zone.
timeouts PublicdnsZoneTimeouts
ttl number
optional number → The TTL (time to live) of the zone SOA.
zone string
required string → The name of the zone. Changes this creates a new zone.
admin_email str
optional string → The admin email of the zone SOA.
expire float
optional number → The expire time of the zone SOA.
primary_dns str
optional string → The primary DNS of the zone SOA.
publicdns_zone_id str
string → ID of the resource.
refresh float
optional number → The refresh time of the zone SOA.
region str
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry float
optional number → The retry time of the zone SOA.
serial float
number → The serial number of the zone SOA.
status str
string → The status of the zone.
timeouts PublicdnsZoneTimeoutsArgs
ttl float
optional number → The TTL (time to live) of the zone SOA.
zone str
required string → The name of the zone. Changes this creates a new zone.
adminEmail String
optional string → The admin email of the zone SOA.
expire Number
optional number → The expire time of the zone SOA.
primaryDns String
optional string → The primary DNS of the zone SOA.
publicdnsZoneId String
string → ID of the resource.
refresh Number
optional number → The refresh time of the zone SOA.
region String
optional string → The region in which to obtain the V2 Public DNS client. If omitted, the region argument of the provider is used. Changing this creates a new zone.
retry Number
optional number → The retry time of the zone SOA.
serial Number
number → The serial number of the zone SOA.
status String
string → The status of the zone.
timeouts Property Map
ttl Number
optional number → The TTL (time to live) of the zone SOA.
zone String
required string → The name of the zone. Changes this creates a new zone.

Supporting Types

PublicdnsZoneTimeouts
, PublicdnsZoneTimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

Public DNS zones can be imported using the id, e.g.

$ pulumi import vkcs:index/publicdnsZone:PublicdnsZone zone b758c4e5-ec13-4dfa-8458-b8502625499c
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vkcs vk-cs/terraform-provider-vkcs
License
Notes
This Pulumi package is based on the vkcs Terraform Provider.