Cloud Group Group Name

Using the SecurityGroup cloud system is it possible to set the GroupName value or should it be provided through cloudformation ?.

The final format of the name is quite long and does not look beautiful, nor is it suitable for finding it on the command line.

I know that I can use tags, but still do not understand why AWS does not allow us to add it, I think, because they are lazy and do not want to check.

Sincerely.

+5
source share
2 answers

[Updated Jun 26, 2017] Starting April 28, 2017, you can now specify your own name for the EC2 security group using CloudFormation using GroupName on the AWS::EC2::SecurityGroup resource.

Thanks surenyonjan for comment for this update.


[Original answer December 23, 2016] - No, it is currently not possible to provide a custom name for the EC2 security group using CloudFormation.

According to AWS::EC2::SecurityGroup resource documentation does not have an available Name or GroupName property. You can specify tags using the Tags property as an alternative, as you indicated.

Recently, some CloudFormation resources began supporting custom names using the Name property. For a complete list of supported resources, see the Type Name section in the documentation.

AWS::EC2::SecurityGroup not one of the resources that support user names. As to why, apparently, this is due to the fact that this CloudFormation resource is an earlier version created before user names were supported by the service.

It is possible that AWS will eventually return and update all existing CloudFormation resources with username support at some point if enough users ask them to do so. If this is an important feature for your use case, I recommend contacting their products / support groups with a feature request to help them make it a higher priority.

+2
source

You can set a name for SecurityGroup by adding a tag with the key "Name", for example:

 "MySecurityGroup": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "GroupDescription": "Allow http", "SecurityGroupIngress": [ {"IpProtocol": "tcp", "FromPort": "80", "ToPort": "80", "CidrIp": "0.0.0.0/0"} ], "Tags": [ {"Key": "Name", "Value": "MySecurityGroup"}, ] } }, 
+1
source

All Articles