Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add support for AccountIdFromAlias #27642 #28180

Closed
wants to merge 1 commit into from

Conversation

YYang30
Copy link

@YYang30 YYang30 commented Nov 28, 2023

reason for this change:

  • Cloud Formation team introduced the support for referencing an AWS account via a new intrinsic function Fn::AccountIdFromAlias. This function can be used in cloud formation templates to reference another account(s) using a conventional alias string. We can get rid of hardcoding AWS account ID(s) in cloud formation templates. So it's helpful for automating region build process.
  • However, cfn-parse in the aws-cdk/core module has not yet added the support for this new CFN function, as a result of which, cfn-parse would fail to recognize this function as a valid/supported CFN function.

fix #27642


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p1 labels Nov 28, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team November 28, 2023 23:35
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@YYang30
Copy link
Author

YYang30 commented Nov 28, 2023

Exemption Request

  • (justification for requesting exemption on integration test) The test does not require a stack deployment. cfn-parse is an internal helper class for validating a cloud formation template. Please feel free to suggest. Will appreciate any guidance/suggestion and be happy to adopt them.

  • (need clarification on doc/readme change). Checked this readme file for aws-cdk-lib/core module link. Is this the right file/place to use?

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Nov 28, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 1bd4042
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 29, 2023
@YYang30
Copy link
Author

YYang30 commented Nov 30, 2023

Exemption Request

(justification for requesting exemption on integration test) The test does not require a stack deployment. cfn-parse is an internal helper class for validating a cloud formation template. Please feel free to suggest. Will appreciate any guidance/suggestion and be happy to adopt them.

(need clarification on doc/readme change). Checked this readme file for aws-cdk-lib/core module link. Is this the right file/place to use?

Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks great!

On the exemption, I do not think you need either an integ test or a readme update.

However, I could not find any documentation on the Fn::AccountIdFromAlias cloudformation function. For example it is not here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html. Can you provide some documentation on this function?

@scanlonp scanlonp added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels Dec 5, 2023
@scanlonp scanlonp self-assigned this Dec 5, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 5, 2023 08:12

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 5, 2023
@aws aws deleted a comment from YYang30 Dec 5, 2023
@scanlonp scanlonp closed this Dec 5, 2023
@aws aws deleted a comment from YYang30 Dec 5, 2023
@aws aws deleted a comment from scanlonp Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p1 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-cdk-lib): (Add support for this CfnIntrinsic function -- Fn::AccountIdFromAlias)
3 participants