Skip to content

Commit 984dd24

Browse files
authored
Convert to TF 0.12. Add tests. Add Codefresh test pipeline (#11)
* Convert to TF 0.12. Add tests. Add Codefresh test pipeline * Update README * Update example
1 parent 30f905f commit 984dd24

23 files changed

+557
-111
lines changed

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018 Cloud Posse, LLC
189+
Copyright 2018-2019 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: 110 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
2+
[![README Header][readme_header_img]][readme_header_link]
23

3-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
4+
[![Cloud Posse][logo]](https://cpco.io/homepage)
45

5-
# terraform-aws-iam-s3-user [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-iam-s3-user.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-iam-s3-user) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-iam-s3-user.svg)](https://github.com/cloudposse/terraform-aws-iam-s3-user/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
6+
# terraform-aws-iam-s3-user [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-iam-s3-user?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d12481cc6e335d586a1315d) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-iam-s3-user.svg)](https://github.com/cloudposse/terraform-aws-iam-s3-user/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
67

78

89
Terraform module to provision a basic IAM user with permissions to access S3 resources, e.g. to give the user read/write/delete access to the objects in an S3 bucket.
@@ -12,7 +13,17 @@ Suitable for CI/CD systems (_e.g._ TravisCI, CircleCI, CodeFresh) or systems whi
1213

1314
---
1415

15-
This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps.
16+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
17+
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
18+
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
19+
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
20+
[<img align="right" title="Share on Reddit" src="https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg" />][share_reddit]
21+
[<img align="right" title="Share on LinkedIn" src="https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg" />][share_linkedin]
22+
[<img align="right" title="Share on Twitter" src="https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg" />][share_twitter]
23+
24+
25+
[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
26+
1627

1728

1829
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
@@ -23,22 +34,32 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
2334

2435

2536

37+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
38+
39+
40+
41+
2642

2743

2844

2945
## Usage
3046

47+
48+
**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
49+
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-iam-s3-user/releases).
50+
51+
3152
This example will create an IAM user and allow read access to all objects in the S3 bucket `examplebucket`
3253

3354

3455
```hcl
3556
module "s3_user" {
3657
source = "git::https://github.com/cloudposse/terraform-aws-iam-s3-user.git?ref=master"
37-
namespace = "cp"
38-
stage = "prod"
58+
namespace = "eg"
59+
stage = "test"
3960
name = "app"
4061
s3_actions = ["s3:GetObject"]
41-
s3_resources = ["arn:aws:s3:::examplebucket/*"]
62+
s3_resources = "arn:aws:s3:::examplebucket/*"
4263
}
4364
```
4465

@@ -51,41 +72,48 @@ module "s3_user" {
5172
```
5273
Available targets:
5374
54-
help This help screen
75+
help Help screen
5576
help/all Display help for all targets
77+
help/short This help short screen
5678
lint Lint terraform code
5779
5880
```
59-
6081
## Inputs
6182

6283
| Name | Description | Type | Default | Required |
6384
|------|-------------|:----:|:-----:|:-----:|
64-
| attributes | Additional attributes (e.g. `1`) | list | `<list>` | no |
85+
| attributes | Additional attributes (e.g. `1`) | list(string) | `<list>` | no |
6586
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
66-
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no |
67-
| force_destroy | Destroy even if it has non-Terraform-managed IAM access keys, login profiles or MFA devices | string | `false` | no |
87+
| enabled | Set to false to prevent the module from creating any resources | bool | `true` | no |
88+
| force_destroy | Destroy even if it has non-Terraform-managed IAM access keys, login profiles or MFA devices | bool | `false` | no |
6889
| name | Application or solution name (e.g. `app`) | string | - | yes |
69-
| namespace | Namespace (e.g. `cp` or `cloudposse`) | string | - | yes |
90+
| namespace | Namespace (e.g. `cp` or `cloudposse`) | string | `` | no |
7091
| path | Path in which to create the user | string | `/` | no |
71-
| s3_actions | Actions to allow in the policy | list | `<list>` | no |
72-
| s3_resources | S3 resources to apply the actions specified in the policy | list | - | yes |
73-
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | - | yes |
74-
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no |
92+
| s3_actions | Actions to allow in the policy | list(string) | `<list>` | no |
93+
| s3_resources | S3 resources to apply the actions specified in the policy | list(string) | - | yes |
94+
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no |
95+
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map(string) | `<map>` | no |
7596

7697
## Outputs
7798

7899
| Name | Description |
79100
|------|-------------|
80-
| access_key_id | The access key ID |
81-
| secret_access_key | The secret access key. This will be written to the state file in plain-text |
101+
| access_key_id | Access Key ID |
102+
| secret_access_key | Secret Access Key. This will be written to the state file in plain-text |
82103
| user_arn | The ARN assigned by AWS for the user |
83104
| user_name | Normalized IAM user name |
84105
| user_unique_id | The user unique ID assigned by AWS |
85106

86107

87108

88109

110+
## Share the Love
111+
112+
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-iam-s3-user)! (it helps us **a lot**)
113+
114+
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
115+
116+
89117
## Related Projects
90118

91119
Check out these related projects.
@@ -104,26 +132,38 @@ Check out these related projects.
104132

105133
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-iam-s3-user/issues), send us an [email][email] or join our [Slack Community][slack].
106134

135+
[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]
136+
107137
## Commercial Support
108138

109139
Work directly with our team of DevOps experts via email, slack, and video conferencing.
110140

111141
We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.
112142

113-
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)](mailto:hello@cloudposse.com)
143+
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)][email]
114144

