現在、AWS-CDK を使用していくつかの作業を行っており、すべてのリージョン構成ログのストレージを集約する構成アグリゲーターを作成しようとしています。組織を構成することが許可されていない/できないため、アカウントではなくソースとしてリージョンを使用してこれを行っています。以下のコードに小道具を追加しようとしたときに現在受け取っているエラーは次のとおりです。
Object literal may only specify known properties, and 'allAwsRegions' does not exist in type 'IResolvable | (IResolvable | AccountAggregationSourceProperty)[]'.ts(2322)
これが私のコードです:
const awsRegion = Aws.ACCOUNT_ID.toString()
const awsAccountID = Aws.ACCOUNT_ID.toString()
const globalAggregatorAuth = newconfig.CfnAggregationAuthorization(this,'globalAggregatorAuth',{
authorizedAwsRegion: awsRegion,
authorizedAccountId: awsAccountID,
} )
const globalAggregator = new config.CfnConfigurationAggregator(this, 'globalAggregator', {
configurationAggregatorName: 'globalAggregator',
accountAggregationSources: {
accountIds: awsAccountID,
}
});
prop accountIds を使用して、上記の変数から値が割り当てられた「awsAccountID」の値を指定しようとすると、上記のエラーが現在発生しています。私はこれまでこのような問題を経験したことがないので、助けていただければ幸いです!!!