Skip to content

Commit 7e7b9b8

Browse files
UnquietCodesean-smith
authored andcommitted
create instance profile when using a provided role
1 parent a846029 commit 7e7b9b8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Diff for: cloudformation/cfncluster.cfn.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,18 @@
19761976
}
19771977
}
19781978
},
1979+
"NewInstanceProfile": {
1980+
"Type": "AWS::IAM::InstanceProfile",
1981+
"Properties": {
1982+
"Path": "/",
1983+
"Roles": [
1984+
{
1985+
"Ref": "EC2IAMRoleName"
1986+
}
1987+
]
1988+
},
1989+
"Condition": "UseEC2IAMRole"
1990+
},
19791991
"CfnClusterPolicies": {
19801992
"Type": "AWS::IAM::Policy",
19811993
"Properties": {
@@ -2427,7 +2439,7 @@
24272439
"Fn::If": [
24282440
"UseEC2IAMRole",
24292441
{
2430-
"Ref": "EC2IAMRoleName"
2442+
"Ref": "NewInstanceProfile"
24312443
},
24322444
{
24332445
"Ref": "RootInstanceProfile"
@@ -3001,7 +3013,7 @@
30013013
"Fn::If": [
30023014
"UseEC2IAMRole",
30033015
{
3004-
"Ref": "EC2IAMRoleName"
3016+
"Ref": "NewInstanceProfile"
30053017
},
30063018
{
30073019
"Ref": "RootInstanceProfile"

0 commit comments

Comments
 (0)