Skip to content

Commit 9faf72a

Browse files
authored
Updates to ChatOps - Automated commit (#8)
## What * Adds chatops commands - '/test all' - '/test bats' - '/test readme' - '/test terratest' * Drops codefresh * Drops slash-command-dispatch * Removes codefresh badge * Rebuilds README ## Why * Change over from codefresh to GH Actions * Facilitate testing of PRs from forks
1 parent 1865fd9 commit 9faf72a

File tree

11 files changed

+237
-129
lines changed

11 files changed

+237
-129
lines changed

.github/CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Use this file to define individuals or teams that are responsible for code in a repository.
2+
# Read more: <https://help.github.com/articles/about-codeowners/>
3+
#
4+
# Order is important: the last matching pattern takes the most precedence
5+
6+
# These owners will be the default owners for everything
7+
* @cloudposse/engineering @cloudposse/contributors
8+
9+
# Cloud Posse must review any changes to Makefiles
10+
**/Makefile @cloudposse/engineering
11+
**/Makefile.* @cloudposse/engineering
12+
13+
# Cloud Posse must review any changes to GitHub actions
14+
.github/* @cloudposse/engineering

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help.
11+
12+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
13+
14+
## Describe the Bug
15+
A clear and concise description of what the bug is.
16+
17+
## Expected Behavior
18+
A clear and concise description of what you expected to happen.
19+
20+
## Steps to Reproduce
21+
Steps to reproduce the behavior:
22+
1. Go to '...'
23+
2. Run '....'
24+
3. Enter '....'
25+
4. See error
26+
27+
## Screenshots
28+
If applicable, add screenshots or logs to help explain your problem.
29+
30+
## Environment (please complete the following information):
31+
32+
Anything that will help us triage the bug will help. Here are some ideas:
33+
- OS: [e.g. Linux, OSX, WSL, etc]
34+
- Version [e.g. 10.15]
35+
36+
## Additional Context
37+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
5+
- name: Community Slack Team
6+
url: https://cloudposse.com/slack/
7+
about: |-
8+
Please ask and answer questions here.
9+
10+
- name: Office Hours
11+
url: https://cloudposse.com/office-hours/
12+
about: |-
13+
Join us every Wednesday for FREE Office Hours (lunch & learn).
14+
15+
- name: DevOps Accelerator Program
16+
url: https://cloudposse.com/accelerate/
17+
about: |-
18+
Own your infrastructure in record time. We build it. You drive it.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'feature request'
6+
assignees: ''
7+
8+
---
9+
10+
Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).
11+
12+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
13+
14+
## Describe the Feature
15+
16+
A clear and concise description of what the bug is.
17+
18+
## Expected Behavior
19+
20+
A clear and concise description of what you expected to happen.
21+
22+
## Use Case
23+
24+
Is your feature request related to a problem/challenge you are trying to solve? Please provide some additional context of why this feature or capability will be valuable.
25+
26+
## Describe Ideal Solution
27+
28+
A clear and concise description of what you want to happen. If you don't know, that's okay.
29+
30+
## Alternatives Considered
31+
32+
Explain what alternative solutions or features you've considered.
33+
34+
## Additional Context
35+
36+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Whitespace-only changes.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## what
2+
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
3+
* Use bullet points to be concise and to the point.
4+
5+
## why
6+
* Provide the justifications for the changes (e.g. business case).
7+
* Describe why these changes were made (e.g. why do these commits fix the problem?)
8+
* Use bullet points to be concise and to the point.
9+
10+
## references
11+
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
12+
* Use `closes #123`, if this PR closes a GitHub issue `#123`
13+

.github/workflows/chatops.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: chatops
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
jobs:
7+
default:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: "Handle common commands"
12+
uses: cloudposse/actions/github/[email protected]
13+
with:
14+
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
15+
reaction-token: ${{ secrets.GITHUB_TOKEN }}
16+
repository: cloudposse/actions
17+
commands: rebuild-readme, terraform-fmt
18+
permission: none
19+
issue-type: pull-request
20+
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: "Checkout commit"
25+
uses: actions/checkout@v2
26+
- name: "Run tests"
27+
uses: cloudposse/actions/github/[email protected]
28+
with:
29+
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
30+
reaction-token: ${{ secrets.GITHUB_TOKEN }}
31+
repository: cloudposse/actions
32+
commands: test
33+
permission: none
34+
issue-type: pull-request
35+
reactions: false
36+
37+

README.md

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
[![Cloud Posse][logo]](https://cpco.io/homepage)
4444

45-
# terraform-aws-ssm-tls-ssh-key-pair [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-ssm-tls-ssh-key-pair?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d1ba83195dc307c009861ce) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-ssm-tls-ssh-key-pair.svg)](https://github.com/cloudposse/terraform-aws-ssm-tls-ssh-key-pair/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
45+
# terraform-aws-ssm-tls-ssh-key-pair [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-ssm-tls-ssh-key-pair.svg)](https://github.com/cloudposse/terraform-aws-ssm-tls-ssh-key-pair/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
4646

4747

4848
Terraform module that provisions an SSH TLS key pair and writes it to SSM Parameter Store.
@@ -114,35 +114,52 @@ Available targets:
114114
lint Lint terraform code
115115
116116
```
117+
## Requirements
118+
119+
| Name | Version |
120+
|------|---------|
121+
| terraform | ~> 0.12.0 |
122+
| aws | ~> 2.0 |
123+
| local | ~> 1.3 |
124+
| null | ~> 2.1 |
125+
| tls | ~> 2.0 |
126+
127+
## Providers
128+
129+
| Name | Version |
130+
|------|---------|
131+
| aws | ~> 2.0 |
132+
| tls | ~> 2.0 |
133+
117134
## Inputs
118135

119136
| Name | Description | Type | Default | Required |
120-
|------|-------------|:----:|:-----:|:-----:|
121-
| attributes | Additional attributes (e.g. `1`) | list(string) | `<list>` | no |
122-
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
123-
| ecdsa_curve | When ssh_key_algorithm is 'ECDSA', the name of the elliptic curve to use. May be any one of 'P256', 'P384' or P521' | string | `P256` | no |
124-
| enabled | Whether to create the resources. Set to `false` to prevent the module from creating any resources | bool | `true` | no |
125-
| kms_key_id | KMS Key ID used for encryption | string | `` | no |
126-
| name | Application or solution name (e.g. `app`) | string | - | yes |
127-
| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no |
128-
| overwrite_ssm_parameter | Whether to overwrite an existing SSM parameter | bool | `true` | no |
129-
| rsa_bits | When ssh_key_algorithm is 'RSA', the size of the generated RSA key in bits | number | `4096` | no |
130-
| ssh_key_algorithm | SSH key algorithm to use. Currently-supported values are 'RSA' and 'ECDSA' | string | `RSA` | no |
131-
| ssh_private_key_name | SSM Parameter name of the SSH private key | string | `` | no |
132-
| ssh_public_key_name | SSM Parameter name of the SSH public key | string | `` | no |
133-
| ssm_path_format | SSM path format | string | `/%s/%s` | no |
134-
| ssm_path_prefix | The SSM parameter path prefix (e.g. /$ssm_path_prefix/$key_name) | string | `ssh_keys` | no |
135-
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no |
136-
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map(string) | `<map>` | no |
137+
|------|-------------|------|---------|:--------:|
138+
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
139+
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
140+
| ecdsa\_curve | When ssh\_key\_algorithm is 'ECDSA', the name of the elliptic curve to use. May be any one of 'P256', 'P384' or P521' | `string` | `"P256"` | no |
141+
| enabled | Whether to create the resources. Set to `false` to prevent the module from creating any resources | `bool` | `true` | no |
142+
| kms\_key\_id | KMS Key ID used for encryption | `string` | `""` | no |
143+
| name | Application or solution name (e.g. `app`) | `string` | n/a | yes |
144+
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |
145+
| overwrite\_ssm\_parameter | Whether to overwrite an existing SSM parameter | `bool` | `true` | no |
146+
| rsa\_bits | When ssh\_key\_algorithm is 'RSA', the size of the generated RSA key in bits | `number` | `4096` | no |
147+
| ssh\_key\_algorithm | SSH key algorithm to use. Currently-supported values are 'RSA' and 'ECDSA' | `string` | `"RSA"` | no |
148+
| ssh\_private\_key\_name | SSM Parameter name of the SSH private key | `string` | `""` | no |
149+
| ssh\_public\_key\_name | SSM Parameter name of the SSH public key | `string` | `""` | no |
150+
| ssm\_path\_format | SSM path format | `string` | `"/%s/%s"` | no |
151+
| ssm\_path\_prefix | The SSM parameter path prefix (e.g. /$ssm\_path\_prefix/$key\_name) | `string` | `"ssh_keys"` | no |
152+
| stage | Stage (e.g. `prod`, `dev`, `staging`) | `string` | `""` | no |
153+
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | `map(string)` | `{}` | no |
137154

138155
## Outputs
139156

140157
| Name | Description |
141158
|------|-------------|
142-
| key_name | Name of SSH key |
143-
| public_key | Content of the generated public key |
144-
| ssh_private_key_ssm_path | SSM path of the generated private key |
145-
| ssh_public_key_ssm_path | SSM path of the generated public key |
159+
| key\_name | Name of SSH key |
160+
| public\_key | Content of the generated public key |
161+
| ssh\_private\_key\_ssm\_path | SSM path of the generated private key |
162+
| ssh\_public\_key\_ssm\_path | SSM path of the generated public key |
146163

147164

148165

@@ -197,6 +214,10 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
197214

198215
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.
199216

217+
## Discourse Forums
218+
219+
Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.
220+
200221
## Newsletter
201222

202223
Sign up 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.
@@ -312,6 +333,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
312333
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=testimonial
313334
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=office_hours
314335
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=newsletter
336+
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=discourse
315337
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=email
316338
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=commercial_support
317339
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ssm-tls-ssh-key-pair&utm_content=we_love_open_source

README.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,37 @@
1-
---
21
#
32
# This is the canonical configuration for the `README.md`
43
# Run `make readme` to rebuild the `README.md`
54
#
65

76
# Name of this project
87
name: terraform-aws-ssm-tls-ssh-key-pair
9-
108
# Logo for this project
119
#logo: docs/logo.png
1210

1311
# License of this project
1412
license: "APACHE2"
15-
1613
# Canonical GitHub repo
1714
github_repo: cloudposse/terraform-aws-ssm-tls-ssh-key-pair
18-
1915
# Badges to display
2016
badges:
21-
- name: "Codefresh Build Status"
22-
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-ssm-tls-ssh-key-pair?type=cf-1"
23-
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d1ba83195dc307c009861ce"
2417
- name: "Latest Release"
2518
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-ssm-tls-ssh-key-pair.svg"
2619
url: "https://github.com/cloudposse/terraform-aws-ssm-tls-ssh-key-pair/releases/latest"
2720
- name: "Slack Community"
2821
image: "https://slack.cloudposse.com/badge.svg"
2922
url: "https://slack.cloudposse.com"
30-
3123
related:
3224
- name: "terraform-aws-key-pair"
3325
description: "Terraform Module to Automatically Generate SSH key Pairs (Public/Private Keys)"
3426
url: "https://github.com/cloudposse/terraform-aws-key-pair"
3527
- name: "terraform-tls-ssh-key-pair"
3628
description: "Terraform module for generating an SSH public key file"
3729
url: "https://github.com/cloudposse/terraform-tls-ssh-key-pair"
38-
3930
# Short description of this project
4031
description: |-
4132
Terraform module that provisions an SSH TLS key pair and writes it to SSM Parameter Store.
4233
4334
This is useful for bot accounts (e.g. for GitHub). Easily rotate SSH secrets by simply tainting the module resource and reapplying.
44-
4535
# How to use this project
4636
usage: |-
4737
```hcl
@@ -54,11 +44,9 @@ usage: |-
5444
ssh_key_algorithm = "ECDSA"
5545
}
5646
```
57-
5847
include:
5948
- "docs/targets.md"
6049
- "docs/terraform.md"
61-
6250
# Contributors to this project
6351
contributors:
6452
- name: "Erik Osterman"

codefresh/test.yml

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

0 commit comments

Comments
 (0)