mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(cloudformation): resolve IAM assume role policy intrinsics (#2630)
This commit is contained in:
1 parent
2e5935d764
commit
6a1d86e43f
2 files changed
+98
-8
No files matched your search
+8
-3
@@ -58,9 +58,14 @@ public class IamRoleCfnProvisioner implements CfnResourceProvisioner {
|
||||
throw new AwsException("ValidationError",
|
||||
"Updating RoleName requires resource replacement, which is not supported.", 400);
|
||||
}
|
||||
String assumeDoc = props != null && props.has("AssumeRolePolicyDocument")
|
||||
? props.get("AssumeRolePolicyDocument").toString()
|
||||
: "{\"Version\":\"2012-10-17\",\"Statement\":[]}";
|
||||
String assumeDoc = props == null
|
||||
? null
|
||||
: ctx.engine().resolveJsonAttribute(props.path("AssumeRolePolicyDocument"));
|
||||
|
||||
if (assumeDoc == null) {
|
||||
assumeDoc = "{\"Version\":\"2012-10-17\",\"Statement\":[]}";
|
||||
}
|
||||
|
||||
String path = ctx.resolveOptional(props, "Path");
|
||||
if (path == null) {
|
||||
path = "/";
|
||||
|
||||
Reference in new issue
Block a user