115145
- **Questions.** We'll use a Shared Slack channel between your team and ours.
116146
- **Troubleshooting.** We'll help you triage why things aren't working.
117147
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback.
118148
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
119-
- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure.
149+
- **Build New Terraform Modules.** We'll [develop original modules][module_development] to provision infrastructure.
120150
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
121151
- **Implementation.** We'll provide hands-on support to implement our reference architectures.
122152

123153

124-
## Community Forum
125154

126-
Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure.
155+
## Terraform Module Development
156+
157+
Are you interested in custom Terraform module development? Submit your inquiry using [our form][module_development] today and we'll get back to you ASAP.
158+
159+
160+
## Slack Community
161+
162+
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
163+
164+
## Newsletter
165+
166+
Signup for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
127167

128168
## Contributing
129169

@@ -133,7 +173,7 @@ Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-iam-s
133173

134174
### Developing
135175

136-
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com).
176+
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://cpco.io/help-out) with our other projects, we would love to hear from you! Shoot us an [email][email].
137177

138178
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
139179

@@ -148,7 +188,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
148188

149189
## Copyright
150190

151-
Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com)
191+
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
152192

153193

154194

@@ -189,34 +229,61 @@ All other trademarks referenced herein are the property of their respective owne
189229

190230
## About
191231

192-
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at <hello@cloudposse.com>
232+
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know by [leaving a testimonial][testimonial]!
193233

194-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
234+
[![Cloud Posse][logo]][website]
195235

196-
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)!
236+
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
197237

198-
We offer paid support on all of our projects.
238+
We offer [paid support][commercial_support] on all of our projects.
199239

200-
Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
240+
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
201241

202-
[docs]: https://docs.cloudposse.com/
203-
[website]: https://cloudposse.com/
204-
[github]: https://github.com/cloudposse/
205-
[commercial_support]: https://github.com/orgs/cloudposse/projects
206-
[jobs]: https://cloudposse.com/jobs/
207-
[hire]: https://cloudposse.com/contact/
208-
[slack]: https://slack.cloudposse.com/
209-
[linkedin]: https://www.linkedin.com/company/cloudposse
210-
[twitter]: https://twitter.com/cloudposse/
211-
[email]: mailto:hello@cloudposse.com
212242

213243

214244
### Contributors
215245

