Skip to content

Conversation

@ozelalisen
Copy link
Member

See CHANGELOG

otaviomacedo and others added 2 commits November 25, 2025 07:04
…#36175)

The `ScheduleGroup.grant*()` methods are delegating to the methods in the auto-generated `ScheduleGroupGrants` class. This class is generating policies with an incorrect ARN. Instead of:

```
arn:aws:scheduler:<region>:xxx:schedule/my-group-name/*
```

it is generating:

```
arn:aws:scheduler:<region>:xxx:schedule-group/my-group-name/*
```

Since the code generation mechanism doesn't provide any way of specifying a custom logic for the ARN generation, replace the auto-generated `ScheduleGroupGrants` with hand-written one, in which the ARN is computed by:


```ts
private arnForScheduleInGroup(scheduleName: string): string {
  return Arn.format({
    region: this.resource.env.region,
    account: this.resource.env.account,
    partition: Aws.PARTITION,
    service: 'scheduler',
    resource: 'schedule',
    resourceName: this.resource.scheduleGroupRef.scheduleGroupName + '/' + scheduleName,
  });
}
```

Fixes #36165.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@ozelalisen ozelalisen added pr/no-squash This PR should be merged instead of squash-merging it pr-linter/analytics-metadata-change labels Nov 25, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 25, 2025 07:07
@github-actions github-actions bot added the p2 label Nov 25, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 25, 2025
@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2025

Merge Queue Status Beta

✅ The pull request has been merged

This pull request spent 5 seconds in the queue, with no time waiting for CI.
The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = validate-pr
    • check-neutral = validate-pr
    • check-skipped = validate-pr
  • any of [🛡 GitHub branch protection]:
    • check-success = build
    • check-neutral = build
    • check-skipped = build

@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2025

Thank you for contributing! Your pull request will be automatically updated and merged without squashing (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 06dcb4d into v2-release Nov 25, 2025
16 of 17 checks passed
@mergify mergify bot deleted the patch/v2.229.1 branch November 25, 2025 09:25
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr/no-squash This PR should be merged instead of squash-merging it pr-linter/analytics-metadata-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants