Resource: awsServiceDiscoveryPrivateDnsNamespace
Provides a Service Discovery Private DNS Namespace resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsVpcExample = new aws.vpc.Vpc(this, "example", {
cidrBlock: "10.0.0.0/16",
});
const awsServiceDiscoveryPrivateDnsNamespaceExample =
new aws.serviceDiscoveryPrivateDnsNamespace.ServiceDiscoveryPrivateDnsNamespace(
this,
"example_1",
{
description: "example",
name: "hoge.example.local",
vpc: awsVpcExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsServiceDiscoveryPrivateDnsNamespaceExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
name
- (Required) The name of the namespace.vpc
- (Required) The ID of VPC that you want to associate the namespace with.description
- (Optional) The description that you specify for the namespace when you create it.tags
- (Optional) A map of tags to assign to the namespace. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of a namespace.arn
- The ARN that Amazon Route 53 assigns to the namespace when you create it.hostedZone
- The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Service Discovery Private DNS Namespace can be imported using the namespace ID and VPC ID, e.g.,