aws-samples / startup-kit-templates

CloudFormation templates to accelerate getting started on AWS.
Apache License 2.0
815 stars 400 forks source link

Bastion issue #2

Closed rodrigoSyscop closed 7 years ago

rodrigoSyscop commented 7 years ago

I'm getting some issues when trying to use the bastion.cfn.yml cloud formation template:

CREATE FAILED "You must specify an allocation id when mapping an address to a VPC instance"

ROLLBACK_IN_PROGRESS Next I got "Rollback in progress" alert and that message: The following resource(s) failed to create: [BastionEIP]. . Rollback requested by user.

Am I doing something wrong? Or there is a bug on bastion template?

rabowskyb commented 7 years ago

Hello,

I just did a git pull, then used the CloudFormation console to create a new VPC from the VPC template, then successfully created a new bastion using the bastion template. I didn't experience that bug.

Did you use the CloudFormation console, or a CLI command when you tried to create the bastion?

Also, when you tried to create the bastion, when it asked for NetworkStackName, did you enter the exact name of the VPC stack created by vpc.cfn.yml as shown in the CloudFormation console or CLI output? I assume you used the vpc.cfn.yml template to create your VPC/network stack first before you tried to create the bastion?

rabowskyb commented 7 years ago

One other thought: are you on an AWS account that is older and supports EC2 Classic (pre-VPC, i.e. you can set up your instances without being in a VPC)? If so, try the following modification to the bastion.cfn.yml template and see if it works -- if so, I'll push a change to the template. (The change is one line, it adds a Domain property to the end of the BastionEIP resource)

BastionEIP: Type: AWS::EC2::EIP Properties: InstanceId: !Ref BastionHost Domain: vpc

rabowskyb commented 7 years ago

BTW, I merged in the above change to the bastion template since that change is necessary in any case.

rodrigoSyscop commented 7 years ago

I was using CloudFormation console when tried creating bastion stack. And yes, I'm sure that I've used the right name on NetworkStackName when asked.

The Domain: vpc change worked like a charm. My account is a very old one that supports classic instances. Good catch!

Thank you @rabowskyb.