-
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.
feat(aws-ec2): AmazonLinuxImage supports AL2 (#1081)
Add support for Amazon Linux 2 to AmazonLinuxImage, by supplying a new `generation: AmazonLinuxGeneration.AmazonLinux2` parameter. Fixes #1062.
- Loading branch information
Showing
9 changed files
with
563 additions
and
27 deletions.
There are no files selected for viewing
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,12 @@ | ||
#!/bin/bash | ||
# Development script to build all docs packages and rsync them into $root/dist so that build-docs.sh can work. | ||
set -euo pipefail | ||
cd .. | ||
|
||
dist=$(pwd)/dist | ||
pacmak=$(pwd)/tools/cdk-build-tools/node_modules/.bin/jsii-pacmak | ||
scopes=$(lerna ls 2>/dev/null | grep -v "(private)" | cut -d" " -f1 | xargs -n1 -I{} echo "--scope {}" | tr "\n" " ") | ||
|
||
mkdir -p $dist | ||
node_modules/.bin/lerna exec --no-bail ${scopes} -- $pacmak -t sphinx -o dist/sphinx || echo 'Swallowing error' | ||
node_modules/.bin/lerna exec --no-bail ${scopes} -- rsync -av dist/ $dist/ || echo 'Swallowing error' |
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
28 changes: 28 additions & 0 deletions
28
packages/@aws-cdk/aws-autoscaling/test/example.images.lit.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,28 @@ | ||
import ec2 = require("@aws-cdk/aws-ec2"); | ||
|
||
/// !show | ||
// Pick a Windows edition to use | ||
const windows = new ec2.WindowsImage(ec2.WindowsVersion.WindowsServer2016EnglishNanoBase); | ||
|
||
// Pick the right Amazon Linux edition. All arguments shown are optional | ||
// and will default to these values when omitted. | ||
const amznLinux = new ec2.AmazonLinuxImage({ | ||
generation: ec2.AmazonLinuxGeneration.AmazonLinux, | ||
edition: ec2.AmazonLinuxEdition.Standard, | ||
virtualization: ec2.AmazonLinuxVirt.HVM, | ||
storage: ec2.AmazonLinuxStorage.GeneralPurpose, | ||
}); | ||
|
||
// For other custom (Linux) images, instantiate a `GenericLinuxImage` with | ||
// a map giving the AMI to in for each region: | ||
|
||
const linux = new ec2.GenericLinuxImage({ | ||
'us-east-1': 'ami-97785bed', | ||
'eu-west-1': 'ami-12345678', | ||
// ... | ||
}); | ||
/// !hide | ||
|
||
Array.isArray(windows); | ||
Array.isArray(amznLinux); | ||
Array.isArray(linux); |
Oops, something went wrong.