Currently, I am working with the AWS-CDK and attempting to set up a Config Aggregator to combine the storage of configuration logs from all regions. Instead of using an account as the source, I have opted for a region due to restrictions on configuring organizations. The error I am encountering when adding properties to the code below is as follows:
Object literal may only specify known properties, and 'allAwsRegions' does not exist in type 'IResolvable | (IResolvable | AccountAggregationSourceProperty)[]'.ts(2322)
Here is my code snippet:
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,
}
});
The above error occurs when I attempt to assign a value of "awsAccountID" to the prop accountIds based on the variable defined earlier. This issue is new to me, and any assistance would be greatly appreciated!