From 60fae60c6aa153134d5146ecd303ad8287c2882d Mon Sep 17 00:00:00 2001 From: roleyfoley Date: Wed, 7 Feb 2024 12:26:00 +1100 Subject: [PATCH] fix(ec2): update ssh key env lookup Updates the ec2 compute task for ssh keys to search all environment settings instead of just the common ones. This ensures that we can get settings from the Settings key in the solution --- .../computetask_awslinux_sshkeys/extension.ftl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/aws/extensions/computetask_awslinux_sshkeys/extension.ftl b/aws/extensions/computetask_awslinux_sshkeys/extension.ftl index 7225eb957..81869e3cb 100644 --- a/aws/extensions/computetask_awslinux_sshkeys/extension.ftl +++ b/aws/extensions/computetask_awslinux_sshkeys/extension.ftl @@ -33,11 +33,14 @@ [#switch linkTargetCore.Type] [#case USER_COMPONENT_TYPE] [#local SSHPublicKeys = linkTargetConfiguration.Solution.SSHPublicKeys ] - [#local linkEnvironment = linkTargetConfiguration.Environment.General ] - [#list SSHPublicKeys as id,publicKey ] - [#if (linkEnvironment[publicKey.SettingName])?has_content ] - [#local SSHPublicKeysContent += [ "${linkEnvironment[publicKey.SettingName]} ${id}" ]] - [/#if] + + [#local linkEnvironments = linkTargetConfiguration.Environment ] + [#list linkEnvironments as id, linkEnvironment ] + [#list SSHPublicKeys as id,publicKey ] + [#if (linkEnvironment[publicKey.SettingName])?has_content ] + [#local SSHPublicKeysContent += [ "${linkEnvironment[publicKey.SettingName]} ${id}" ]] + [/#if] + [/#list] [/#list] [#break] [/#switch]