File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
reference-artifacts/Custom-Scripts/lza-upgrade/src Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3247,18 +3247,21 @@ export class ConvertAseaConfig {
32473247
32483248 const prepareResolverConfig = ( vpcConfig : VpcConfig ) => {
32493249 let lzaResolverConfig : {
3250- endpoints : ConvertConfigTypes . ResolverEndpointsType [ ] ;
3250+ endpoints : ConvertConfigTypes . ResolverEndpointsType [ ] | undefined ;
32513251 queryLogs : { name : string ; destinations : string [ ] } | undefined ;
32523252 } ;
32533253 const queryLoggingEnabled = vpcConfig [ 'dns-resolver-logging' ] ;
32543254 const lzaEndpointsRulesConfig : ConvertConfigTypes . ResolverEndpointRulesType [ ] = [ ] ;
32553255 const lzaEndpointsConfig : ConvertConfigTypes . ResolverEndpointsType [ ] = [ ] ;
3256- if ( ! vpcConfig . resolvers ) return ;
3257- const rules = prepareRulesConfig ( vpcConfig , lzaEndpointsRulesConfig ) ;
3258- const endpoints = prepareEndpointsConfig ( vpcConfig , lzaEndpointsConfig , rules ! ) ;
3256+ let rules : any ;
3257+ let endpoints : any [ ] = [ ] ;
3258+ if ( vpcConfig . resolvers ) {
3259+ rules = prepareRulesConfig ( vpcConfig , lzaEndpointsRulesConfig ) ;
3260+ endpoints = prepareEndpointsConfig ( vpcConfig , lzaEndpointsConfig , rules ! ) ;
3261+ }
32593262
32603263 lzaResolverConfig = {
3261- endpoints : endpoints ,
3264+ endpoints : endpoints . length > 0 ? endpoints : undefined ,
32623265 queryLogs : queryLoggingEnabled
32633266 ? {
32643267 name : `${ this . aseaPrefix } rql-${ vpcConfig . name } ` ,
You can’t perform that action at this time.
0 commit comments