Ask questionsMalformedPolicyDocument: Policy document should not specify a principal.
Terraform v0.9.2
Please list the resources as a list, for example:
data "aws_iam_policy_document" "trust-assume-role-policy" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com"]
}
principals {
type = "AWS"
identifiers = ["arn:aws:iam::<account-id>:root"]
}
}
}
resource "aws_iam_role_policy" "TrustUser" {
name = "TrustUser"
role = "SomeRole"
policy = "${data.aws_iam_policy_document.trust-assume-role-policy.json}"
}
IAM Role updated with policy
MalformedPolicyDocument: Policy document should not specify a principal.
Please list the steps required to reproduce the issue, for example:
terraform apply
EC2 classic
Answer
questions
hashibot[bot]
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Related questions