Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Existing VPC template fails if a default VPC doesn't exist #72

Open
medavisjr opened this issue Jul 27, 2022 · 0 comments
Open

Existing VPC template fails if a default VPC doesn't exist #72

medavisjr opened this issue Jul 27, 2022 · 0 comments

Comments

@medavisjr
Copy link

medavisjr commented Jul 27, 2022

Note: I'm crossposting this here, as it doesn't look like the Aerospike team is maintaining their CloudFormation repo where I originally posted this issue.

There are some serious issues with how the Marketplace products for these Aerospike deployments have been configured and are being maintained (or not being maintained?). Essentially, Aerospike has one product cross-contaminated with another product's AMIs, and it's resulting in bad experiences for users. My hope is that the Quick Start team can work with Aerospike to resolve these issues, for the sake of both parties as well as their mutual customers.


If you run the Existing VPC CloudFormation template in an account that doesn't have a default VPC (e.g. the admin is good and removed the default VPC), the PsuedoRandom resource fails to create with the following error:

No default VPC for this user (Service: AmazonEC2; Status Code: 400; Error Code: VPCIdNotSpecified; Request ID: 1a4dcb4e-26a0-47b9-81da-8a7a711c217d; Proxy: null)

This is because the AWS::EC2::SecurityGroup CF resource uses the default VPC in the region if no VpcId parameter value is provided to it. If no default VPC exists, it bombs out.

The correct way to do this would be to specify the VpcId property in the PsuedoRandom resource and assign it the value of the VPCID stack parameter.

Also, you misspelled "pseudo" in the PsuedoRandom resource name!

This whole thing of creating a resource to generate a UID is not a good approach, IMO. If you want a UID for labelling/naming resources in the stack, just use AWS::StackId and grab the ID from the ARN it outputs using a split:

Value: !Select [2, !Split ['/', !Ref AWS::StackId]]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant