cloudformation-cli icon indicating copy to clipboard operation
cloudformation-cli copied to clipboard

cfn init should enforce namespace restrictions

Open richardhboyd opened this issue 5 years ago • 3 comments
trafficstars

If I attempt to create a Resource with a reserved name, I should be warned or the CLI should refuse the input.

Initializing new project
What's the name of your resource type?
(Organization::Service::Resource)
>> AWS::Cloud9::Membership
Select a language for code generation:
[1] python36
[2] python37
(enter an integer): 
>> 2
Use docker for platform-independent packaging (Y/n)?
This is highly recommended unless you are experienced 
with cross-platform Python packaging.
>> Y
Initialized a new project in /home/ec2-user/aws-cloud9-membership

richardhboyd avatar May 02 '20 19:05 richardhboyd

the CLI should refuse the input

can't do this because it's used to create the resource types in the reserved namespaces

PatMyron avatar May 16 '20 05:05 PatMyron

Is there anything you can do to add friction to using the reserved namespace? Such as requiring —reserved flag or a second prompt after the user supplied the resource name to confirm that the namespace is reserved.

richardhboyd avatar May 16 '20 12:05 richardhboyd

should be warned

I'd be okay with this

PatMyron avatar May 16 '20 15:05 PatMyron