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(ec2): instance support passing IAM instance profile #32073

Merged
merged 6 commits into from
Nov 28, 2024

Conversation

phuhung273
Copy link
Contributor

Issue # (if applicable)

Closes #8348

Reason for this change

  • Use only 1 IAM instance profile for multiple instances
  • Passing role create too many instance profile

Description of changes

  • ec2.Instance support instanceProfile param

Description of how you validated changes

  • unit test
  • integ test

Checklist


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 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 labels Nov 9, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team November 9, 2024 05:29
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 9, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Thank you! I can't believe we don't support instance profile until now.

Copy link
Contributor

mergify bot commented Nov 20, 2024

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

@GavinZZ
Copy link
Contributor

GavinZZ commented Nov 21, 2024

@mergify update

Copy link
Contributor

mergify bot commented Nov 21, 2024

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/codecov.yml without workflows permission

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 21, 2024
GavinZZ
GavinZZ previously approved these changes Nov 21, 2024
@mergify mergify bot dismissed GavinZZ’s stale review November 21, 2024 19:51

Pull request has been modified.

GavinZZ
GavinZZ previously approved these changes Nov 21, 2024
Copy link
Contributor

mergify bot commented Nov 21, 2024

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

@phuhung273
Copy link
Contributor Author

@GavinZZ thanks for your review. I dont know why CodeQL stuck at this snippet now

part = `"${part.replace(/"/g, '\\"')}"`;

Can confirm this line exists in other generated integ test snapshot.

@phuhung273
Copy link
Contributor Author

phuhung273 commented Nov 22, 2024

@mergify mergify bot dismissed GavinZZ’s stale review November 22, 2024 18:35

Pull request has been modified.

GavinZZ
GavinZZ previously approved these changes Nov 22, 2024
Copy link
Contributor

mergify bot commented Nov 22, 2024

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

@GavinZZ
Copy link
Contributor

GavinZZ commented Nov 22, 2024

I'll reach out internally to see what the CodeCov issue is.

@GavinZZ
Copy link
Contributor

GavinZZ commented Nov 25, 2024

@phuhung273 I synced with my team and there's some issue with a flaky test in the Code coverage test suite. We're working on a fix, please wait patiently and will update you soon.

@phuhung273
Copy link
Contributor Author

Thanks so much @GavinZZ, please take your time

@mergify mergify bot dismissed GavinZZ’s stale review November 28, 2024 13:08

Pull request has been modified.

Copy link
Contributor

mergify bot commented Nov 28, 2024

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

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.41%. Comparing base (559d676) to head (63721fa).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #32073      +/-   ##
==========================================
+ Coverage   78.36%   78.41%   +0.04%     
==========================================
  Files         105      106       +1     
  Lines        7170     7208      +38     
  Branches     1315     1323       +8     
==========================================
+ Hits         5619     5652      +33     
- Misses       1364     1369       +5     
  Partials      187      187              
Flag Coverage Δ
suite.unit 78.41% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 78.41% <93.33%> (+0.04%) ⬆️

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

mergify bot commented Nov 28, 2024

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

@mergify mergify bot merged commit cf89d0f into aws:main Nov 28, 2024
17 checks passed
Copy link

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 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing an IAM Instance Profile to ec2.Instance
3 participants