Creates and manages a private DNS service for connecting a network to private DNS using public API v1. For more information about private DNS, see the official Selectel documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
const service1 = new selectel.PrivateDnsServiceV1("service_1", {
region: "ru-1",
projectId: project1.id,
networkId: network1.id,
}, {
dependsOn: [network1],
});
import pulumi
import pulumi_selectel as selectel
service1 = selectel.PrivateDnsServiceV1("service_1",
region="ru-1",
project_id=project1["id"],
network_id=network1["id"],
opts = pulumi.ResourceOptions(depends_on=[network1]))
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v7/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := selectel.NewPrivateDnsServiceV1(ctx, "service_1", &selectel.PrivateDnsServiceV1Args{
Region: pulumi.String("ru-1"),
ProjectId: pulumi.Any(project1.Id),
NetworkId: pulumi.Any(network1.Id),
}, pulumi.DependsOn([]pulumi.Resource{
network1,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;
return await Deployment.RunAsync(() =>
{
var service1 = new Selectel.PrivateDnsServiceV1("service_1", new()
{
Region = "ru-1",
ProjectId = project1.Id,
NetworkId = network1.Id,
}, new CustomResourceOptions
{
DependsOn =
{
network1,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.PrivateDnsServiceV1;
import com.pulumi.selectel.PrivateDnsServiceV1Args;
import com.pulumi.resources.CustomResourceOptions;
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 service1 = new PrivateDnsServiceV1("service1", PrivateDnsServiceV1Args.builder()
.region("ru-1")
.projectId(project1.id())
.networkId(network1.id())
.build(), CustomResourceOptions.builder()
.dependsOn(network1)
.build());
}
}
resources:
service1:
type: selectel:PrivateDnsServiceV1
name: service_1
properties:
region: ru-1
projectId: ${project1.id}
networkId: ${network1.id}
options:
dependsOn:
- ${network1}
Create PrivateDnsServiceV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivateDnsServiceV1(name: string, args: PrivateDnsServiceV1Args, opts?: CustomResourceOptions);@overload
def PrivateDnsServiceV1(resource_name: str,
args: PrivateDnsServiceV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def PrivateDnsServiceV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
private_dns_service_v1_id: Optional[str] = None)func NewPrivateDnsServiceV1(ctx *Context, name string, args PrivateDnsServiceV1Args, opts ...ResourceOption) (*PrivateDnsServiceV1, error)public PrivateDnsServiceV1(string name, PrivateDnsServiceV1Args args, CustomResourceOptions? opts = null)
public PrivateDnsServiceV1(String name, PrivateDnsServiceV1Args args)
public PrivateDnsServiceV1(String name, PrivateDnsServiceV1Args args, CustomResourceOptions options)
type: selectel:PrivateDnsServiceV1
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 PrivateDnsServiceV1Args
- 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 PrivateDnsServiceV1Args
- 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 PrivateDnsServiceV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateDnsServiceV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivateDnsServiceV1Args
- 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 privateDnsServiceV1Resource = new Selectel.PrivateDnsServiceV1("privateDnsServiceV1Resource", new()
{
NetworkId = "string",
ProjectId = "string",
Region = "string",
PrivateDnsServiceV1Id = "string",
});
example, err := selectel.NewPrivateDnsServiceV1(ctx, "privateDnsServiceV1Resource", &selectel.PrivateDnsServiceV1Args{
NetworkId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
PrivateDnsServiceV1Id: pulumi.String("string"),
})
var privateDnsServiceV1Resource = new PrivateDnsServiceV1("privateDnsServiceV1Resource", PrivateDnsServiceV1Args.builder()
.networkId("string")
.projectId("string")
.region("string")
.privateDnsServiceV1Id("string")
.build());
private_dns_service_v1_resource = selectel.PrivateDnsServiceV1("privateDnsServiceV1Resource",
network_id="string",
project_id="string",
region="string",
private_dns_service_v1_id="string")
const privateDnsServiceV1Resource = new selectel.PrivateDnsServiceV1("privateDnsServiceV1Resource", {
networkId: "string",
projectId: "string",
region: "string",
privateDnsServiceV1Id: "string",
});
type: selectel:PrivateDnsServiceV1
properties:
networkId: string
privateDnsServiceV1Id: string
projectId: string
region: string
PrivateDnsServiceV1 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 PrivateDnsServiceV1 resource accepts the following input properties:
- Network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - Private
Dns stringService V1Id
- Network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - Private
Dns stringService V1Id
- network
Id String - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - private
Dns StringService V1Id
- network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - private
Dns stringService V1Id
- network_
id str - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- project_
id str - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region str
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - private_
dns_ strservice_ v1_ id
- network
Id String - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - private
Dns StringService V1Id
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivateDnsServiceV1 resource produces the following output properties:
- Addresses
List<Private
Dns Service V1Address> - List of the DNS service IP addresses:
- High
Availability bool - Id string
- The provider-assigned unique ID for this managed resource.
- Addresses
[]Private
Dns Service V1Address - List of the DNS service IP addresses:
- High
Availability bool - Id string
- The provider-assigned unique ID for this managed resource.
- addresses
List<Private
Dns Service V1Address> - List of the DNS service IP addresses:
- high
Availability Boolean - id String
- The provider-assigned unique ID for this managed resource.
- addresses
Private
Dns Service V1Address[] - List of the DNS service IP addresses:
- high
Availability boolean - id string
- The provider-assigned unique ID for this managed resource.
- addresses
Sequence[Private
Dns Service V1Address] - List of the DNS service IP addresses:
- high_
availability bool - id str
- The provider-assigned unique ID for this managed resource.
- addresses List<Property Map>
- List of the DNS service IP addresses:
- high
Availability Boolean - id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PrivateDnsServiceV1 Resource
Get an existing PrivateDnsServiceV1 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?: PrivateDnsServiceV1State, opts?: CustomResourceOptions): PrivateDnsServiceV1@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Sequence[PrivateDnsServiceV1AddressArgs]] = None,
high_availability: Optional[bool] = None,
network_id: Optional[str] = None,
private_dns_service_v1_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None) -> PrivateDnsServiceV1func GetPrivateDnsServiceV1(ctx *Context, name string, id IDInput, state *PrivateDnsServiceV1State, opts ...ResourceOption) (*PrivateDnsServiceV1, error)public static PrivateDnsServiceV1 Get(string name, Input<string> id, PrivateDnsServiceV1State? state, CustomResourceOptions? opts = null)public static PrivateDnsServiceV1 get(String name, Output<String> id, PrivateDnsServiceV1State state, CustomResourceOptions options)resources: _: type: selectel:PrivateDnsServiceV1 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.
- Addresses
List<Private
Dns Service V1Address> - List of the DNS service IP addresses:
- High
Availability bool - Network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- Private
Dns stringService V1Id - Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
- Addresses
[]Private
Dns Service V1Address Args - List of the DNS service IP addresses:
- High
Availability bool - Network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- Private
Dns stringService V1Id - Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
- addresses
List<Private
Dns Service V1Address> - List of the DNS service IP addresses:
- high
Availability Boolean - network
Id String - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- private
Dns StringService V1Id - project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
- addresses
Private
Dns Service V1Address[] - List of the DNS service IP addresses:
- high
Availability boolean - network
Id string - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- private
Dns stringService V1Id - project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region string
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
- addresses
Sequence[Private
Dns Service V1Address Args] - List of the DNS service IP addresses:
- high_
availability bool - network_
id str - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- private_
dns_ strservice_ v1_ id - project_
id str - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region str
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
- addresses List<Property Map>
- List of the DNS service IP addresses:
- high
Availability Boolean - network
Id String - The ID of the network you want to connect to the DNS service. Retrieved from the openstack_networking_network_v2 resource. Learn more about Networks.
- private
Dns StringService V1Id - project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the network is located, for example,
ru-3. Learn more about available pools in the Availability matrix.
Supporting Types
PrivateDnsServiceV1Address, PrivateDnsServiceV1AddressArgs
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectelTerraform Provider.
