2 個答案
- 最新
- 最多得票
- 最多評論
3
This should do it
resource "aws_iam_role" "role_identifier" {
name = var.role_name
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = "sts:AssumeRole"
Effect = "Allow"
Sid = ""
Principal = {
Service = "ec2.amazonaws.com"
}
},
]
})
}
0
Hi,
Your policy contains two statements. The first part has Principal but the second part only has the following:
{ Action = "AssumeRole", Effect = "Allow" }
This second part needs to be cleaned up as it looks like it is not required.
已回答 7 個月前
相關內容
- 已提問 1 年前
- 已提問 7 個月前
- AWS 官方已更新 7 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前