216-
| [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] |
217-
|---|
246+
| [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]<br/>[Igor Rodionov][goruha_homepage] |
247+
|---|---|---|
218248

219249
[aknysh_homepage]: https://github.com/aknysh
220250
[aknysh_avatar]: https://github.com/aknysh.png?size=150
221-
222-
251+
[osterman_homepage]: https://github.com/osterman
252+
[osterman_avatar]: https://github.com/osterman.png?size=150
253+
[goruha_homepage]: https://github.com/goruha
254+
[goruha_avatar]: https://github.com/goruha.png?size=150
255+
256+
257+
258+
[![README Footer][readme_footer_img]][readme_footer_link]
259+
[![Beacon][beacon]][website]
260+
261+
[logo]: https://cloudposse.com/logo-300x69.svg
262+
[docs]: https://cpco.io/docs
263+
[website]: https://cpco.io/homepage
264+
[github]: https://cpco.io/github
265+
[jobs]: https://cpco.io/jobs
266+
[hire]: https://cpco.io/hire
267+
[slack]: https://cpco.io/slack
268+
[linkedin]: https://cpco.io/linkedin
269+
[twitter]: https://cpco.io/twitter
270+
[testimonial]: https://cpco.io/leave-testimonial
271+
[newsletter]: https://cpco.io/newsletter
272+
[email]: https://cpco.io/email
273+
[commercial_support]: https://cpco.io/commercial-support
274+
[we_love_open_source]: https://cpco.io/we-love-open-source
275+
[module_development]: https://cpco.io/module-development
276+
[terraform_modules]: https://cpco.io/terraform-modules
277+
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/terraform-aws-iam-s3-user
278+
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/terraform-aws-iam-s3-user
279+
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/terraform-aws-iam-s3-user
280+
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/terraform-aws-iam-s3-user
281+
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/terraform-aws-iam-s3-user
282+
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/terraform-aws-iam-s3-user
283+
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-iam-s3-user&url=https://github.com/cloudposse/terraform-aws-iam-s3-user
284+
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-iam-s3-user&url=https://github.com/cloudposse/terraform-aws-iam-s3-user
285+
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-iam-s3-user
286+
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-iam-s3-user
287+
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-iam-s3-user
288+
[share_email]: mailto:?subject=terraform-aws-iam-s3-user&body=https://github.com/cloudposse/terraform-aws-iam-s3-user
289+
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-iam-s3-user?pixel&cs=github&cm=readme&an=terraform-aws-iam-s3-user

README.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ github_repo: cloudposse/terraform-aws-iam-s3-user
1818

1919
# Badges to display
2020
badges:
21-
- name: "Build Status"
22-
image: "https://travis-ci.org/cloudposse/terraform-aws-iam-s3-user.svg?branch=master"
23-
url: "https://travis-ci.org/cloudposse/terraform-aws-iam-s3-user"
21+
- name: "Codefresh Build Status"
22+
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-iam-s3-user?type=cf-1"
23+
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d12481cc6e335d586a1315d"
2424
- name: "Latest Release"
2525
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-iam-s3-user.svg"
2626
url: "https://github.com/cloudposse/terraform-aws-iam-s3-user/releases/latest"
@@ -59,8 +59,8 @@ usage: |-
5959
```hcl
6060
module "s3_user" {
6161
source = "git::https://github.com/cloudposse/terraform-aws-iam-s3-user.git?ref=master"
62-
namespace = "cp"
63-
stage = "prod"
62+
namespace = "eg"
63+
stage = "test"
6464
name = "app"
6565
s3_actions = ["s3:GetObject"]
6666
s3_resources = "arn:aws:s3:::examplebucket/*"
@@ -74,4 +74,8 @@ include:
7474
# Contributors to this project
7575
contributors:
7676
- name: "Andriy Knysh"
77-
github: "aknysh"
77+
github: "aknysh"
78+
- name: "Erik Osterman"
79+
github: "osterman"
80+
- name: "Igor Rodionov"
81+
github: "goruha"

0 commit comments

Comments
 (0)