Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AMI parameter #207

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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