vkcs.PublicdnsRecord
Explore with Pulumi AI
Manages a public DNS zone record resource within VKCS.
Note: Although some arguments are marked as optional, it is actually required to set values for them depending on record "type". Use this map to get information about which arguments you have to set:
Record type | Required arguments |
---|---|
A | ip |
AAAA | ip |
CNAME | name, content |
MX | priority, content |
NS | content |
SRV | service, proto, priority, weight, host, port |
TXT | content |
New since v0.2.0.
Example Usage
Single record
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const srv = new vkcs.PublicdnsRecord("srv", {
zoneId: vkcs_publicdns_zone.zone.id,
type: "SRV",
service: "_sip",
proto: "_udp",
priority: 10,
weight: 5,
host: "siptarget.com",
port: 5060,
ttl: 60,
});
import pulumi
import pulumi_vkcs as vkcs
srv = vkcs.PublicdnsRecord("srv",
zone_id=vkcs_publicdns_zone["zone"]["id"],
type="SRV",
service="_sip",
proto="_udp",
priority=10,
weight=5,
host="siptarget.com",
port=5060,
ttl=60)
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.NewPublicdnsRecord(ctx, "srv", &vkcs.PublicdnsRecordArgs{
ZoneId: pulumi.Any(vkcs_publicdns_zone.Zone.Id),
Type: pulumi.String("SRV"),
Service: pulumi.String("_sip"),
Proto: pulumi.String("_udp"),
Priority: pulumi.Float64(10),
Weight: pulumi.Float64(5),
Host: pulumi.String("siptarget.com"),
Port: pulumi.Float64(5060),
Ttl: pulumi.Float64(60),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var srv = new Vkcs.PublicdnsRecord("srv", new()
{
ZoneId = vkcs_publicdns_zone.Zone.Id,
Type = "SRV",
Service = "_sip",
Proto = "_udp",
Priority = 10,
Weight = 5,
Host = "siptarget.com",
Port = 5060,
Ttl = 60,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.PublicdnsRecord;
import com.pulumi.vkcs.PublicdnsRecordArgs;
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 srv = new PublicdnsRecord("srv", PublicdnsRecordArgs.builder()
.zoneId(vkcs_publicdns_zone.zone().id())
.type("SRV")
.service("_sip")
.proto("_udp")
.priority(10)
.weight(5)
.host("siptarget.com")
.port(5060)
.ttl(60)
.build());
}
}
resources:
srv:
type: vkcs:PublicdnsRecord
properties:
zoneId: ${vkcs_publicdns_zone.zone.id}
type: SRV
service: _sip
proto: _udp
priority: 10
weight: 5
host: siptarget.com
port: 5060
ttl: 60
Create PublicdnsRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublicdnsRecord(name: string, args: PublicdnsRecordArgs, opts?: CustomResourceOptions);
@overload
def PublicdnsRecord(resource_name: str,
args: PublicdnsRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PublicdnsRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
zone_id: Optional[str] = None,
proto: Optional[str] = None,
name: Optional[str] = None,
port: Optional[float] = None,
priority: Optional[float] = None,
content: Optional[str] = None,
publicdns_record_id: Optional[str] = None,
region: Optional[str] = None,
service: Optional[str] = None,
timeouts: Optional[PublicdnsRecordTimeoutsArgs] = None,
ttl: Optional[float] = None,
ip: Optional[str] = None,
weight: Optional[float] = None,
host: Optional[str] = None)
func NewPublicdnsRecord(ctx *Context, name string, args PublicdnsRecordArgs, opts ...ResourceOption) (*PublicdnsRecord, error)
public PublicdnsRecord(string name, PublicdnsRecordArgs args, CustomResourceOptions? opts = null)
public PublicdnsRecord(String name, PublicdnsRecordArgs args)
public PublicdnsRecord(String name, PublicdnsRecordArgs args, CustomResourceOptions options)
type: vkcs:PublicdnsRecord
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 PublicdnsRecordArgs
- 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 PublicdnsRecordArgs
- 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 PublicdnsRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicdnsRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublicdnsRecordArgs
- 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 publicdnsRecordResource = new Vkcs.PublicdnsRecord("publicdnsRecordResource", new()
{
Type = "string",
ZoneId = "string",
Proto = "string",
Name = "string",
Port = 0,
Priority = 0,
Content = "string",
PublicdnsRecordId = "string",
Region = "string",
Service = "string",
Timeouts = new Vkcs.Inputs.PublicdnsRecordTimeoutsArgs
{
Create = "string",
Delete = "string",
},
Ttl = 0,
Ip = "string",
Weight = 0,
Host = "string",
});
example, err := vkcs.NewPublicdnsRecord(ctx, "publicdnsRecordResource", &vkcs.PublicdnsRecordArgs{
Type: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Proto: pulumi.String("string"),
Name: pulumi.String("string"),
Port: pulumi.Float64(0),
Priority: pulumi.Float64(0),
Content: pulumi.String("string"),
PublicdnsRecordId: pulumi.String("string"),
Region: pulumi.String("string"),
Service: pulumi.String("string"),
Timeouts: &.PublicdnsRecordTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
Ttl: pulumi.Float64(0),
Ip: pulumi.String("string"),
Weight: pulumi.Float64(0),
Host: pulumi.String("string"),
})
var publicdnsRecordResource = new PublicdnsRecord("publicdnsRecordResource", PublicdnsRecordArgs.builder()
.type("string")
.zoneId("string")
.proto("string")
.name("string")
.port(0)
.priority(0)
.content("string")
.publicdnsRecordId("string")
.region("string")
.service("string")
.timeouts(PublicdnsRecordTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.ttl(0)
.ip("string")
.weight(0)
.host("string")
.build());
publicdns_record_resource = vkcs.PublicdnsRecord("publicdnsRecordResource",
type="string",
zone_id="string",
proto="string",
name="string",
port=0,
priority=0,
content="string",
publicdns_record_id="string",
region="string",
service="string",
timeouts={
"create": "string",
"delete": "string",
},
ttl=0,
ip="string",
weight=0,
host="string")
const publicdnsRecordResource = new vkcs.PublicdnsRecord("publicdnsRecordResource", {
type: "string",
zoneId: "string",
proto: "string",
name: "string",
port: 0,
priority: 0,
content: "string",
publicdnsRecordId: "string",
region: "string",
service: "string",
timeouts: {
create: "string",
"delete": "string",
},
ttl: 0,
ip: "string",
weight: 0,
host: "string",
});
type: vkcs:PublicdnsRecord
properties:
content: string
host: string
ip: string
name: string
port: 0
priority: 0
proto: string
publicdnsRecordId: string
region: string
service: string
timeouts:
create: string
delete: string
ttl: 0
type: string
weight: 0
zoneId: string
PublicdnsRecord 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 PublicdnsRecord resource accepts the following input properties:
- Type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- Zone
Id string - required string → The ID of the zone to attach the record to.
- Content string
- optional string → The content of the record.
- Host string
- optional string → The domain name of the target host.
- Ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- Name string
- optional string → The name of the record.
- Port double
- optional number → The port on the target host of the service.
- Priority double
- optional number → The priority of the record's server.
- Proto string
- optional string → The name of the desired protocol.
- Publicdns
Record stringId - string → ID of the resource.
- 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 record. - Service string
- optional string → The name of the desired service.
- Timeouts
Publicdns
Record Timeouts - Ttl double
- optional number → The time to live of the record.
- Weight double
- optional number → The relative weight of the record's server.
- Type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- Zone
Id string - required string → The ID of the zone to attach the record to.
- Content string
- optional string → The content of the record.
- Host string
- optional string → The domain name of the target host.
- Ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- Name string
- optional string → The name of the record.
- Port float64
- optional number → The port on the target host of the service.
- Priority float64
- optional number → The priority of the record's server.
- Proto string
- optional string → The name of the desired protocol.
- Publicdns
Record stringId - string → ID of the resource.
- 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 record. - Service string
- optional string → The name of the desired service.
- Timeouts
Publicdns
Record Timeouts Args - Ttl float64
- optional number → The time to live of the record.
- Weight float64
- optional number → The relative weight of the record's server.
- type String
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- zone
Id String - required string → The ID of the zone to attach the record to.
- content String
- optional string → The content of the record.
- host String
- optional string → The domain name of the target host.
- ip String
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name String
- optional string → The name of the record.
- port Double
- optional number → The port on the target host of the service.
- priority Double
- optional number → The priority of the record's server.
- proto String
- optional string → The name of the desired protocol.
- publicdns
Record StringId - string → ID of the resource.
- 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 record. - service String
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts - ttl Double
- optional number → The time to live of the record.
- weight Double
- optional number → The relative weight of the record's server.
- type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- zone
Id string - required string → The ID of the zone to attach the record to.
- content string
- optional string → The content of the record.
- host string
- optional string → The domain name of the target host.
- ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name string
- optional string → The name of the record.
- port number
- optional number → The port on the target host of the service.
- priority number
- optional number → The priority of the record's server.
- proto string
- optional string → The name of the desired protocol.
- publicdns
Record stringId - string → ID of the resource.
- 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 record. - service string
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts - ttl number
- optional number → The time to live of the record.
- weight number
- optional number → The relative weight of the record's server.
- type str
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- zone_
id str - required string → The ID of the zone to attach the record to.
- content str
- optional string → The content of the record.
- host str
- optional string → The domain name of the target host.
- ip str
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name str
- optional string → The name of the record.
- port float
- optional number → The port on the target host of the service.
- priority float
- optional number → The priority of the record's server.
- proto str
- optional string → The name of the desired protocol.
- publicdns_
record_ strid - string → ID of the resource.
- 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 record. - service str
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts Args - ttl float
- optional number → The time to live of the record.
- weight float
- optional number → The relative weight of the record's server.
- type String
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- zone
Id String - required string → The ID of the zone to attach the record to.
- content String
- optional string → The content of the record.
- host String
- optional string → The domain name of the target host.
- ip String
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name String
- optional string → The name of the record.
- port Number
- optional number → The port on the target host of the service.
- priority Number
- optional number → The priority of the record's server.
- proto String
- optional string → The name of the desired protocol.
- publicdns
Record StringId - string → ID of the resource.
- 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 record. - service String
- optional string → The name of the desired service.
- timeouts Property Map
- ttl Number
- optional number → The time to live of the record.
- weight Number
- optional number → The relative weight of the record's server.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicdnsRecord resource produces the following output properties:
Look up Existing PublicdnsRecord Resource
Get an existing PublicdnsRecord 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?: PublicdnsRecordState, opts?: CustomResourceOptions): PublicdnsRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
full_name: Optional[str] = None,
host: Optional[str] = None,
ip: Optional[str] = None,
name: Optional[str] = None,
port: Optional[float] = None,
priority: Optional[float] = None,
proto: Optional[str] = None,
publicdns_record_id: Optional[str] = None,
region: Optional[str] = None,
service: Optional[str] = None,
timeouts: Optional[PublicdnsRecordTimeoutsArgs] = None,
ttl: Optional[float] = None,
type: Optional[str] = None,
weight: Optional[float] = None,
zone_id: Optional[str] = None) -> PublicdnsRecord
func GetPublicdnsRecord(ctx *Context, name string, id IDInput, state *PublicdnsRecordState, opts ...ResourceOption) (*PublicdnsRecord, error)
public static PublicdnsRecord Get(string name, Input<string> id, PublicdnsRecordState? state, CustomResourceOptions? opts = null)
public static PublicdnsRecord get(String name, Output<String> id, PublicdnsRecordState state, CustomResourceOptions options)
resources: _: type: vkcs:PublicdnsRecord get: id: ${id}
- 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.
- Content string
- optional string → The content of the record.
- Full
Name string - string → The full name of the SRV record.
- Host string
- optional string → The domain name of the target host.
- Ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- Name string
- optional string → The name of the record.
- Port double
- optional number → The port on the target host of the service.
- Priority double
- optional number → The priority of the record's server.
- Proto string
- optional string → The name of the desired protocol.
- Publicdns
Record stringId - string → ID of the resource.
- 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 record. - Service string
- optional string → The name of the desired service.
- Timeouts
Publicdns
Record Timeouts - Ttl double
- optional number → The time to live of the record.
- Type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- Weight double
- optional number → The relative weight of the record's server.
- Zone
Id string - required string → The ID of the zone to attach the record to.
- Content string
- optional string → The content of the record.
- Full
Name string - string → The full name of the SRV record.
- Host string
- optional string → The domain name of the target host.
- Ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- Name string
- optional string → The name of the record.
- Port float64
- optional number → The port on the target host of the service.
- Priority float64
- optional number → The priority of the record's server.
- Proto string
- optional string → The name of the desired protocol.
- Publicdns
Record stringId - string → ID of the resource.
- 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 record. - Service string
- optional string → The name of the desired service.
- Timeouts
Publicdns
Record Timeouts Args - Ttl float64
- optional number → The time to live of the record.
- Type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- Weight float64
- optional number → The relative weight of the record's server.
- Zone
Id string - required string → The ID of the zone to attach the record to.
- content String
- optional string → The content of the record.
- full
Name String - string → The full name of the SRV record.
- host String
- optional string → The domain name of the target host.
- ip String
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name String
- optional string → The name of the record.
- port Double
- optional number → The port on the target host of the service.
- priority Double
- optional number → The priority of the record's server.
- proto String
- optional string → The name of the desired protocol.
- publicdns
Record StringId - string → ID of the resource.
- 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 record. - service String
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts - ttl Double
- optional number → The time to live of the record.
- type String
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- weight Double
- optional number → The relative weight of the record's server.
- zone
Id String - required string → The ID of the zone to attach the record to.
- content string
- optional string → The content of the record.
- full
Name string - string → The full name of the SRV record.
- host string
- optional string → The domain name of the target host.
- ip string
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name string
- optional string → The name of the record.
- port number
- optional number → The port on the target host of the service.
- priority number
- optional number → The priority of the record's server.
- proto string
- optional string → The name of the desired protocol.
- publicdns
Record stringId - string → ID of the resource.
- 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 record. - service string
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts - ttl number
- optional number → The time to live of the record.
- type string
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- weight number
- optional number → The relative weight of the record's server.
- zone
Id string - required string → The ID of the zone to attach the record to.
- content str
- optional string → The content of the record.
- full_
name str - string → The full name of the SRV record.
- host str
- optional string → The domain name of the target host.
- ip str
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name str
- optional string → The name of the record.
- port float
- optional number → The port on the target host of the service.
- priority float
- optional number → The priority of the record's server.
- proto str
- optional string → The name of the desired protocol.
- publicdns_
record_ strid - string → ID of the resource.
- 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 record. - service str
- optional string → The name of the desired service.
- timeouts
Publicdns
Record Timeouts Args - ttl float
- optional number → The time to live of the record.
- type str
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- weight float
- optional number → The relative weight of the record's server.
- zone_
id str - required string → The ID of the zone to attach the record to.
- content String
- optional string → The content of the record.
- full
Name String - string → The full name of the SRV record.
- host String
- optional string → The domain name of the target host.
- ip String
- optional string → The IP address of the record. It should be IPv4 for record of type "A" and IPv6 for record of type "AAAA".
- name String
- optional string → The name of the record.
- port Number
- optional number → The port on the target host of the service.
- priority Number
- optional number → The priority of the record's server.
- proto String
- optional string → The name of the desired protocol.
- publicdns
Record StringId - string → ID of the resource.
- 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 record. - service String
- optional string → The name of the desired service.
- timeouts Property Map
- ttl Number
- optional number → The time to live of the record.
- type String
- required string → The type of the record. Must be one of following: "A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT".
- weight Number
- optional number → The relative weight of the record's server.
- zone
Id String - required string → The ID of the zone to attach the record to.
Supporting Types
PublicdnsRecordTimeouts, PublicdnsRecordTimeoutsArgs
Import
Public DNS records can be imported using the id
in the form <zone-id>/<record-type>/<record-id>
, e.g.
$ pulumi import vkcs:index/publicdnsRecord:PublicdnsRecord record 7582c61b-99b7-4730-a74f-7062fbadb94c/a/96b11adf-2627-4a06-bceb-a7f3b61b709e
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.