diff --git a/src/AWS.Deploy.CLI/Commands/TypeHints/ExistingSecurityGroupsCommand.cs b/src/AWS.Deploy.CLI/Commands/TypeHints/ExistingSecurityGroupsCommand.cs index 1dcd0f39f..3ff382ebd 100644 --- a/src/AWS.Deploy.CLI/Commands/TypeHints/ExistingSecurityGroupsCommand.cs +++ b/src/AWS.Deploy.CLI/Commands/TypeHints/ExistingSecurityGroupsCommand.cs @@ -52,7 +52,7 @@ public async Task GetResources(Recommendation recommendat foreach (var securityGroup in securityGroups.OrderBy(securityGroup => securityGroup.VpcId)) { - var row = new TypeHintResource(securityGroup.GroupId, securityGroup.GroupId); + var row = new TypeHintResource(securityGroup.GroupId, $"{securityGroup.GroupName} ({securityGroup.GroupId})"); row.ColumnValues.Add(securityGroup.GroupName); row.ColumnValues.Add(securityGroup.GroupId); row.ColumnValues.Add(securityGroup.VpcId); diff --git a/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/ExistingSecurityGroubsCommandTest.cs b/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/ExistingSecurityGroubsCommandTest.cs index e11f16a19..f36c3af8b 100644 --- a/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/ExistingSecurityGroubsCommandTest.cs +++ b/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/ExistingSecurityGroubsCommandTest.cs @@ -68,15 +68,16 @@ public async Task GetResources() { new SecurityGroup() { - GroupId = "group1" + GroupId = "group1-id", + GroupName = "group1-name" } }); var resources = await command.GetResources(appRunnerRecommendation, securityGroupsOptionSetting); Assert.Single(resources.Rows); - Assert.Equal("group1", resources.Rows[0].DisplayName); - Assert.Equal("group1", resources.Rows[0].SystemName); + Assert.Equal("group1-name (group1-id)", resources.Rows[0].DisplayName); + Assert.Equal("group1-id", resources.Rows[0].SystemName); } [Fact]