Created
September 26, 2017 23:52
-
-
Save ScreamingHawk/fa18dac64972f89c1fc03edecc017959 to your computer and use it in GitHub Desktop.
Revisions
-
ScreamingHawk created this gist
Sep 26, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ { "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "AdminName": { "NoEcho": "false", "Type": "String", "Description": "New admin account name", "MinLength": "1", "MaxLength": "41", "AllowedPattern": "[a-zA-Z0-9]*", "ConstraintDescription": "Must contain only alphanumeric characters." }, "AdminPassword": { "NoEcho": "true", "Type": "String", "Description": "New admin account password", "MinLength": "16", "MaxLength": "41", "AllowedPattern": "[a-zA-Z0-9]*", "ConstraintDescription": "Must contain only alphanumeric characters." } }, "Resources": { "AdminUser": { "Type": "AWS::IAM::User", "Properties": { "Groups": [ { "Ref": "AdminGroup" } ], "UserName": { "Ref": "AdminName" }, "LoginProfile": { "Password": { "Ref": "AdminPassword" } } } }, "AdminGroup": { "Type": "AWS::IAM::Group", "Properties": { "GroupName": "Admin", "ManagedPolicyArns": [ "arn:aws:iam::aws:policy/AdministratorAccess" ] } }, "AdminKey": { "Type": "AWS::IAM::AccessKey", "Properties": { "UserName": { "Ref": "AdminUser" } } "DependsOn": [ "AdminUser" ] } }, "Outputs": { "AccessKey": { "Value": { "Ref": "AdminKey" }, "Description": "AWSAccessKeyId of admin user" }, "SecretKey": { "Value": { "Fn::GetAtt": [ "AdminKey", "SecretAccessKey" ] }, "Description": "AWSSecretKey of admin user" } } }