diff --git a/aws/cloudformation-template-ipsec b/aws/cloudformation-template-ipsec index 8ad03a4..1a488d0 100644 --- a/aws/cloudformation-template-ipsec +++ b/aws/cloudformation-template-ipsec @@ -320,6 +320,11 @@ }, "VpnInstance": { "Type": "AWS::EC2::Instance", + "CreationPolicy": { + "ResourceSignal": { + "Timeout": "PT10M" + } + }, "Properties": { "UserData": { "Fn::Base64": { @@ -343,7 +348,20 @@ }, "'\n", "sleep 60\n", - "wget https://git.io/vpnsetup -O vpnsetup.sh && sh vpnsetup.sh\n" + "wget https://git.io/vpnsetup -O vpnsetup.sh && sh vpnsetup.sh\n", + "apt-get install python3-pip -y\n", + "pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz\n", + "cfn-signal ", + "--stack ", + { + "Ref": "AWS::StackName" + }, + " --resource VpnInstance ", + " --region ", + { + "Ref": "AWS::Region" + }, + "\n" ] ] }