- Newest
- Most votes
- Most comments
You receive this error "extraneous key [complianceResourceTypes] is not permitted" when the properties are not correctly specified or you haven't defined one or more properties for controlScope.
The control scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. If no scope is specified, evaluations for the rule are triggered when any resource in your recording group changes in configuration.
NOTE : To set a control scope that includes all of a particular resource, leave the ControlScope empty or do not pass it when calling CreateFramework .
You can try adding scope tags to controlScope by defining it using ControlScopeProperty as shown below :
================ // The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import { aws_backup as backup } from 'aws-cdk-lib'; const controlScopeProperty: backup.CfnFramework.ControlScopeProperty = { complianceResourceIds: ['complianceResourceIds'], complianceResourceTypes: ['complianceResourceTypes'], tags: [{ key: 'key', value: 'value', }], };
I suggest you test it on a demo environment before using in a production setup.
Refer to this documentation for more information : ==> https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_backup.CfnFramework.ControlScopeProperty.html ==> https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-model-validation-failure/
Relevant content
- asked 2 years ago
- Accepted Answerasked a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago