Skip to content

Commit b5dcf35

Browse files
authored
Updates to ChatOps - Automated commit (#90)
## 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 7d3182d commit b5dcf35

File tree

11 files changed

+264
-167
lines changed

11 files changed

+264
-167
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
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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## what
2-
<!-- what changed -->
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.
34

45
## why
5-
<!-- why it changed (e.g. business justification) -->
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: 59 additions & 38 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-dynamic-subnets [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-dynamic-subnets?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d02dad8572be040f879f8ed) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-dynamic-subnets.svg)](https://github.com/cloudposse/terraform-aws-dynamic-subnets/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
45+
# terraform-aws-dynamic-subnets [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-dynamic-subnets.svg)](https://github.com/cloudposse/terraform-aws-dynamic-subnets/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
4646

4747

4848
Terraform module to provision public and private [`subnets`](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) in an existing [`VPC`](https://aws.amazon.com/vpc)
@@ -191,51 +191,67 @@ Available targets:
191191
lint Lint terraform code
192192
193193
```
194+
## Requirements
195+
196+
| Name | Version |
197+
|------|---------|
198+
| terraform | ~> 0.12.0 |
199+
| aws | ~> 2.0 |
200+
| local | ~> 1.2 |
201+
| null | ~> 2.0 |
202+
| template | ~> 2.0 |
203+
204+
## Providers
205+
206+
| Name | Version |
207+
|------|---------|
208+
| aws | ~> 2.0 |
209+
194210
## Inputs
195211

196212
| Name | Description | Type | Default | Required |
197-
|------|-------------|:----:|:-----:|:-----:|
198-
| additional_tag_map | Additional tags for appending to each tag map | map(string) | `<map>` | no |
199-
| attributes | Any extra attributes for naming these resources | list(string) | `<list>` | no |
200-
| availability_zones | List of Availability Zones where subnets will be created | list(string) | - | yes |
201-
| cidr_block | Base CIDR block which will be divided into subnet CIDR blocks (e.g. `10.0.0.0/16`) | string | - | yes |
202-
| context | Default context to use for passing state between label invocations | object | `<map>` | no |
203-
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
204-
| environment | The environment name if not using stage | string | `` | no |
205-
| igw_id | Internet Gateway ID the public route table will point to (e.g. `igw-9c26a123`) | string | - | yes |
206-
| label_order | The naming order of the ID output and Name tag | list(string) | `<list>` | no |
207-
| map_public_ip_on_launch | Instances launched into a public subnet should be assigned a public IP address | bool | `true` | no |
208-
| max_subnet_count | Sets the maximum amount of subnets to deploy. 0 will deploy a subnet for every provided availablility zone (in `availability_zones` variable) within the region | string | `0` | no |
209-
| name | Solution name, e.g. 'app' or 'cluster' | string | `` | no |
210-
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no |
211-
| nat_gateway_enabled | Flag to enable/disable NAT Gateways to allow servers in the private subnets to access the Internet | bool | `true` | no |
212-
| nat_instance_enabled | Flag to enable/disable NAT Instances to allow servers in the private subnets to access the Internet | bool | `false` | no |
213-
| nat_instance_type | NAT Instance type | string | `t3.micro` | no |
214-
| private_network_acl_id | Network ACL ID that will be added to private subnets. If empty, a new ACL will be created | string | `` | no |
215-
| private_subnets_additional_tags | Additional tags to be added to private subnets | map(string) | `<map>` | no |
216-
| public_network_acl_id | Network ACL ID that will be added to public subnets. If empty, a new ACL will be created | string | `` | no |
217-
| public_subnets_additional_tags | Additional tags to be added to public subnets | map(string) | `<map>` | no |
218-
| 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 |
219-
| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | string | `` | no |
220-
| subnet_type_tag_key | Key for subnet type tag to provide information about the type of subnets, e.g. `cpco.io/subnet/type=private` or `cpco.io/subnet/type=public` | string | `cpco.io/subnet/type` | no |
221-
| subnet_type_tag_value_format | This is using the format interpolation symbols to allow the value of the subnet_type_tag_key to be modified. | string | `%s` | no |
222-
| tags | Additional tags to apply to all resources that use this label module | map(string) | `<map>` | no |
223-
| vpc_default_route_table_id | Default route table for public subnets. If not set, will be created. (e.g. `rtb-f4f0ce12`) | string | `` | no |
224-
| vpc_id | VPC ID where subnets will be created (e.g. `vpc-aceb2723`) | string | - | yes |
213+
|------|-------------|------|---------|:--------:|
214+
| additional\_tag\_map | Additional tags for appending to each tag map | `map(string)` | `{}` | no |
215+
| attributes | Any extra attributes for naming these resources | `list(string)` | `[]` | no |
216+
| availability\_zones | List of Availability Zones where subnets will be created | `list(string)` | n/a | yes |
217+
| cidr\_block | Base CIDR block which will be divided into subnet CIDR blocks (e.g. `10.0.0.0/16`) | `string` | n/a | yes |
218+
| 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 |
219+
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
220+
| environment | The environment name if not using stage | `string` | `""` | no |
221+
| igw\_id | Internet Gateway ID the public route table will point to (e.g. `igw-9c26a123`) | `string` | n/a | yes |
222+
| label\_order | The naming order of the ID output and Name tag | `list(string)` | `[]` | no |
223+
| map\_public\_ip\_on\_launch | Instances launched into a public subnet should be assigned a public IP address | `bool` | `true` | no |
224+
| max\_subnet\_count | Sets the maximum amount of subnets to deploy. 0 will deploy a subnet for every provided availablility zone (in `availability_zones` variable) within the region | `number` | `0` | no |
225+
| name | Solution name, e.g. 'app' or 'cluster' | `string` | `""` | no |
226+
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `""` | no |
227+
| nat\_gateway\_enabled | Flag to enable/disable NAT Gateways to allow servers in the private subnets to access the Internet | `bool` | `true` | no |
228+
| nat\_instance\_enabled | Flag to enable/disable NAT Instances to allow servers in the private subnets to access the Internet | `bool` | `false` | no |
229+
| nat\_instance\_type | NAT Instance type | `string` | `"t3.micro"` | no |
230+
| private\_network\_acl\_id | Network ACL ID that will be added to private subnets. If empty, a new ACL will be created | `string` | `""` | no |
231+
| private\_subnets\_additional\_tags | Additional tags to be added to private subnets | `map(string)` | `{}` | no |
232+
| public\_network\_acl\_id | Network ACL ID that will be added to public subnets. If empty, a new ACL will be created | `string` | `""` | no |
233+
| public\_subnets\_additional\_tags | Additional tags to be added to public subnets | `map(string)` | `{}` | no |
234+
| 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 |
235+
| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | `string` | `""` | no |
236+
| subnet\_type\_tag\_key | Key for subnet type tag to provide information about the type of subnets, e.g. `cpco.io/subnet/type=private` or `cpco.io/subnet/type=public` | `string` | `"cpco.io/subnet/type"` | no |
237+
| subnet\_type\_tag\_value\_format | This is using the format interpolation symbols to allow the value of the subnet\_type\_tag\_key to be modified. | `string` | `"%s"` | no |
238+
| tags | Additional tags to apply to all resources that use this label module | `map(string)` | `{}` | no |
239+
| vpc\_default\_route\_table\_id | Default route table for public subnets. If not set, will be created. (e.g. `rtb-f4f0ce12`) | `string` | `""` | no |
240+
| vpc\_id | VPC ID where subnets will be created (e.g. `vpc-aceb2723`) | `string` | n/a | yes |
225241

226242
## Outputs
227243

228244
| Name | Description |
229245
|------|-------------|
230-
| availability_zones | List of Availability Zones where subnets were created |
231-
| nat_gateway_ids | IDs of the NAT Gateways created |
232-
| nat_instance_ids | IDs of the NAT Instances created |
233-
| private_route_table_ids | IDs of the created private route tables |
234-
| private_subnet_cidrs | CIDR blocks of the created private subnets |
235-
| private_subnet_ids | IDs of the created private subnets |
236-
| public_route_table_ids | IDs of the created public route tables |
237-
| public_subnet_cidrs | CIDR blocks of the created public subnets |
238-
| public_subnet_ids | IDs of the created public subnets |
246+
| availability\_zones | List of Availability Zones where subnets were created |
247+
| nat\_gateway\_ids | IDs of the NAT Gateways created |
248+
| nat\_instance\_ids | IDs of the NAT Instances created |
249+
| private\_route\_table\_ids | IDs of the created private route tables |
250+
| private\_subnet\_cidrs | CIDR blocks of the created private subnets |
251+
| private\_subnet\_ids | IDs of the created private subnets |
252+
| public\_route\_table\_ids | IDs of the created public route tables |
253+
| public\_subnet\_cidrs | CIDR blocks of the created public subnets |
254+
| public\_subnet\_ids | IDs of the created public subnets |
239255

240256

241257

@@ -292,6 +308,10 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
292308

293309
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.
294310

311+
## Discourse Forums
312+
313+
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.
314+
295315
## Newsletter
296316

297317
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.
@@ -415,6 +435,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
415435
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=testimonial
416436
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=office_hours
417437
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=newsletter
438+
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=discourse
418439
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=email
419440
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=commercial_support
420441
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamic-subnets&utm_content=we_love_open_source

README.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
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-dynamic-subnets
9-
108
# Tags of this project
119
tags:
1210
- aws
@@ -16,33 +14,24 @@ tags:
1614
- subnet
1715
- vpc
1816
- vpc-resources
19-
2017
# Categories of this project
2118
categories:
2219
- terraform-modules/networking
23-
2420
# Logo for this project
2521
#logo: docs/logo.png
2622

2723
# License of this project
2824
license: "APACHE2"
29-
3025
# Canonical GitHub repo
3126
github_repo: cloudposse/terraform-aws-dynamic-subnets
32-
33-
3427
# Badges to display
3528
badges:
36-
- name: "Codefresh Build Status"
37-
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-dynamic-subnets?type=cf-1"
38-
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d02dad8572be040f879f8ed"
3929
- name: "Latest Release"
4030
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-dynamic-subnets.svg"
4131
url: "https://github.com/cloudposse/terraform-aws-dynamic-subnets/releases/latest"
4232
- name: "Slack Community"
4333
image: "https://slack.cloudposse.com/badge.svg"
4434
url: "https://slack.cloudposse.com"
45-
4635
related:
4736
- name: "terraform-aws-vpc"
4837
description: "Terraform Module that defines a VPC with public/private subnets across multiple AZs with Internet Gateways"
@@ -56,14 +45,12 @@ related:
5645
- name: "terraform-aws-named-subnets"
5746
description: "Terraform module for named subnets provisioning."
5847
url: "https://github.com/cloudposse/terraform-aws-named-subnets"
59-
6048
# Short description of this project
6149
description: |-
6250
Terraform module to provision public and private [`subnets`](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) in an existing [`VPC`](https://aws.amazon.com/vpc)
6351
6452
__Note:__ this module is intended for use with an existing VPC and existing Internet Gateway.
6553
To create a new VPC, use [terraform-aws-vpc](https://github.com/cloudposse/terraform-aws-vpc) module.
66-
6754
# How to use this project
6855
usage: |-
6956
```hcl
@@ -80,12 +67,10 @@ usage: |-
8067
```
8168
8269
Learn about [using providers](https://www.terraform.io/docs/configuration-0-11/modules.html#providers-within-modules) with terraform modules.
83-
8470
include:
8571
- "docs/design.md"
8672
- "docs/targets.md"
8773
- "docs/terraform.md"
88-
8974
# Contributors to this project
9075
contributors:
9176
- name: "Erik Osterman"
@@ -104,4 +89,3 @@ contributors:
10489
github: "ivan-pinatti"
10590
- name: "Oscar Sullivan"
10691
github: "osulli"
107-

0 commit comments

Comments
 (0)