Difference between revisions of "Assume role policy"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
− | + | == Related == | |
* [[Terraform resource: aws_iam_role]] | * [[Terraform resource: aws_iam_role]] | ||
* [[aws_iam_policy_attachment]] | * [[aws_iam_policy_attachment]] | ||
− | * [[sts:AssumeRole]] | + | * <code>[[sts:AssumeRole]]</code> |
− | * [[sts:AssumeRoleWithSAML]] | + | * <code>[[sts:AssumeRoleWithSAML]]</code> |
== See also == | == See also == | ||
* {{aws_iam_role_resource}} | * {{aws_iam_role_resource}} | ||
* {{AWS roles}} | * {{AWS roles}} | ||
+ | |||
+ | [[Category:AWS]] |
Revision as of 10:02, 5 July 2024
resource "aws_iam_role" "test_role" { name = "test_role" # Terraform's "jsonencode" function converts a # Terraform expression result to valid JSON syntax. assume_role_policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = "sts:AssumeRole" Effect = "Allow" Sid = "" Principal = { Service = "ec2.amazonaws.com" } }, ] }) tags = { tag-key = "tag-value" } }
Related
See also
aws_iam_role: assume_role_policy, iam:CreateRole
- AWS IAM role, AWS service roles, AWS IAM Roles Anywhere: [
list-roles | get-role | create-role | put-role-policy | create-service-linked-role | attach-role-policy | update-role | add-role-to-instance-profile ], aws ec2 describe-iam-instance-profile-associations ]
, IAM roles for EC2 instances,AWSServiceRoleForAutoScaling
Advertising: