你能帮忙吗。我需要在ruby模板中加入一些自定义管理的策略(join(“:”、“arn:aws:iam”、ref('aws::accountid')、“policy/some-managed-ec2-default-policy”),但不断出现语法错误。尝试了不同的组合后,没有任何效果:(非常感谢任何帮助)。非常感谢。我的代码是
resource 'InstanceRole',
Type: 'AWS::IAM::Role',
Properties: {
Path: '/',
ManagedPolicyArns: {
get_att('CommonPolicies','IDs'),
join(':', 'arn:aws:iam', ref('AWS::AccountId'),'policy/some-managed-ec2-default-policy')
},
AssumeRolePolicyDocument: {
Statement: [
{
Effect: 'Allow',
Principal: { Service: ['ec2.amazonaws.com'] },
Action: ['sts:AssumeRole']
}
]
}
}
我的错误是:
./ec2.rb:293: syntax error, unexpected ',', expecting =>
...et_att('CommonPolicies','IDs'),
... ^
./ec2.rb:295: syntax error, unexpected '}', expecting keyword_end
},
^
./ec2.rb:305: syntax error, unexpected '}', expecting end-of-input
}
^
暂无答案!
目前还没有任何答案,快来回答吧!