当使用类型为
托管区域已经存在,但是没有使用 Cloudformation 创建,因此我无法从另一个模板引用名称。
使用类型
是否有一种方法可以从 ID 获取名称,以便创建记录集?
这是我正在使用的模板,请注意需要托管区域名称创建记录集的记录集条目的名称。
AWS::Route53::HostedZone::Id
的参数时,有没有一种方法可以获取 HostedZone 名称?托管区域已经存在,但是没有使用 Cloudformation 创建,因此我无法从另一个模板引用名称。
使用类型
AWS::Route53::HostedZone::Id
允许用户从下拉菜单中选择,但选择的是 ID 而不是名称。是否有一种方法可以从 ID 获取名称,以便创建记录集?
这是我正在使用的模板,请注意需要托管区域名称创建记录集的记录集条目的名称。
AWSTemplateFormatVersion: '2010-09-09'
Description: Route53
Parameters:
HostedZone:
Type: AWS::Route53::HostedZone::Id
Description: The Hosted Zone for the Record Set
RecordSetName:
Type: String
Description: The name of the record set (all lowercase)
Resources:
Route53:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Comment: DNS name
Name: !Sub ${RecordSetName}.??????
Type: A
TTL: '60'
ResourceRecords:
- 10.1.1.1