Resource: aws_service_discovery_private_dns_namespace

Provides a Service Discovery Private DNS Namespace resource.

Example Usage

resource "aws_vpc" "example" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_service_discovery_private_dns_namespace" "example" {
  name        = "hoge.example.local"
  description = "example"
  vpc         = aws_vpc.example.id
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Service Discovery Private DNS Namespace using the namespace ID and VPC ID. For example:

import {
  to = aws_service_discovery_private_dns_namespace.example
  id = "0123456789:vpc-123345"
}

Using terraform import, import Service Discovery Private DNS Namespace using the namespace ID and VPC ID. For example:

% terraform import aws_service_discovery_private_dns_namespace.example 0123456789:vpc-123345