Skip to content

Commit

Permalink
fix(ec2): update ssh key env lookup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
roleyfoley committed Feb 7, 2024
1 parent 20c913a commit 60fae60
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions aws/extensions/computetask_awslinux_sshkeys/extension.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 60fae60

Please sign in to comment.