@@ -7,10 +7,11 @@ async function main(component: Input): Promise<Output> {
77 } ;
88 }
99
10- const domain = component . properties ?. domain ;
11- const hostedZoneId = domain ?. HostedZoneId ;
12- const name = domain ?. Name ;
13- const type = domain ?. Type ;
10+ // Changed: access via domain.properties
11+ const properties = component . properties ?. domain ?. properties ;
12+ const hostedZoneId = properties ?. HostedZoneId ;
13+ const name = properties ?. Name ;
14+ const type = properties ?. Type ;
1415
1516 if ( ! hostedZoneId ) {
1617 return {
@@ -40,24 +41,26 @@ async function main(component: Input): Promise<Output> {
4041 ResourceRecordSet : {
4142 Name : name ,
4243 Type : type ,
43- TTL : domain ?. TTL ? parseInt ( domain . TTL ) : undefined ,
44- ResourceRecords : domain ?. ResourceRecords ?. map ( ( record : string ) => ( {
45- Value : record ,
46- } ) ) ,
47- AliasTarget : domain ?. AliasTarget
44+ TTL : properties ?. TTL ? parseInt ( properties . TTL ) : undefined ,
45+ ResourceRecords : properties ?. ResourceRecords ?. map (
46+ ( record : string ) => ( {
47+ Value : record ,
48+ } ) ,
49+ ) ,
50+ AliasTarget : properties ?. AliasTarget
4851 ? {
49- DNSName : domain . AliasTarget . DNSName ,
50- EvaluateTargetHealth : domain . AliasTarget . EvaluateTargetHealth ,
51- HostedZoneId : domain . AliasTarget . HostedZoneId ,
52- }
52+ DNSName : properties . AliasTarget . DNSName ,
53+ EvaluateTargetHealth : properties . AliasTarget . EvaluateTargetHealth ,
54+ HostedZoneId : properties . AliasTarget . HostedZoneId ,
55+ }
5356 : undefined ,
54- SetIdentifier : domain ?. SetIdentifier ,
55- Weight : domain ?. Weight ,
56- Region : domain ?. Region ,
57- GeoLocation : domain ?. GeoLocation ,
58- Failover : domain ?. Failover ,
59- MultiValueAnswer : domain ?. MultiValueAnswer ,
60- HealthCheckId : domain ?. HealthCheckId ,
57+ SetIdentifier : properties ?. SetIdentifier ,
58+ Weight : properties ?. Weight ,
59+ Region : properties ?. Region ,
60+ GeoLocation : properties ?. GeoLocation ,
61+ Failover : properties ?. Failover ,
62+ MultiValueAnswer : properties ?. MultiValueAnswer ,
63+ HealthCheckId : properties ?. HealthCheckId ,
6164 } ,
6265 } ,
6366 ] ,
@@ -76,8 +79,7 @@ async function main(component: Input): Promise<Output> {
7679 console . error ( child . stderr ) ;
7780 return {
7881 status : "error" ,
79- message :
80- `Unable to create; AWS CLI exited with non zero code: ${ child . exitCode } ` ,
82+ message : `Unable to create; AWS CLI exited with non zero code: ${ child . exitCode } ` ,
8183 } ;
8284 }
8385
0 commit comments