You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Copy and paste the contents of the `variables.tf` file [here](https://github.com/kmcquade/terraform-aws-policy-sentry/blob/master/examples/demo/variables.tf) into your directory.
467
-
468
-
* Create a `terraform.tfvars` file in your directory with the following contents:
469
-
470
-
terraform.tfvars:
471
-
```hcl
472
-
name = "PolicySentryTest"
473
-
474
-
list_access_level = [
475
-
"arn:aws:s3:::example-org",
476
-
]
477
-
478
-
read_access_level = [
479
-
"arn:aws:kms:us-east-1:123456789012:key/shaq"
480
-
]
481
-
482
-
write_access_level = [
483
-
"arn:aws:kms:us-east-1:123456789012:key/shaq"
484
-
]
485
-
```
486
-
487
-
* Run `terraform apply` once to create the JSON policy file.
488
-
489
-
* Run `terraform apply`**again** (from the same directory) to create the IAM policy.
490
-
491
-
For the full example, including GIFs depicting real output, see the README for the Terraform module [here](https://github.com/kmcquade/terraform-aws-policy-sentry).
445
+
The Terraform module is published and maintained [here](https://github.com/salesforce/policy_sentry/tree/master/terraform_module).
Copy file name to clipboardExpand all lines: terraform_module/README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# terraform-aws-policy-sentry
1
+
# Policy Sentry Terraform Module
2
2
3
3
Builds secure IAM Policies with resource constraints. For more information on Policy Sentry, see [the documentation](https://policy-sentry.readthedocs.io/en/latest/).
4
4
5
5
## Prerequisites
6
6
7
7
* You must have Policy Sentry 0.10.0 installed beforehand and it must be executable from your `$PATH`. Follow the installation instructions [here](https://policy-sentry.readthedocs.io/en/latest/user-guide/installation.html)
8
-
* This module currently requires Terraform 0.12.8
8
+
* This module requires Terraform 0.12.8 or higher. It has been tested through 0.13.5.
9
9
10
10
## Usage
11
11
@@ -69,7 +69,7 @@ write_access_level = [
69
69
70
70
| Name | Version |
71
71
|------|---------|
72
-
| terraform |~> 0.12.8 |
72
+
| terraform |>= 0.12.8 |
73
73
| aws |~> 2.48.0 |
74
74
| external |~> 1.2 |
75
75
| local |~> 1.3 |
@@ -85,12 +85,14 @@ No provider.
85
85
| Name | Description | Type | Default | Required |
| description | The description to include for the IAM policy. |`string`|`"Generated by Policy Sentry"`| no |
88
+
| exclude\_actions | Exclude actions from the output by specifying them here. Accepts wildcards, like kms:Delete\*|`list(string)`|`[]`| no |
88
89
| list\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs LIST access to. |`list(string)`|`[]`| no |
89
-
| minimize | If set to true, it will minimize the size of the IAM Policy file. Defaults to false. |`bool`|`false`| no |
90
+
| minimize | If set to true, it will minimize the size of the IAM Policy file. Defaults to TRUE. |`bool`|`true`| no |
90
91
| name | The name of the rendered policy file (no file extension). |`string`| n/a | yes |
91
92
| permissions\_management\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs PERMISSIONS MANAGEMENT access to. |`list(string)`|`[]`| no |
92
93
| read\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs READ access to. |`list(string)`|`[]`| no |
93
94
| region | The AWS region for these resources. Defaults to us-east-1 |`string`|`"us-east-1"`| no |
95
+
| skip\_resource\_constraints | Skip resource constraint requirements by listing individual actions here, like s3:GetObject. |`list(string)`|`[]`| no |
94
96
| tagging\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs TAGGING access to. |`list(string)`|`[]`| no |
95
97
| wildcard\_only\_list\_service | To generate a list of AWS service actions that (1) are at the LIST access level and (2) do not support resource constraints, list the service prefix here. |`list(string)`|`[]`| no |
96
98
| wildcard\_only\_permissions\_management\_service | To generate a list of AWS service actions that (1) are at the PERMISSIONS MANAGEMENT access level and (2) do not support resource constraints, list the service prefix here. |`list(string)`|`[]`| no |
| exclude\_actions | Exclude actions from the output by specifying them here. Accepts wildcards, like kms:Delete\*|`list(string)`|`[]`| no |
24
25
| list\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs LIST access to. |`list(string)`|`[]`| no |
25
26
| minimize | If set to true, it will minimize the size of the IAM Policy file. Defaults to false. |`bool`|`false`| no |
26
27
| name | The name of the rendered policy file (no file extension). |`string`| n/a | yes |
27
28
| permissions\_management\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs PERMISSIONS MANAGEMENT access to. |`list(string)`|`[]`| no |
28
29
| read\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs READ access to. |`list(string)`|`[]`| no |
30
+
| skip\_resource\_constraints | Skip resource constraint requirements by listing individual actions here, like s3:GetObject. |`list(string)`|`[]`| no |
29
31
| tagging\_access\_level | Provide a list of Amazon Resource Names (ARNs) that your role needs TAGGING access to. |`list(string)`|`[]`| no |
30
32
| wildcard\_only\_list\_service | To generate a list of AWS service actions that (1) are at the LIST access level and (2) do not support resource constraints, list the service prefix here. |`list(string)`|`[]`| no |
31
33
| wildcard\_only\_permissions\_management\_service | To generate a list of AWS service actions that (1) are at the PERMISSIONS MANAGEMENT access level and (2) do not support resource constraints, list the service prefix here. |`list(string)`|`[]`| no |
0 commit comments