Skip to content

Commit

Permalink
Add root role for instance profile
Browse files Browse the repository at this point in the history
Don't know what this does...
  • Loading branch information
mwunsch committed Jul 5, 2016
1 parent bd2ea65 commit 516d5e6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions formation.json
Expand Up @@ -11,6 +11,7 @@
"Compute": {
"Type": "AWS::EC2::Instance",
"Properties": {
"IamInstanceProfile": { "Ref": "InstanceProfile" },
"ImageId": "ami-05dddc6f",
"InstanceType": "t2.micro",
"KeyName": { "Ref": "KeyName" },
Expand Down Expand Up @@ -56,6 +57,38 @@
},
"ObjectStorage": {
"Type": "AWS::S3::Bucket"
},
"InstanceProfile": {
"Type": "AWS::IAM::InstanceProfile",
"Properties": {
"Path": "/",
"Roles": [{"Ref": "RootRole"}]
}
},
"RootRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "Service": ["ec2.amazonaws.com"] },
"Action": ["sts:AssumeRole"]
}]
},
"Path": "/",
"Policies": [{
"PolicyName": "root",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}]
}
}]
}
}
},
"Outputs": {
Expand Down

0 comments on commit 516d5e6

Please sign in to comment.