Skip to content

Commit

Permalink
update AMI parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Lynch committed Jan 26, 2021
1 parent a42e37a commit d081580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constructs/autoscaling/asg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
4 changes: 2 additions & 2 deletions src/constructs/autoscaling/asg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, U> to remove them from the interface this extends
Expand All @@ -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",
});

Expand Down

0 comments on commit d081580

Please sign in to comment.