mirror of https://github.com/docker/compose.git
Include volume name in PolicyName to disambiguate
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
06fd442a53
commit
8e847bfd9a
|
@ -385,13 +385,13 @@ func (b *ecsAPIService) createTaskRole(project *types.Project, service types.Ser
|
|||
rolePolicies := []iam.Role_Policy{}
|
||||
if roles, ok := service.Extensions[extensionRole]; ok {
|
||||
rolePolicies = append(rolePolicies, iam.Role_Policy{
|
||||
PolicyName: fmt.Sprintf("%s%sPolicy", normalizeResourceName(project.Name), normalizeResourceName(service.Name)),
|
||||
PolicyName: fmt.Sprintf("%sPolicy", normalizeResourceName(service.Name)),
|
||||
PolicyDocument: roles,
|
||||
})
|
||||
}
|
||||
for _, vol := range service.Volumes {
|
||||
rolePolicies = append(rolePolicies, iam.Role_Policy{
|
||||
PolicyName: fmt.Sprintf("%s%sVolumeMountPolicy", normalizeResourceName(project.Name), normalizeResourceName(service.Name)),
|
||||
PolicyName: fmt.Sprintf("%s%sVolumeMountPolicy", normalizeResourceName(service.Name), normalizeResourceName(vol.Source)),
|
||||
PolicyDocument: volumeMountPolicyDocument(vol.Source, resources.filesystems[vol.Source].ARN()),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue