1. Packages
  2. AWS Classic
  3. API Docs
  4. vpc
  5. EndpointPrivateDns

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

aws.vpc.EndpointPrivateDns

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

    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 parent aws.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.

    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

    The EndpointPrivateDns resource accepts the following input properties:

    PrivateDnsEnabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    VpcEndpointId string
    VPC endpoint identifier.
    PrivateDnsEnabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    VpcEndpointId string
    VPC endpoint identifier.
    privateDnsEnabled Boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId String
    VPC endpoint identifier.
    privateDnsEnabled boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId string
    VPC endpoint identifier.
    private_dns_enabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpc_endpoint_id str
    VPC endpoint identifier.
    privateDnsEnabled Boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId String
    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.
    The following state arguments are supported:
    PrivateDnsEnabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    VpcEndpointId string
    VPC endpoint identifier.
    PrivateDnsEnabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    VpcEndpointId string
    VPC endpoint identifier.
    privateDnsEnabled Boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId String
    VPC endpoint identifier.
    privateDnsEnabled boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId string
    VPC endpoint identifier.
    private_dns_enabled bool
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpc_endpoint_id str
    VPC endpoint identifier.
    privateDnsEnabled Boolean
    Indicates whether a private hosted zone is associated with the VPC. Only applicable for Interface endpoints.
    vpcEndpointId String
    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi