Skip to content

Commit de12e51

Browse files
authored
Cleanup (#2)
1 parent 59527e8 commit de12e51

File tree

7 files changed

+90
-49
lines changed

7 files changed

+90
-49
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
addons:
2+
apt:
3+
packages:
4+
- git
5+
- make
6+
- curl
7+
8+
install:
9+
- make init
10+
11+
script:
12+
- make terraform/install
13+
- make terraform/get-plugins
14+
- make terraform/get-modules
15+
- make terraform/lint
16+
- make terraform/validate

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@
178178
APPENDIX: How to apply the Apache License to your work.
179179

180180
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "[]"
181+
boilerplate notice, with the fields enclosed by brackets "{}"
182182
replaced with your own identifying information. (Don't include
183183
the brackets!) The text should be enclosed in the appropriate
184184
comment syntax for the file format. We also recommend that a
185185
file or class name and description of purpose be included on the
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2018 Cloud Posse, LLC
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,44 @@ resource "aws_iam_policy" "ps_manage" {
113113

114114

115115

116+
## Inputs
117+
118+
| Name | Description | Type | Default | Required |
119+
|------|-------------|:----:|:-----:|:-----:|
120+
| account_id | The account id of the parameter store you want to allow access to. If none supplied, it uses the current account id of the provider. | string | `` | no |
121+
| kms_key | The arn of the KMS key that you want to allow access to. If empty it uses a wildcard resource (`*`). | string | `` | no |
122+
| parameter_root_name | The prefix or root parameter that you want to allow access to. | string | `` | no |
123+
| region | The region of the parameter store value that you want to allow access to. If none supplied, it uses the current region of the provider. | string | `` | no |
124+
125+
## Outputs
126+
127+
| Name | Description |
128+
|------|-------------|
129+
| manage_kms_store_policy | A JSON policy document that allows decryption access to a KMS key. |
130+
| manage_parameter_store_policy | A JSON policy document that allows full access to the parameter store. |
131+
| put_xray_trace_policy | A JSON policy document that allows putting data into x-ray for tracing parameter store requests. |
132+
| read_parameter_store_policy | A JSON policy document that only allows read access to the parameter store. |
133+
| write_parameter_store_policy | A JSON policy document that only allows write access to the parameter store. |
134+
135+
## Makefile Targets
136+
```
137+
Available targets:
138+
139+
help This help screen
140+
help/all Display help for all targets
141+
lint Lint terraform code
142+
143+
```
144+
145+
116146

117147
## Related Projects
118148

119149
Check out these related projects.
120150

121-
- [terraform-aws-ssm-parameter-store](https://github.com/cloudposse/terraform-aws-ssm-parameter-store) - AWS SSM Parameter Store module
151+
- [terraform-aws-ssm-parameter-store](https://github.com/cloudposse/terraform-aws-ssm-parameter-store) - Terraform module to populate AWS Systems Manager (SSM) Parameter Store with values from Terraform. Works great with Chamber.
152+
- [terraform-aws-ssm-iam-role](https://github.com/cloudposse/terraform-aws-ssm-iam-role) - Terraform module to provision an IAM role with configurable permissions to access SSM Parameter Store
153+
- [terraform-aws-kms-key](https://github.com/cloudposse/terraform-aws-kms-key) - Terraform module to provision a KMS key with alias
122154

123155

124156
## Help
@@ -223,13 +255,13 @@ Check out [our other projects][github], [apply for a job][jobs], or [hire us][hi
223255

224256
### Contributors
225257

226-
| [![Erik Osterman][osterman_avatar]](osterman_homepage)<br/>[Erik Osterman][osterman_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]](Jamie-BitFlight_homepage)<br/>[Jamie Nelson][Jamie-BitFlight_homepage] | [![Sarkis Varozian][sarkis_avatar]](sarkis_homepage)<br/>[Sarkis Varozian][sarkis_homepage] |
258+
| [![Jamie Nelson][Jamie-BitFlight_avatar]](Jamie-BitFlight_homepage)<br/>[Jamie Nelson][Jamie-BitFlight_homepage] | [![Erik Osterman][osterman_avatar]](osterman_homepage)<br/>[Erik Osterman][osterman_homepage] | [![Sarkis Varozian][sarkis_avatar]](sarkis_homepage)<br/>[Sarkis Varozian][sarkis_homepage] |
227259
|---|---|---|
228260

229-
[osterman_homepage]: https://github.com/osterman
230-
[osterman_avatar]: http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144
231261
[Jamie-BitFlight_homepage]: https://github.com/Jamie-BitFlight
232262
[Jamie-BitFlight_avatar]: https://avatars0.githubusercontent.com/u/25075504?s=144&u=ac7e53bda3706cb9d51907808574b6d342703b3e&v=4
263+
[osterman_homepage]: https://github.com/osterman
264+
[osterman_avatar]: http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144
233265
[sarkis_homepage]: https://github.com/sarkis
234266
[sarkis_avatar]: https://avatars3.githubusercontent.com/u/42673?s=144&v=4
235267

README.yaml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# Name of this project
88
name: terraform-aws-ssm-parameter-store-policy-documents
99

10-
# Logo for this project
11-
#logo: docs/logo.png
12-
1310
# License of this project
1411
license: "APACHE2"
1512

@@ -30,17 +27,21 @@ badges:
3027

3128
related:
3229
- name: "terraform-aws-ssm-parameter-store"
33-
description: "AWS SSM Parameter Store module"
30+
description: "Terraform module to populate AWS Systems Manager (SSM) Parameter Store with values from Terraform. Works great with Chamber."
3431
url: "https://github.com/cloudposse/terraform-aws-ssm-parameter-store"
35-
36-
32+
- name: "terraform-aws-ssm-iam-role"
33+
description: "Terraform module to provision an IAM role with configurable permissions to access SSM Parameter Store"
34+
url: "https://github.com/cloudposse/terraform-aws-ssm-iam-role"
35+
- name: "terraform-aws-kms-key"
36+
description: "Terraform module to provision a KMS key with alias"
37+
url: "https://github.com/cloudposse/terraform-aws-kms-key"
3738

3839
# Short description of this project
3940
description: |-
4041
This module generates JSON documents for restricted permission sets for AWS SSM Parameter Store access.
4142
Helpful when combined with [terraform-aws-ssm-parameter-store](https://github.com/cloudposse/terraform-aws-ssm-parameter-store)
42-
# How to use this project
4343
44+
# How to use this project
4445
examples: |-
4546
Create a policy that allows access to write all parameters
4647
```hcl
@@ -127,30 +128,22 @@ examples: |-
127128
}
128129
```
129130
130-
# Example usage
131-
#examples: |-
132-
# Example goes here...
133-
134-
# How to get started quickly
135-
#quickstart: |-
136-
# Here's how to get started...
137-
138131
# Other files to include in this README from the project folder
139-
# include:
140-
# - "docs/variables.md"
141-
# - "docs/outputs.md"
132+
include:
133+
- "docs/terraform.md"
134+
- "docs/targets.md"
142135

143136
# Contributors to this project
144137
contributors:
145-
- name: "Erik Osterman"
146-
homepage: "https://github.com/osterman"
147-
avatar: "http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144"
148-
github: "osterman"
149138
- name: "Jamie Nelson"
150139
homepage: "https://github.com/Jamie-BitFlight"
151140
avatar: "https://avatars0.githubusercontent.com/u/25075504?s=144&u=ac7e53bda3706cb9d51907808574b6d342703b3e&v=4"
152141
github: "Jamie-BitFlight"
142+
- name: "Erik Osterman"
143+
homepage: "https://github.com/osterman"
144+
avatar: "http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144"
145+
github: "osterman"
153146
- name: "Sarkis Varozian"
154147
homepage: "https://github.com/sarkis"
155148
avatar: "https://avatars3.githubusercontent.com/u/42673?s=144&v=4"
156-
github: "sarkis"
149+
github: "sarkis"

docs/terraform.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
| Name | Description | Type | Default | Required |
55
|------|-------------|:----:|:-----:|:-----:|
66
| account_id | The account id of the parameter store you want to allow access to. If none supplied, it uses the current account id of the provider. | string | `` | no |
7-
| kms_key | The arn of the KMS key that you want to allow access to. If empty it uses a wildcard resource. `*` | string | `` | no |
8-
| parameter_root_name | The prefix or root parameter that you want to allow access to | string | `` | no |
7+
| kms_key | The arn of the KMS key that you want to allow access to. If empty it uses a wildcard resource (`*`). | string | `` | no |
8+
| parameter_root_name | The prefix or root parameter that you want to allow access to. | string | `` | no |
99
| region | The region of the parameter store value that you want to allow access to. If none supplied, it uses the current region of the provider. | string | `` | no |
1010

1111
## Outputs
1212

1313
| Name | Description |
1414
|------|-------------|
15-
| manage_kms_store_policy | A JSON policy document that allows decryption access to a KMS key |
16-
| manage_parameter_store_policy | A JSON policy document that allows full access to the parameter store |
17-
| put_xray_trace_policy | A JSON policy document that allows putting data into x-ray for tracing parameter store requests |
18-
| read_parameter_store_policy | A JSON policy document that only allows read access to the parameter store |
19-
| write_parameter_store_policy | A JSON policy document that only allows write access to the parameter store |
15+
| manage_kms_store_policy | A JSON policy document that allows decryption access to a KMS key. |
16+
| manage_parameter_store_policy | A JSON policy document that allows full access to the parameter store. |
17+
| put_xray_trace_policy | A JSON policy document that allows putting data into x-ray for tracing parameter store requests. |
18+
| read_parameter_store_policy | A JSON policy document that only allows read access to the parameter store. |
19+
| write_parameter_store_policy | A JSON policy document that only allows write access to the parameter store. |
2020

outputs.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
output "read_parameter_store_policy" {
2-
description = "A JSON policy document that only allows read access to the parameter store"
3-
value = "${data.aws_iam_policy_document.read_parameter_store.json}"
2+
description = "A JSON policy document that only allows read access to the parameter store."
3+
value = "${data.aws_iam_policy_document.read_parameter_store.json}"
44
}
55

66
output "write_parameter_store_policy" {
7-
description = "A JSON policy document that only allows write access to the parameter store "
8-
value = "${data.aws_iam_policy_document.write_parameter_store.json}"
7+
description = "A JSON policy document that only allows write access to the parameter store."
8+
value = "${data.aws_iam_policy_document.write_parameter_store.json}"
99
}
1010

1111
output "manage_kms_store_policy" {
12-
description = "A JSON policy document that allows decryption access to a KMS key"
13-
value = "${data.aws_iam_policy_document.manage_kms_store.json}"
12+
description = "A JSON policy document that allows decryption access to a KMS key."
13+
value = "${data.aws_iam_policy_document.manage_kms_store.json}"
1414
}
1515

1616
output "manage_parameter_store_policy" {
17-
description = "A JSON policy document that allows full access to the parameter store"
18-
value = "${data.aws_iam_policy_document.manage_parameter_store.json}"
17+
description = "A JSON policy document that allows full access to the parameter store."
18+
value = "${data.aws_iam_policy_document.manage_parameter_store.json}"
1919
}
2020

2121
output "put_xray_trace_policy" {
22-
description = "A JSON policy document that allows putting data into x-ray for tracing parameter store requests"
23-
value = "${data.aws_iam_policy_document.put_xray_trace.json}"
22+
description = "A JSON policy document that allows putting data into x-ray for tracing parameter store requests."
23+
value = "${data.aws_iam_policy_document.put_xray_trace.json}"
2424
}

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
variable "parameter_root_name" {
2-
description = "The prefix or root parameter that you want to allow access to"
2+
description = "The prefix or root parameter that you want to allow access to."
33
default = ""
44
}
55

66
variable "kms_key" {
7-
description = "The arn of the KMS key that you want to allow access to. If empty it uses a wildcard resource. `*` "
7+
description = "The arn of the KMS key that you want to allow access to. If empty it uses a wildcard resource (`*`)."
88
default = ""
99
}
1010

@@ -14,6 +14,6 @@ variable "region" {
1414
}
1515

1616
variable "account_id" {
17-
description = "The account id of the parameter store you want to allow access to. If none supplied, it uses the current account id of the provider. "
17+
description = "The account id of the parameter store you want to allow access to. If none supplied, it uses the current account id of the provider."
1818
default = ""
1919
}

0 commit comments

Comments
 (0)