You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Personally I can only remember about three of the commonly used service principal addresses, but this is something where autocomplete can help out! If we export constants of the Principal structure for each service from the aws.iam namespace, this code could be rewritten:
This has the secondary benefit of being a one-liner, making it less obtrusive to declare directly in the input properties of the resource using the policy, reducing the number of names in scope.
Something to investigate is whether the constants might be better inside the aws.iam package or inside the package for each service with a common name (e.g. aws.ec2.ServicePrincipal, aws.lambda.ServicePrincipal). I am tending towards the former since some services have many principals available (EC2 being a good example), and if several are imported for use without the qualifying namespace they will not conflict.
The text was updated successfully, but these errors were encountered:
jen20
added a commit
to jen20/pulumi-aws
that referenced
this issue
Sep 16, 2018
This commit adds service principals for each of the known AWS services,
in order to assist with autocompletion when writing trust policies for
IAM roles.
Fixespulumi#322.
Since the function
aws.iam.assumeRolePolicyForPrincipal
was introduced, code such as this has been common:Personally I can only remember about three of the commonly used service principal addresses, but this is something where autocomplete can help out! If we export constants of the
Principal
structure for each service from theaws.iam
namespace, this code could be rewritten:This has the secondary benefit of being a one-liner, making it less obtrusive to declare directly in the input properties of the resource using the policy, reducing the number of names in scope.
Something to investigate is whether the constants might be better inside the
aws.iam
package or inside the package for each service with a common name (e.g.aws.ec2.ServicePrincipal
,aws.lambda.ServicePrincipal
). I am tending towards the former since some services have many principals available (EC2 being a good example), and if several are imported for use without the qualifying namespace they will not conflict.The text was updated successfully, but these errors were encountered: