-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bump-cfnspec/v63.0.0
- Loading branch information
Showing
37 changed files
with
557 additions
and
468 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
packages/@aws-cdk/aws-apprunner/test/integ.service-ecr-public.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"Resources": { | ||
"Service1EDCC8134": { | ||
"Type": "AWS::AppRunner::Service", | ||
"Properties": { | ||
"SourceConfiguration": { | ||
"AuthenticationConfiguration": {}, | ||
"ImageRepository": { | ||
"ImageConfiguration": { | ||
"Port": "8000" | ||
}, | ||
"ImageIdentifier": "public.ecr.aws/aws-containers/hello-app-runner:latest", | ||
"ImageRepositoryType": "ECR_PUBLIC" | ||
} | ||
}, | ||
"InstanceConfiguration": {} | ||
} | ||
} | ||
}, | ||
"Outputs": { | ||
"URL1": { | ||
"Value": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"https://", | ||
{ | ||
"Fn::GetAtt": [ | ||
"Service1EDCC8134", | ||
"ServiceUrl" | ||
] | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/@aws-cdk/aws-apprunner/test/integ.service-ecr-public.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as cdk from '@aws-cdk/core'; | ||
import { Service, Source } from '../lib'; | ||
|
||
|
||
const app = new cdk.App(); | ||
|
||
const stack = new cdk.Stack(app, 'integ-apprunner-ecr-public'); | ||
|
||
// Scenario 1: Create the service from ECR public | ||
const service1 = new Service(stack, 'Service1', { | ||
source: Source.fromEcrPublic({ | ||
imageConfiguration: { | ||
port: 8000, | ||
}, | ||
imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest', | ||
}), | ||
}); | ||
new cdk.CfnOutput(stack, 'URL1', { value: `https://${service1.serviceUrl}` }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as path from 'path'; | ||
import * as assets from '@aws-cdk/aws-ecr-assets'; | ||
import * as cdk from '@aws-cdk/core'; | ||
import { Service, Source } from '../lib'; | ||
|
||
|
||
const app = new cdk.App(); | ||
|
||
const stack = new cdk.Stack(app, 'integ-apprunner'); | ||
|
||
|
||
// Scenario 3: Create the service from local code assets | ||
const imageAsset = new assets.DockerImageAsset(stack, 'ImageAssets', { | ||
directory: path.join(__dirname, './docker.assets'), | ||
}); | ||
const service3 = new Service(stack, 'Service3', { | ||
source: Source.fromAsset({ | ||
imageConfiguration: { port: 8000 }, | ||
asset: imageAsset, | ||
}), | ||
}); | ||
new cdk.CfnOutput(stack, 'URL3', { value: `https://${service3.serviceUrl}` }); | ||
|
||
// Scenario 2: Create the service from existing ECR repository | ||
const service2 = new Service(stack, 'Service2', { | ||
source: Source.fromEcr({ | ||
imageConfiguration: { port: 80 }, | ||
repository: imageAsset.repository, | ||
tag: imageAsset.assetHash, | ||
}), | ||
}); | ||
new cdk.CfnOutput(stack, 'URL2', { value: `https://${service2.serviceUrl}` }); |
Oops, something went wrong.