aws.vpc.EndpointPrivateDns
Explore with Pulumi AI
Resource for enabling private DNS on an AWS VPC (Virtual Private Cloud) Endpoint.
When using this resource, the
private_dns_enabled
argument should be omitted on the parentaws.ec2.VpcEndpoint
resource. Setting the value both places can lead to unintended behavior and persistent differences.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.vpc.EndpointPrivateDns("example", {
vpcEndpointId: exampleAwsVpcEndpoint.id,
privateDnsEnabled: true,
});
import pulumi
import pulumi_aws as aws
example = aws.vpc.EndpointPrivateDns("example",
vpc_endpoint_id=example_aws_vpc_endpoint["id"],
private_dns_enabled=True)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewEndpointPrivateDns(ctx, "example", &vpc.EndpointPrivateDnsArgs{
VpcEndpointId: pulumi.Any(exampleAwsVpcEndpoint.Id),
PrivateDnsEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Vpc.EndpointPrivateDns("example", new()
{
VpcEndpointId = exampleAwsVpcEndpoint.Id,
PrivateDnsEnabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpc.EndpointPrivateDns;
import com.pulumi.aws.vpc.EndpointPrivateDnsArgs;
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 example = new EndpointPrivateDns("example", EndpointPrivateDnsArgs.builder()
.vpcEndpointId(exampleAwsVpcEndpoint.id())
.privateDnsEnabled(true)
.build());
}
}
resources:
example:
type: aws:vpc:EndpointPrivateDns
properties:
vpcEndpointId: ${exampleAwsVpcEndpoint.id}
privateDnsEnabled: true
Create EndpointPrivateDns Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EndpointPrivateDns(name: string, args: EndpointPrivateDnsArgs, opts?: CustomResourceOptions);
@overload
def EndpointPrivateDns(resource_name: str,
args: EndpointPrivateDnsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EndpointPrivateDns(resource_name: str,
opts: Optional[ResourceOptions] = None,
private_dns_enabled: Optional[bool] = None,
vpc_endpoint_id: Optional[str] = None)
func NewEndpointPrivateDns(ctx *Context, name string, args EndpointPrivateDnsArgs, opts ...ResourceOption) (*EndpointPrivateDns, error)
public EndpointPrivateDns(string name, EndpointPrivateDnsArgs args, CustomResourceOptions? opts = null)
public EndpointPrivateDns(String name, EndpointPrivateDnsArgs args)
public EndpointPrivateDns(String name, EndpointPrivateDnsArgs args, CustomResourceOptions options)
type: aws:vpc:EndpointPrivateDns
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 EndpointPrivateDnsArgs
- 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 EndpointPrivateDnsArgs
- 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 EndpointPrivateDnsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EndpointPrivateDnsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EndpointPrivateDnsArgs
- 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 endpointPrivateDnsResource = new Aws.Vpc.EndpointPrivateDns("endpointPrivateDnsResource", new()
{
PrivateDnsEnabled = false,
VpcEndpointId = "string",
});
example, err := vpc.NewEndpointPrivateDns(ctx, "endpointPrivateDnsResource", &vpc.EndpointPrivateDnsArgs{
PrivateDnsEnabled: pulumi.Bool(false),
VpcEndpointId: pulumi.String("string"),
})
var endpointPrivateDnsResource = new EndpointPrivateDns("endpointPrivateDnsResource", EndpointPrivateDnsArgs.builder()
.privateDnsEnabled(false)
.vpcEndpointId("string")
.build());
endpoint_private_dns_resource = aws.vpc.EndpointPrivateDns("endpointPrivateDnsResource",
private_dns_enabled=False,
vpc_endpoint_id="string")
const endpointPrivateDnsResource = new aws.vpc.EndpointPrivateDns("endpointPrivateDnsResource", {
privateDnsEnabled: false,
vpcEndpointId: "string",
});
type: aws:vpc:EndpointPrivateDns
properties:
privateDnsEnabled: false
vpcEndpointId: string
EndpointPrivateDns 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 EndpointPrivateDns resource accepts the following input properties:
- Private
Dns boolEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - Vpc
Endpoint stringId - VPC endpoint identifier.
- Private
Dns boolEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - Vpc
Endpoint stringId - VPC endpoint identifier.
- private
Dns BooleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint StringId - VPC endpoint identifier.
- private
Dns booleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint stringId - VPC endpoint identifier.
- private_
dns_ boolenabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc_
endpoint_ strid - VPC endpoint identifier.
- private
Dns BooleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint StringId - VPC endpoint identifier.
Outputs
All input properties are implicitly available as output properties. Additionally, the EndpointPrivateDns 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 EndpointPrivateDns Resource
Get an existing EndpointPrivateDns 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?: EndpointPrivateDnsState, opts?: CustomResourceOptions): EndpointPrivateDns
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
private_dns_enabled: Optional[bool] = None,
vpc_endpoint_id: Optional[str] = None) -> EndpointPrivateDns
func GetEndpointPrivateDns(ctx *Context, name string, id IDInput, state *EndpointPrivateDnsState, opts ...ResourceOption) (*EndpointPrivateDns, error)
public static EndpointPrivateDns Get(string name, Input<string> id, EndpointPrivateDnsState? state, CustomResourceOptions? opts = null)
public static EndpointPrivateDns get(String name, Output<String> id, EndpointPrivateDnsState 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.
- Private
Dns boolEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - Vpc
Endpoint stringId - VPC endpoint identifier.
- Private
Dns boolEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - Vpc
Endpoint stringId - VPC endpoint identifier.
- private
Dns BooleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint StringId - VPC endpoint identifier.
- private
Dns booleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint stringId - VPC endpoint identifier.
- private_
dns_ boolenabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc_
endpoint_ strid - VPC endpoint identifier.
- private
Dns BooleanEnabled - Indicates whether a private hosted zone is associated with the VPC. Only applicable for
Interface
endpoints. - vpc
Endpoint StringId - VPC endpoint identifier.
Import
Using pulumi import
, import a VPC (Virtual Private Cloud) Endpoint Private DNS using the vpc_endpoint_id
. For example:
$ pulumi import aws:vpc/endpointPrivateDns:EndpointPrivateDns example vpce-abcd-1234
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.