Skip to content

Latest commit

 

History

History
219 lines (129 loc) · 8.61 KB

File metadata and controls

219 lines (129 loc) · 8.61 KB

API Reference

Constructs

ImageBuilder

Initializers

import { ImageBuilder } from '@cloudadder/cdk-ec2-imagebuilder'

new ImageBuilder(scope: Construct, id: string, props: ImageBuilderProps)
Name Type Description
scope* constructs.Construct No description.
id* string No description.
props* @cloudadder/cdk-ec2-imagebuilder.ImageBuilderProps No description.

scopeRequired

idRequired
  • Type: string

propsRequired

Structs

ImageBuilderProps

Initializer

import { ImageBuilderProps } from '@cloudadder/cdk-ec2-imagebuilder'

const imageBuilderProps: ImageBuilderProps = { ... }

Properties

Name Type Description
amiName* string The AMI name.
componentsFolder* string Local folder name including path which contains the component yaml files.
id* string The id to use as a name suffix to identify resources in AWS.
securityGroupIds* string[] The securityGroupIds to use for the build.
subnetId* string The subnet id to use for the build.
version* string Version to use in the metadata of the build.
componentsManagedByAWS string[] A list of AWS managed component arns to be used in the image recipe.
instanceTypes string[] The instance types to use for the build.
parentImage string Parent AMI Image Arn.
scheduleExpression string The scheduleExpression for creating a refresh schedule of the AMI in cron format 0 0 * * ? *.
shareAccountIds string[] The account ids to share the AMI with.

amiNameRequired
public readonly amiName: string;
  • Type: string

The AMI name.


componentsFolderRequired
public readonly componentsFolder: string;
  • Type: string

Local folder name including path which contains the component yaml files.

e.g. './src/components'


idRequired
public readonly id: string;
  • Type: string

The id to use as a name suffix to identify resources in AWS.


securityGroupIdsRequired
public readonly securityGroupIds: string[];
  • Type: string[]

The securityGroupIds to use for the build.

A single subnet id is enough to allow access to the build instance. The subnet must support ssm agent installation


subnetIdRequired
public readonly subnetId: string;
  • Type: string

The subnet id to use for the build.


versionRequired
public readonly version: string;
  • Type: string

Version to use in the metadata of the build.

AWS requires a version unique to the build, therefore incrementing the version number is required for each deployment.


componentsManagedByAWSOptional
public readonly componentsManagedByAWS: string[];
  • Type: string[]

A list of AWS managed component arns to be used in the image recipe.

e.g. In the console under EC2 Image Builder->Components-reboot-linux you will find the arn of the reboot-linux component.


instanceTypesOptional
public readonly instanceTypes: string[];
  • Type: string[]
  • Default: [t3.medium]

The instance types to use for the build.


parentImageOptional
public readonly parentImage: string;
  • Type: string
  • Default: the latest Amazon Linux 2 AMI 'arn:aws:imagebuilder:' + Stack.of(this).region + ':aws:image/amazon-linux-2-x86/x.x.x'

Parent AMI Image Arn.


scheduleExpressionOptional
public readonly scheduleExpression: string;
  • Type: string
  • Default: No schedule

The scheduleExpression for creating a refresh schedule of the AMI in cron format 0 0 * * ? *.


shareAccountIdsOptional
public readonly shareAccountIds: string[];
  • Type: string[]

The account ids to share the AMI with.