File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,18 @@ export default async (
2424 `providers.tf` ,
2525 replaceVars ( source , {
2626 ...vars ,
27+ extra_providers : Object . entries ( regions )
28+ . map ( ( [ rCode , r ] : [ string , layer_region_config ] ) => {
29+ const region = r ?. id || rCode ;
30+ const isMain = region === defaultRegion ;
31+ return isMain
32+ ? undefined
33+ : { type : 'aws' , alias : rCode , region} ;
34+ } )
35+ . filter ( x => ! ! x )
36+ . sort ( ( a , b ) =>
37+ ( a ?. alias as string ) . localeCompare ( b ?. alias as string ) ,
38+ ) ,
2739 is_providers_file : true ,
2840 } ) as unknown as string ,
2941 ] ,
@@ -55,6 +67,7 @@ export default async (
5567 is_main : isMain ,
5668 is_main_file : true ,
5769 is_default_region : isMain ,
70+ psuffix : isMain ? '' : `.${ rCode } ` ,
5871 rsuffix : isMain ? '' : `-${ rCode } ` ,
5972 ...r ,
6073 ...( vars ?. id ? { id : vars . id } : { } ) ,
You can’t perform that action at this time.
0 commit comments