@@ -69,22 +69,14 @@ export namespace InitialSetup {
6969
7070 const stack = cdk . Stack . of ( this ) ;
7171
72- const accountsSecret = new secrets . Secret ( this , 'Accounts' , {
73- secretName : 'accelerator/accounts' ,
74- description : 'This secret contains the information about the accounts that are used for deployment.' ,
75- } ) ;
76- setSecretValue ( accountsSecret , '[]' ) ;
77-
78- const limitsSecret = new secrets . Secret ( this , 'Limits' , {
79- secretName : 'accelerator/limits' ,
80- description : 'This secret contains a copy of the service limits of the Accelerator accounts.' ,
81- } ) ;
82-
83- const organizationsSecret = new secrets . Secret ( this , 'Organizations' , {
84- secretName : 'accelerator/organizations' ,
85- description : 'This secret contains the information about the organizations that are used for deployment.' ,
72+ const parametersTable = new dynamodb . Table ( this , 'ParametersTable' , {
73+ tableName : createName ( {
74+ name : 'Parameters' ,
75+ suffixLength : 0 ,
76+ } ) ,
77+ partitionKey : { name : 'id' , type : dynamodb . AttributeType . STRING } ,
78+ encryption : dynamodb . TableEncryption . DEFAULT ,
8679 } ) ;
87- setSecretValue ( organizationsSecret , '[]' ) ;
8880
8981 const outputsTable = new dynamodb . Table ( this , 'Outputs' , {
9082 tableName : createName ( {
@@ -135,9 +127,10 @@ export namespace InitialSetup {
135127 ACCELERATOR_EXECUTION_ROLE_NAME : props . stateMachineExecutionRole ,
136128 CDK_PLUGIN_ASSUME_ROLE_NAME : props . stateMachineExecutionRole ,
137129 CDK_PLUGIN_ASSUME_ROLE_DURATION : `${ buildTimeout . toSeconds ( ) } ` ,
138- ACCOUNTS_SECRET_ID : accountsSecret . secretArn ,
139- LIMITS_SECRET_ID : limitsSecret . secretArn ,
140- ORGANIZATIONS_SECRET_ID : organizationsSecret . secretArn ,
130+ ACCOUNTS_ITEM_ID : 'accounts' ,
131+ LIMITS_ITEM_ID : 'limits' ,
132+ ORGANIZATIONS_ITEM_ID : 'organizations' ,
133+ DYNAMODB_PARAMETERS_TABLE_NAME : parametersTable . tableName ,
141134 } ,
142135 } ) ;
143136
@@ -314,7 +307,8 @@ export namespace InitialSetup {
314307 role : pipelineRole ,
315308 } ,
316309 functionPayload : {
317- organizationsSecretId : organizationsSecret . secretArn ,
310+ parametersTableName : parametersTable . tableName ,
311+ itemId : 'organizations' ,
318312 configRepositoryName : props . configRepositoryName ,
319313 'configFilePath.$' : '$.configuration.configFilePath' ,
320314 'configCommitId.$' : '$.configuration.configCommitId' ,
@@ -329,7 +323,9 @@ export namespace InitialSetup {
329323 role : pipelineRole ,
330324 } ,
331325 functionPayload : {
332- accountsSecretId : accountsSecret . secretArn ,
326+ parametersTableName : parametersTable . tableName ,
327+ itemId : 'accounts' ,
328+ accountsItemsCountId : 'accounts-items-count' ,
333329 'configuration.$' : '$.configuration' ,
334330 } ,
335331 resultPath : '$' ,
@@ -444,7 +440,8 @@ export namespace InitialSetup {
444440 'configRepositoryName.$' : '$.configRepositoryName' ,
445441 'configFilePath.$' : '$.configFilePath' ,
446442 'configCommitId.$' : '$.configCommitId' ,
447- limitsSecretId : limitsSecret . secretArn ,
443+ parametersTableName : parametersTable . tableName ,
444+ itemId : 'limits' ,
448445 assumeRoleName : props . stateMachineExecutionRole ,
449446 'accounts.$' : '$.accounts' ,
450447 } ,
@@ -462,8 +459,9 @@ export namespace InitialSetup {
462459 'configFilePath.$' : '$.configuration.configFilePath' ,
463460 'configCommitId.$' : '$.configuration.configCommitId' ,
464461 acceleratorPrefix : props . acceleratorPrefix ,
465- accountsSecretId : accountsSecret . secretArn ,
466- organizationsSecretId : organizationsSecret . secretArn ,
462+ parametersTableName : parametersTable . tableName ,
463+ organizationsItemId : 'organizations' ,
464+ accountsItemId : 'accounts' ,
467465 configBranch : props . configBranchName ,
468466 'configRootFilePath.$' : '$.configuration.configRootFilePath' ,
469467 } ,
0 commit comments