SCP::Dns::HostedZone
SCP::Dns::HostedZone
SCP::Dns::HostedZone
Description
A DNS hosted zone that stores and serves DNS records for a domain and its sub-domains. A Public type is exposed to the internet, while a Private type is resolved only within the registered private DNS.
Version
1.4.0
Syntax
To declare this entity in your Infrastructure Builder template, use the following syntax:
JSON
{
"Type" : "SCP::Dns::HostedZone",
"Properties" : {
"Name" : "String",
"Type" : "String",
"Description" : "String",
"PrivateDnsId" : "String"
}
}
YAML
Type: SCP::Dns::HostedZone
Properties:
Name: String
Type: String
Description: String
PrivateDnsId: String
Properties
Name
The domain name that a DNS service manages. All DNS records for that domain and its sub-domains are stored and served within this hosted zone.
| Attribute | Value |
|---|---|
| Required | Yes |
| Type | String |
| Length constraints | 2–69 |
| Update requires | Replacement |
Type
The type of the hosted zone. A Public hosted zone serves DNS records to the internet, and a Private hosted zone serves them only within the registered private DNS environment.
| Attribute | Value |
|---|---|
| Required | Yes |
| Type | String |
| Allowed values | public | private |
| Update requires | Replacement |
Description
A brief explanation or note about this resource that identifies the purpose or usage of the resource, up to 50 characters.
| Attribute | Value |
|---|---|
| Required | No |
| Type | String |
| Length constraints | Max: 50 |
| Update requires | No interruption |
PrivateDnsId
The DNS server ID used to register the Hosted Zone. Input this only when the Hosted Zone is of Private type; it is ignored for a Public-type Hosted Zone.
| Attribute | Value |
|---|---|
| Required | No |
| Type | String |
| Update requires | Replacement |
Return Values
Ref
When you pass the logical ID of this resource to the Ref function, Ref returns the value of the Id.
Fn::GetAtt
| Attribute | Description |
|---|---|
| Name | The domain name that a DNS service manages. All DNS records for that domain and its sub-domains are stored and served within this hosted zone. |
| Type | The type of the hosted zone. A Public hosted zone serves DNS records to the internet, and a Private hosted zone serves them only within the registered private DNS environment. |
| Description | A brief explanation or note about this resource that identifies the purpose or usage of the resource, up to 50 characters. |
| PrivateDnsId | The DNS server ID used to register the Hosted Zone. Input this only when the Hosted Zone is of Private type; it is ignored for a Public-type Hosted Zone. |
| Ttl | TTL (Time-To-Live) in seconds for the zone. Determines how long DNS resolvers cache the zone records. |
| Status | The current status of the hosted zone (e.g., ACTIVE, CREATING, DELETING). - example : ACTIVE |
| PoolId | The identifier of the DNS server pool used by the hosted zone. |
| PrivateDnsName | The DNS server name used to register the Hosted Zone. For a Public-type Hosted Zone, this value is empty. |
Sample Template
Create a Public Hosted Zone and add an A record
Creates a Public Hosted Zone and adds an A record
SCPTemplateFormatVersion: '2026-01-01'
Description: 'Public Hosted Zone을 생성하고 A 레코드를 추가하는 DNS 샘플 템플릿'
Parameters:
DomainName:
Type: String
Default: 'example.com'
Description: 'DNS 서비스에 등록된 공개 도메인 이름을 입력하세요. (2~69자, 예: example.com)'
RecordName:
Type: String
Default: 'www.example.com'
Description: '생성할 A 레코드의 이름을 입력하세요. 호스팅 영역의 도메인 또는 하위 도메인을 입력합니다. (예: www.example.com)'
RecordIpAddress:
Type: String
Default: '203.0.113.10'
Description: 'A 레코드에 연결할 IPv4 주소를 입력하세요. (예: 203.0.113.10)'
Resources:
hostedzone:
Type: SCP::Dns::HostedZone
Properties:
Name: !Ref DomainName
Type: public
record:
Type: SCP::Dns::Record
Properties:
HostedZoneId: !Ref hostedzone
Name: !Ref RecordName
Type: A
Records:
- !Ref RecordIpAddress
Ttl: 300
Outputs:
HostedZoneId:
Description: 생성된 호스팅 영역(Public Hosted Zone)의 ID입니다.
Value: !Ref hostedzone
RecordId:
Description: 생성된 DNS 레코드의 ID입니다.
Value: !Ref record