I'm trying to create a policy following the Terraform documentation
resource "aws_iam_policy" "policy" {
name = "test_policy"
path = "/"
description = "My test policy"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = [
"ec2:Describe*",
]
Effect = "Allow"
Resource = "*"
},
]
})
}
Unfortunately, there is no description of how to include tags. I'm not able to do it such as I did with the rest of the resources, even when I can provide that manually from the AWS Management Console.
The tags setting does not seem to be working. I'm receiving an error if I try to do the same I did with an IAM role, including:
tags = {
tag-key = "tag-value"
}