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

(aws-apprunner): Support AWS Apprunner as new L2 construct #14813

Closed
2 tasks
pprahlad opened this issue May 21, 2021 · 11 comments · Fixed by #15810
Closed
2 tasks

(aws-apprunner): Support AWS Apprunner as new L2 construct #14813

pprahlad opened this issue May 21, 2021 · 11 comments · Fixed by #15810
Labels
@aws-cdk/aws-apprunner Related to the apprunner package effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2

Comments

@pprahlad
Copy link

AWS AppRunner launched on 5/18 and I'd like to channel customer requests to add official CDK support for Apprunner in the AWS Construct library

https://docs.aws.amazon.com/apprunner/latest/api/API_Operations.html

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@pprahlad pprahlad added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 21, 2021
@peterwoodworth peterwoodworth added feature/new-construct A request for a new L2 construct needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2 effort/large Large work item – several weeks of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 21, 2021
@peterwoodworth
Copy link
Contributor

Hey @pprahlad, thank you for this feature request.

Currently CFN doesn't support AppRunner, so it will be very difficult and time intensive for us to implement an L2 without first having L1s to build off of.

Check out #14779 for more information. @shellscape have you submitted a request to the CFN roadmap yet? If not, I can go ahead and do that 😄

@shellscape
Copy link

@peterwoodworth it's on my to-do list but please feel free to do that!

@hoegertn
Copy link
Contributor

Afaik CFN support was announced today

@peterwoodworth
Copy link
Contributor

I was just about to submit an issue for this, @hoegertn could you link to where that was announced? Thanks!

@hoegertn
Copy link
Contributor

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html

@peterwoodworth
Copy link
Contributor

peterwoodworth commented May 21, 2021

Oh exciting, it's already in the resource spec! Thanks for letting me know. @shellscape just so you're aware, the L1s will likely be in our release next week

@peterwoodworth peterwoodworth added @aws-cdk/aws-apprunner Related to the apprunner package and removed needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. labels May 21, 2021
@shellscape
Copy link

Great news all around!

@pprahlad
Copy link
Author

CloudFormation support was added at launch (required for CoPilot), but not documented in those docs until 5/20. There is a lot of customer feedback requesting L2 support. See AppRunner roadmap: aws/apprunner-roadmap#7

@RichiCoder1
Copy link
Contributor

Oh exciting, it's already in the resource spec! Thanks for letting me know. @shellscape just so you're aware, the L1s will likely be in our release next week

Excellent! That was the biggest thing I was waiting for (author of aws/apprunner-roadmap#7). I think one can get pretty with ECR Asset + App Runner resource, but something that makes it seamless would be amazing!

@pahud
Copy link
Contributor

pahud commented Jul 28, 2021

I've created a working POC from my laptop. Wondering if someone is working on this PR? If not, I probably can start a PR draft.

圖片

@mergify mergify bot closed this as completed in #15810 Sep 23, 2021
mergify bot pushed a commit that referenced this issue Sep 23, 2021
Support the `Service` L2 construct for App Runner.

- [x] implementation
- [x] unit testing and integ testing
- [x] README


## What's included

This PR introduces the initial L2 implementation of the `Service` construct.  We are allowed to create App Runner services with:

1.  ECR public
2. ECR(private) from any existing ECR repository
3. ECR(private) built and pushed from local assets
3. remote github repository

## Design

AWS App Runner allows us to create `Service` with `ECR_PUBLIC`, `ECR` and `Github`. We should specify the source  with the `source` property to define the source of the repository for the `Service` and conditionally create the required IAM access role for `ECR` to pull the required images([doc](https://docs.aws.amazon.com/apprunner/latest/dg/security_iam_service-with-iam.html#security_iam_service-with-iam-roles)).

```
source: Source.fromEcrPublic()  // To define a source from ECR Public container image.
source: Source.fromEcr()  // To define a source from ECR container image.
source: Source.fromGitHub()  // To define a source from a GitHub repository.
source: Source.fromAsset()  // To define a source from local code asset directory.
```

The [connection](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-authenticationconfiguration.html#cfn-apprunner-service-authenticationconfiguration-connectionarn) for Github is required for `Source.fromGitHub()`.  However, as there's no cloudformation support to create the App Runner `connection`, an existing connection will be required for service with github as the source.

Closes: #14813 


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apprunner Related to the apprunner package effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants