Skip to content

Commit d306358

Browse files
authored
Add GitHub Actions ChatOps according to the docs (#49)
1 parent b22e16b commit d306358

File tree

8 files changed

+171
-185
lines changed

8 files changed

+171
-185
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# Use this file to define individuals or teams that are responsible for code in a repository.
22
# Read more: <https://help.github.com/articles/about-codeowners/>
3+
#
4+
# Order is important: the last matching pattern takes the most precedence
35

4-
* @cloudposse/engineering
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/feature_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) in the `#geodesic` channel or visit our [Slack Archive](https://archive.sweetops.com/geodesic/).
10+
Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).
1111

1212
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
1313

@@ -33,4 +33,4 @@ Explain what alternative solutions or features you've considered.
3333

3434
## Additional Context
3535

36-
Add any other context or screenshots about the feature request here.
36+
Add any other context or screenshots about the feature request here.

.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+

.github/workflows/slash-command-dispatch.yml

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

README.md

Lines changed: 61 additions & 43 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-tfstate-backend [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-tfstate-backend?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d0d3d11c841e6807afe8d2a) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-tfstate-backend.svg)](https://github.com/cloudposse/terraform-aws-tfstate-backend/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
45+
# terraform-aws-tfstate-backend [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-tfstate-backend.svg)](https://github.com/cloudposse/terraform-aws-tfstate-backend/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
4646

4747

4848
Terraform module to provision an S3 bucket to store `terraform.tfstate` file and a DynamoDB table to lock the state file
@@ -154,56 +154,74 @@ Available targets:
154154
lint Lint terraform code
155155
156156
```
157+
## Requirements
158+
159+
| Name | Version |
160+
|------|---------|
161+
| terraform | ~> 0.12.0 |
162+
| aws | ~> 2.0 |
163+
| local | ~> 1.2 |
164+
| null | ~> 2.0 |
165+
| template | ~> 2.0 |
166+
167+
## Providers
168+
169+
| Name | Version |
170+
|------|---------|
171+
| aws | ~> 2.0 |
172+
| local | ~> 1.2 |
173+
| template | ~> 2.0 |
174+
157175
## Inputs
158176

159177
| Name | Description | Type | Default | Required |
160-
|------|-------------|:----:|:-----:|:-----:|
161-
| acl | The canned ACL to apply to the S3 bucket | string | `private` | no |
162-
| additional_tag_map | Additional tags for appending to each tag map | map(string) | `<map>` | no |
163-
| arn_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | string | `arn:aws` | no |
164-
| attributes | Additional attributes (e.g. `state`) | list(string) | `<list>` | no |
165-
| billing_mode | DynamoDB billing mode | string | `PROVISIONED` | no |
166-
| block_public_acls | Whether Amazon S3 should block public ACLs for this bucket | bool | `true` | no |
167-
| block_public_policy | Whether Amazon S3 should block public bucket policies for this bucket | string | `true` | no |
168-
| context | Default context to use for passing state between label invocations | object | `<map>` | no |
169-
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no |
170-
| enable_point_in_time_recovery | Enable DynamoDB point-in-time recovery | bool | `false` | no |
171-
| enable_server_side_encryption | Enable DynamoDB server-side encryption | bool | `true` | no |
172-
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
173-
| force_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable | bool | `false` | no |
174-
| ignore_public_acls | Whether Amazon S3 should ignore public ACLs for this bucket | bool | `true` | no |
175-
| label_order | The naming order of the id output and Name tag | list(string) | `<list>` | no |
176-
| mfa_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | bool | `false` | no |
177-
| name | Solution name, e.g. 'app' or 'jenkins' | string | `terraform` | no |
178-
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no |
179-
| prevent_unencrypted_uploads | Prevent uploads of unencrypted objects to S3 | bool | `true` | no |
180-
| profile | AWS profile name as set in the shared credentials file | string | `` | no |
181-
| read_capacity | DynamoDB read capacity units | string | `5` | no |
182-
| regex_replace_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | string | `/[^a-zA-Z0-9-]/` | no |
183-
| region | AWS Region the S3 bucket should reside in | string | - | yes |
184-
| restrict_public_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket | bool | `true` | no |
185-
| role_arn | The role to be assumed | string | `` | no |
186-
| s3_bucket_name | S3 bucket name. If not provided, the name will be generated by the label module in the format namespace-stage-name | string | `` | no |
187-
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | string | `` | no |
188-
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | map(string) | `<map>` | no |
189-
| terraform_backend_config_file_name | Name of terraform backend config file | string | `terraform.tf` | no |
190-
| terraform_backend_config_file_path | The path to terrafrom project directory | string | `` | no |
191-
| terraform_backend_config_template_file | The path to the template used to generate the config file | string | `` | no |
192-
| terraform_state_file | The path to the state file inside the bucket | string | `terraform.tfstate` | no |
193-
| terraform_version | The minimum required terraform version | string | `0.12.2` | no |
194-
| write_capacity | DynamoDB write capacity units | string | `5` | no |
178+
|------|-------------|------|---------|:--------:|
179+
| acl | The canned ACL to apply to the S3 bucket | `string` | `"private"` | no |
180+
| additional\_tag\_map | Additional tags for appending to each tag map | `map(string)` | `{}` | no |
181+
| arn\_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | `string` | `"arn:aws"` | no |
182+
| attributes | Additional attributes (e.g. `state`) | `list(string)` | <pre>[<br> "state"<br>]</pre> | no |
183+
| billing\_mode | DynamoDB billing mode | `string` | `"PROVISIONED"` | no |
184+
| block\_public\_acls | Whether Amazon S3 should block public ACLs for this bucket | `bool` | `true` | no |
185+
| block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket | `bool` | `true` | no |
186+
| context | Default context to use for passing state between label invocations | <pre>object({<br> namespace = string<br> environment = string<br> stage = string<br> name = string<br> enabled = bool<br> delimiter = string<br> attributes = list(string)<br> label_order = list(string)<br> tags = map(string)<br> additional_tag_map = map(string)<br> regex_replace_chars = string<br> })</pre> | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": "",<br> "enabled": true,<br> "environment": "",<br> "label_order": [],<br> "name": "",<br> "namespace": "",<br> "regex_replace_chars": "",<br> "stage": "",<br> "tags": {}<br>}</pre> | no |
187+
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
188+
| enable\_point\_in\_time\_recovery | Enable DynamoDB point-in-time recovery | `bool` | `false` | no |
189+
| enable\_server\_side\_encryption | Enable DynamoDB server-side encryption | `bool` | `true` | no |
190+
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no |
191+
| force\_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable | `bool` | `false` | no |
192+
| ignore\_public\_acls | Whether Amazon S3 should ignore public ACLs for this bucket | `bool` | `true` | no |
193+
| label\_order | The naming order of the id output and Name tag | `list(string)` | `[]` | no |
194+
| mfa\_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | `bool` | `false` | no |
195+
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `"terraform"` | no |
196+
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `""` | no |
197+
| prevent\_unencrypted\_uploads | Prevent uploads of unencrypted objects to S3 | `bool` | `true` | no |
198+
| profile | AWS profile name as set in the shared credentials file | `string` | `""` | no |
199+
| read\_capacity | DynamoDB read capacity units | `number` | `5` | no |
200+
| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | `string` | `"/[^a-zA-Z0-9-]/"` | no |
201+
| region | AWS Region the S3 bucket should reside in | `string` | n/a | yes |
202+
| restrict\_public\_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket | `bool` | `true` | no |
203+
| role\_arn | The role to be assumed | `string` | `""` | no |
204+
| s3\_bucket\_name | S3 bucket name. If not provided, the name will be generated by the label module in the format namespace-stage-name | `string` | `""` | no |
205+
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `""` | no |
206+
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
207+
| terraform\_backend\_config\_file\_name | Name of terraform backend config file | `string` | `"terraform.tf"` | no |
208+
| terraform\_backend\_config\_file\_path | The path to terrafrom project directory | `string` | `""` | no |
209+
| terraform\_backend\_config\_template\_file | The path to the template used to generate the config file | `string` | `""` | no |
210+
| terraform\_state\_file | The path to the state file inside the bucket | `string` | `"terraform.tfstate"` | no |
211+
| terraform\_version | The minimum required terraform version | `string` | `"0.12.2"` | no |
212+
| write\_capacity | DynamoDB write capacity units | `number` | `5` | no |
195213

196214
## Outputs
197215

198216
| Name | Description |
199217
|------|-------------|
200-
| dynamodb_table_arn | DynamoDB table ARN |
201-
| dynamodb_table_id | DynamoDB table ID |
202-
| dynamodb_table_name | DynamoDB table name |
203-
| s3_bucket_arn | S3 bucket ARN |
204-
| s3_bucket_domain_name | S3 bucket domain name |
205-
| s3_bucket_id | S3 bucket ID |
206-
| terraform_backend_config | Rendered Terraform backend config file |
218+
| dynamodb\_table\_arn | DynamoDB table ARN |
219+
| dynamodb\_table\_id | DynamoDB table ID |
220+
| dynamodb\_table\_name | DynamoDB table name |
221+
| s3\_bucket\_arn | S3 bucket ARN |
222+
| s3\_bucket\_domain\_name | S3 bucket domain name |
223+
| s3\_bucket\_id | S3 bucket ID |
224+
| terraform\_backend\_config | Rendered Terraform backend config file |
207225

208226

209227

README.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ github_repo: cloudposse/terraform-aws-tfstate-backend
1919

2020
# Badges to display
2121
badges:
22-
- name: "Codefresh Build Status"
23-
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-tfstate-backend?type=cf-1"
24-
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d0d3d11c841e6807afe8d2a"
2522
- name: "Latest Release"
2623
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-tfstate-backend.svg"
2724
url: "https://github.com/cloudposse/terraform-aws-tfstate-backend/releases/latest"

codefresh/test.yml

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

0 commit comments

Comments
 (0)