Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p0bailey/3bb66f4cc628bb9fedc5d03d37b7e1c8 to your computer and use it in GitHub Desktop.
Save p0bailey/3bb66f4cc628bb9fedc5d03d37b7e1c8 to your computer and use it in GitHub Desktop.
MalformedPolicyDocument: Invalid principal in policy: "AWS"
terraform apply -var-file=../../aws.tfvars
aws_iam_role.SecurityMonkeyInstanceProfile: Creating...
arn: "" => "<computed>"
assume_role_policy: "" => "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n }"
name: "" => "SecurityMonkeyInstanceProfile"
path: "" => "/"
unique_id: "" => "<computed>"
aws_iam_role.SecurityMonkeyInstanceProfile: Creation complete
aws_iam_role.SecurityMonkey: Creating...
arn: "" => "<computed>"
assume_role_policy: "" => "{\n \"Version\": \"2008-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::097854366011:role/SecurityMonkeyInstanceProfile\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n }"
name: "" => "SecurityMonkey"
path: "" => "/"
unique_id: "" => "<computed>"
Error applying plan:
1 error(s) occurred:
* aws_iam_role.SecurityMonkey: Error creating IAM Role SecurityMonkey: MalformedPolicyDocument: Invalid principal in policy: "AWS":"arn:aws:iam::<ACCOUNT_ID:role/SecurityMonkeyInstanceProfile"
status code: 400, request id: f0b8499b-2d7d-11e6-bd47-f5814282db70
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment