Skip to content

(logs): Importing log group ignores region #18214

@kornicameister

Description

@kornicameister

What is the problem?

Per this comment

It's a bug in the LogGroup.fromLogGroupArn() method - you can see here that the region is not passed from the ARN to the returned Resource, like it should be (here's a working example).

Blocks: #17747

Reproduction Steps

Same as in #

What did you expect to happen?

When imported log group's region is referenced incorrect region is taken into account. A region coming from log group's ARN ought to be taken into account instead of region of the stack.

What actually happened?

Region of the stack where log group is imported in is taken into account.

CDK CLI Version

1.134

Framework Version

No response

Node.js Version

17.1.0

OS

Linux

Language

Typescript, Python, .NET, Java, Go

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-logsRelated to Amazon CloudWatch LogsbugThis issue is a bug.p1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions