Skip to content

Commit e52ab28

Browse files
committed
Add reference about AWS IAM policy requirements
This adds a note in the `aws_iam_policy_document` documentation that `resources` is required by AWS if used on an IAM policy. Also added a note on `aws_iam_policy` that `aws_iam_policy_document` is a good thing to use when configuring. Closes hashicorp#9002
1 parent 888333f commit e52ab28

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

website/source/docs/providers/aws/d/iam_policy_document.html.markdown

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ each accept the following arguments:
8888
apply to. Used to apply a policy statement to all actions *except* those
8989
listed.
9090
* `resources` (Optional) - A list of resource ARNs that this statement applies
91-
to.
91+
to. This is required by AWS if used for an IAM policy.
9292
* `not_resources` (Optional) - A list of resource ARNs that this statement
9393
does *not* apply to. Used to apply a policy statement to all resources
9494
*except* those listed.
@@ -139,4 +139,3 @@ should be processed by AWS rather than by Terraform.
139139
The following attribute is exported:
140140

141141
* `json` - The above arguments serialized as a standard JSON policy document.
142-

website/source/docs/providers/aws/r/iam_policy.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ The following arguments are supported:
3939
* `description` - (Optional) Description of the IAM policy.
4040
* `path` - (Optional, default "/") Path in which to create the policy.
4141
* `policy` - (Required) The policy document. This is a JSON formatted string.
42-
The heredoc syntax or `file` function is helpful here.
42+
The heredoc syntax, `file` function, or the [`aws_iam_policy_document` data
43+
source](/docs/providers/aws/d/iam_policy_document.html)
44+
are all helpful here.
4345
* `name` (Required) - The name of the policy.
4446

4547
## Attributes Reference

0 commit comments

Comments
 (0)