Skip to content

Commit

Permalink
feat(route53): HostedZone's default period at the end should be optio…
Browse files Browse the repository at this point in the history
…nal (#25379)

new flag `addTrailingDot`

The addTrailingDot option provides users with the choice to add a trailing dot (.) to the given domain name. In DNS, appending a dot at the end of a domain name indicates that the domain name is a fully qualified domain name (FQDN).
This function returns the value as is if the domain name is already an FQDN or has a trailing dot, and otherwise treats it as having a trailing dot. The existing specification was rejecting domain names with trailing dots, but this modification makes it unnecessary, so the validation check has been removed.

Closes #22406

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
watany-dev committed May 30, 2023
1 parent 684754b commit cc204ca
Show file tree
Hide file tree
Showing 13 changed files with 209 additions and 83 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "20.0.0",
"version": "31.0.0",
"files": {
"00cd063646d893e6ee34f7fb3e022ab4f3c0de2c0388548e226905f45a0caec2": {
"f9c954c8023429cbccaf7169883a3b5bb6ecd00c97f9931179eb65a405f68dd4": {
"source": {
"path": "aws-cdk-route53-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "00cd063646d893e6ee34f7fb3e022ab4f3c0de2c0388548e226905f45a0caec2.json",
"objectKey": "f9c954c8023429cbccaf7169883a3b5bb6ecd00c97f9931179eb65a405f68dd4.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@
"Name": "sub.cdk.test."
}
},
"PublicZoneWithDotAE1455DD": {
"Type": "AWS::Route53::HostedZone",
"Properties": {
"Name": "cdk.test"
}
},
"CNAMEC70A2D52": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "31.0.0",
"testCases": {
"integ.route53": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "20.0.0",
"version": "31.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"aws-cdk-route53-integ.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/00cd063646d893e6ee34f7fb3e022ab4f3c0de2c0388548e226905f45a0caec2.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f9c954c8023429cbccaf7169883a3b5bb6ecd00c97f9931179eb65a405f68dd4.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -147,6 +141,12 @@
"data": "PublicSubZoneDBD26A0A"
}
],
"/aws-cdk-route53-integ/PublicZoneWithDot/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "PublicZoneWithDotAE1455DD"
}
],
"/aws-cdk-route53-integ/CNAME/Resource": [
{
"type": "aws:cdk:logicalId",
Expand Down Expand Up @@ -197,6 +197,12 @@
]
},
"displayName": "aws-cdk-route53-integ"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}

0 comments on commit cc204ca

Please sign in to comment.