You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(imagebuilder-alpha): add support for Image Construct (#36154)
### Issue
aws/aws-cdk-rfcs#789
### Reason for this change
This change adds a new alpha module for EC2 Image Builder L2 Constructs (@aws-cdk/aws-imagebuilder-alpha), as outlined in aws/aws-cdk-rfcs#789. This PR specifically implements the Image construct.
### Description of changes
This change implements the Image construct, which is a higher-level construct of [CfnImage](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_imagebuilder.CfnImage.html).
#### Example
```ts
const image = new Image(this, 'Image', {
recipe: ImageRecipe.fromImageRecipeAttributes(this, 'ImageRecipe', { imageRecipeName: 'test-image-recipe' }),
infrastructureConfiguration: InfrastructureConfiguration.fromInfrastructureConfigurationName(
this,
'InfrastructureConfiguration',
'test-infrastructure-configuration',
),
distributionConfiguration: DistributionConfiguration.fromDistributionConfigurationName(
this,
'DistributionConfiguration',
'test-distribution-configuration',
),
workflows: [{ workflow: AwsManagedWorkflow.buildImage(this, 'BuildImageWorkflow') }],
executionRole: iam.Role.fromRoleName(this, 'ExecutionRole', 'test-execution-role'),
logGroup: logs.LogGroup.fromLogGroupName(this, 'LogGroup', 'test-log-group'),
imageTestsEnabled: true,
imageScanningEnabled: true,
enhancedImageMetadataEnabled: true,
tags: { key1: 'value1', key2: 'value2' },
});
```
### Describe any new or updated permissions being added
N/A - new L2 construct in alpha module
### Description of how you validated changes
Validated with unit tests and integration tests. Manually verified generated CFN templates as well.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@@ -38,7 +38,10 @@ test phase during the test stage.
38
38
39
39
### Image Pipeline
40
40
41
-
An image pipeline provides the automation framework for building secure AMIs and container images. The pipeline orchestrates the entire image creation process by combining an image recipe or container recipe with infrastructure configuration and distribution configuration. Pipelines can run on a schedule or be triggered manually, and they manage the build, test, and distribution phases automatically.
41
+
An image pipeline provides the automation framework for building secure AMIs and container images. The pipeline
42
+
orchestrates the entire image creation process by combining an image recipe or container recipe with infrastructure
43
+
configuration and distribution configuration. Pipelines can run on a schedule or be triggered manually, and they manage
44
+
the build, test, and distribution phases automatically.
42
45
43
46
#### Image Pipeline Basic Usage
44
47
@@ -139,7 +142,7 @@ const advancedSchedulePipeline = new imagebuilder.ImagePipeline(this, 'AdvancedS
139
142
140
143
#### Image Pipeline Configuration
141
144
142
-
##### Infrastructure and Distribution
145
+
##### Infrastructure and Distribution in Image Pipelines
143
146
144
147
Configure custom infrastructure and distribution settings:
Workflows define the sequence of steps that Image Builder performs during image creation. There are three workflow types: BUILD (image building), TEST (testing images), and DISTRIBUTION (distributing container images).
1307
+
Workflows define the sequence of steps that Image Builder performs during image creation. There are three workflow
1308
+
types: BUILD (image building), TEST (testing images), and DISTRIBUTION (distributing container images).
Lifecycle policies help you manage the retention and cleanup of Image Builder resources automatically. These policies define rules for deprecating or deleting old image versions, managing AMI snapshots, and controlling resource costs by removing unused images based on age, count, or other criteria.
1533
+
Lifecycle policies help you manage the retention and cleanup of Image Builder resources automatically. These policies
1534
+
define rules for deprecating or deleting old image versions, managing AMI snapshots, and controlling resource costs by
1535
+
removing unused images based on age, count, or other criteria.
1331
1536
1332
1537
#### Lifecycle Policy Basic Usage
1333
1538
@@ -1642,7 +1847,7 @@ const disabledPolicy = new imagebuilder.LifecyclePolicy(this, 'DisabledPolicy',
1642
1847
1643
1848
##### Importing Lifecycle Policies
1644
1849
1645
-
Reference lifecycle policies created outside of CDK:
0 commit comments