Skip to content

Commit

Permalink
Merge pull request #207 from guardian/jl/ami-param
Browse files Browse the repository at this point in the history
Update AMI parameter
  • Loading branch information
Jamie Lynch authored Jan 27, 2021
2 parents a42e37a + d081580 commit 62802ba
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 62802ba

Please sign in to comment.