diff --git a/src/constructs/autoscaling/asg.test.ts b/src/constructs/autoscaling/asg.test.ts index bfac9d2a8c..94beb24d19 100644 --- a/src/constructs/autoscaling/asg.test.ts +++ b/src/constructs/autoscaling/asg.test.ts @@ -30,7 +30,7 @@ describe("The GuAutoScalingGroup", () => { expect(json.Parameters.AMI).toEqual({ Description: "AMI ID", - Type: "String", + Type: "AWS::EC2::Image::Id", }); expect(stack).toHaveResource("AWS::AutoScaling::LaunchConfiguration", { diff --git a/src/constructs/autoscaling/asg.ts b/src/constructs/autoscaling/asg.ts index 29c039d89c..65e791b0ba 100644 --- a/src/constructs/autoscaling/asg.ts +++ b/src/constructs/autoscaling/asg.ts @@ -4,7 +4,7 @@ import type { ISecurityGroup, MachineImage, MachineImageConfig } from "@aws-cdk/ import { InstanceType, OperatingSystemType, UserData } from "@aws-cdk/aws-ec2"; import type { ApplicationTargetGroup } from "@aws-cdk/aws-elasticloadbalancingv2"; import type { GuStack } from "../core"; -import { GuInstanceTypeParameter, GuStringParameter } from "../core"; +import { GuAmiParameter, GuInstanceTypeParameter } from "../core"; // Since we want to override the types of what gets passed in for the below props, // we need to use Omit to remove them from the interface this extends @@ -21,7 +21,7 @@ export interface GuAutoScalingGroupProps export class GuAutoScalingGroup extends AutoScalingGroup { constructor(scope: GuStack, id: string, props: GuAutoScalingGroupProps) { - const imageId = new GuStringParameter(scope, "AMI", { + const imageId = new GuAmiParameter(scope, "AMI", { description: "AMI ID", });