I want use the AWS lib but also have some components left-aligned.
When I have this:
@startuml
!include <awslib/AWSCommon>
!include <awslib/General/User>
User(user, "Trusted user", "")
file policy <<policy>> [
{
\t"Action": [
\t\t"sts:AssumeRole"
\t],
\t"Effect": "Allow",
\t"Resource": <b>"arn:aws:iam::1:role/role"</b>
}
]
user -- policy
@enduml
Then everything is center-aligned:

This is because the AWS lib has this skinparam:
skinparam defaultTextAlignment center
If I reset that back to left:
@startuml
!include <awslib/AWSCommon>
!include <awslib/General/User>
skinparam defaultTextAlignment left
User(user, "Trusted user", "")
file policy <<policy>> [
{
\t"Action": [
\t\t"sts:AssumeRole"
\t],
\t"Effect": "Allow",
\t"Resource": <b>"arn:aws:iam::1:role/role"</b>
}
]
user -- policy
@enduml
Then the icon is also left-aligned:

I tried to use HorizontalAlignment, but it seems like it's not working:
@startuml
!include <awslib/AWSCommon>
!include <awslib/General/User>
<style>
file {
HorizontalAlignment left
FontColor blue
}
</style>
User(user, "Trusted user", "")
file policy <<policy>> [
{
\t"Action": [
\t\t"sts:AssumeRole"
\t],
\t"Effect": "Allow",
\t"Resource": <b>"arn:aws:iam::1:role/role"</b>
}
]
user -- policy
@enduml

What is the proper way to keep the center alignment for the AWS icons but have left-aligned for other ones?