Skip to content

Commit 1c57d69

Browse files
authored
feat(logs): support ADC regions for infrequent access log class (#34999)
### Issue # (if applicable) ADC regions are hardcoded as unsupported regions for Infrequent Access Log Class ### Reason for this change In the Zero-Touch Region Build (ZTRB) compliance effort for Infrequent Access Log Class, ADC regions are a part of the supported regions. ### Description of changes Removing logGroupClassUnsupportedRegions which include ADC regions ### Description of how you validated changes tested locally ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 992b0a5 commit 1c57d69

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

packages/aws-cdk-lib/aws-logs/lib/log-group.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { IProcessor, Transformer } from './transformer';
1111
import * as cloudwatch from '../../aws-cloudwatch';
1212
import * as iam from '../../aws-iam';
1313
import * as kms from '../../aws-kms';
14-
import { Annotations, Arn, ArnFormat, RemovalPolicy, Resource, Stack, Token, ValidationError } from '../../core';
14+
import { Arn, ArnFormat, RemovalPolicy, Resource, Stack, Token, ValidationError } from '../../core';
1515
import { addConstructMetadata } from '../../core/lib/metadata-resource';
1616
import { propertyInjectable } from '../../core/lib/prop-injectable';
1717

@@ -656,15 +656,6 @@ export class LogGroup extends LogGroupBase {
656656
}
657657

658658
let logGroupClass = props.logGroupClass;
659-
const stack = Stack.of(scope);
660-
const logGroupClassUnsupportedRegions = [
661-
'us-iso-west-1', // APA
662-
'us-iso-east-1', // DCA
663-
'us-isob-east-1', // LCK
664-
];
665-
if (logGroupClass !== undefined && !Token.isUnresolved(stack.region) && logGroupClassUnsupportedRegions.includes(stack.region)) {
666-
Annotations.of(this).addWarningV2('@aws-cdk/aws-logs:propertyNotSupported', `The LogGroupClass property is not supported in the following regions: ${logGroupClassUnsupportedRegions}`);
667-
}
668659

669660
const dataProtectionPolicy = props.dataProtectionPolicy?._bind(this);
670661
const fieldIndexPolicies: any[] = [];

packages/aws-cdk-lib/aws-logs/test/loggroup.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,6 @@ describe('log group', () => {
164164
}, 0);
165165
});
166166

167-
test('with log group class in a non-supported region', () => {
168-
// GIVEN
169-
const app = new App();
170-
const stack = new Stack(app, 'TestStack', {
171-
env: {
172-
region: 'us-isob-east-1',
173-
},
174-
});
175-
176-
// WHEN
177-
new LogGroup(stack, 'LogGroup', {
178-
logGroupClass: LogGroupClass.STANDARD,
179-
});
180-
181-
// THEN
182-
Annotations.fromStack(stack).hasWarning('*', Match.stringLikeRegexp(/The LogGroupClass property is not supported in the following regions.+us-isob-east-1/));
183-
});
184-
185167
test('will delete log group if asked to', () => {
186168
// GIVEN
187169
const stack = new Stack();

0 commit comments

Comments
 (0)