From 2fb6f3a34df1682e1c457bc8b8220d533786c16b Mon Sep 17 00:00:00 2001 From: Guslington Date: Wed, 22 Sep 2021 13:12:19 +1000 Subject: [PATCH] add sg rule to allow ssh access to packer instances --- jenkins-ec2-agents.cfndsl.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jenkins-ec2-agents.cfndsl.rb b/jenkins-ec2-agents.cfndsl.rb index acc8863..f1fddb4 100644 --- a/jenkins-ec2-agents.cfndsl.rb +++ b/jenkins-ec2-agents.cfndsl.rb @@ -39,6 +39,14 @@ ]) Tags agent_tags } + + EC2_SecurityGroupIngress(:SelfSSHIngressRule) { + Description 'ssh access for packer instances' + FromPort 22 + ToPort 22 + IpProtocol 'TCP' + SourceSecurityGroupId Ref(:SecurityGroup) + } Resource(:LinuxAmiFinder) { Type 'Custom::LinuxAmiFinder'