Skip to content

Commit df2c221

Browse files
committed
Initial commit
0 parents  commit df2c221

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3374
-0
lines changed

.editorconfig

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Unix-style newlines with a newline ending every file
2+
[*]
3+
charset = utf-8
4+
end_of_line = lf
5+
indent_size = 2
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{tf,tfvars}]
11+
indent_size = 2
12+
indent_style = space
13+
14+
[*.md]
15+
max_line_length = 0
16+
trim_trailing_whitespace = false
17+
18+
# Override for Makefile
19+
[{Makefile, makefile, GNUmakefile, Makefile.*}]
20+
tab_width = 2
21+
indent_style = tab
22+
indent_size = 4
23+
24+
[COMMIT_EDITMSG]
25+
max_line_length = 0

.github/CODEOWNERS

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 has the highest 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
15+
16+
# Cloud Posse must review any changes to standard context definition,
17+
# but some changes can be rubber-stamped.
18+
**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
19+
README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
20+
README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
21+
docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
22+
23+
# Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration
24+
.github/mergify.yml @cloudposse/admins
25+
.github/CODEOWNERS @cloudposse/admins

.github/ISSUE_TEMPLATE/bug_report.md

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

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

+13
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/auto-release.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: '$RESOLVED_VERSION'
3+
version-template: '$MAJOR.$MINOR.$PATCH'
4+
version-resolver:
5+
major:
6+
labels:
7+
- 'major'
8+
minor:
9+
labels:
10+
- 'minor'
11+
- 'enhancement'
12+
patch:
13+
labels:
14+
- 'auto-update'
15+
- 'patch'
16+
- 'fix'
17+
- 'bugfix'
18+
- 'bug'
19+
- 'hotfix'
20+
- 'no-release'
21+
default: 'minor'
22+
23+
categories:
24+
- title: '🚀 Enhancements'
25+
labels:
26+
- 'enhancement'
27+
- 'patch'
28+
- title: '🐛 Bug Fixes'
29+
labels:
30+
- 'fix'
31+
- 'bugfix'
32+
- 'bug'
33+
- 'hotfix'
34+
- title: '🤖 Automatic Updates'
35+
labels:
36+
- 'auto-update'
37+
38+
change-template: |
39+
<details>
40+
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary>
41+
42+
$BODY
43+
</details>
44+
45+
template: |
46+
$CHANGES
47+
48+
replacers:
49+
# Remove irrelevant information from Renovate bot
50+
- search: '/(?<=---\s)\s*^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
51+
replace: ''
52+
# Remove Renovate bot banner image
53+
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
54+
replace: ''

.github/mergify.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# https://docs.mergify.io/conditions.html
2+
# https://docs.mergify.io/actions.html
3+
pull_request_rules:
4+
- name: "approve automated PRs that have passed checks"
5+
conditions:
6+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
7+
- "base=master"
8+
- "-closed"
9+
- "head~=^(auto-update|renovate)/.*"
10+
- "check-success=test/bats"
11+
- "check-success=test/readme"
12+
- "check-success=test/terratest"
13+
- "check-success=validate-codeowners"
14+
actions:
15+
review:
16+
type: "APPROVE"
17+
bot_account: "cloudposse-mergebot"
18+
message: "We've automatically approved this PR because the checks from the automated Pull Request have passed."
19+
20+
- name: "merge automated PRs when approved and tests pass"
21+
conditions:
22+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
23+
- "base=master"
24+
- "-closed"
25+
- "head~=^(auto-update|renovate)/.*"
26+
- "check-success=test/bats"
27+
- "check-success=test/readme"
28+
- "check-success=test/terratest"
29+
- "check-success=validate-codeowners"
30+
- "#approved-reviews-by>=1"
31+
- "#changes-requested-reviews-by=0"
32+
- "#commented-reviews-by=0"
33+
actions:
34+
merge:
35+
method: "squash"
36+
37+
- name: "delete the head branch after merge"
38+
conditions:
39+
- "merged"
40+
actions:
41+
delete_head_branch: {}
42+
43+
- name: "ask to resolve conflict"
44+
conditions:
45+
- "conflict"
46+
- "-closed"
47+
actions:
48+
comment:
49+
message: "This pull request is now in conflict. Could you fix it @{{author}}? 🙏"
50+
51+
- name: "remove outdated reviews"
52+
conditions:
53+
- "base=master"
54+
actions:
55+
dismiss_reviews:
56+
changes_requested: true
57+
approved: true
58+
message: "This Pull Request has been updated, so we're dismissing all reviews."

.github/renovate.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges"
5+
],
6+
"labels": ["auto-update"],
7+
"enabledManagers": ["terraform"],
8+
"terraform": {
9+
"ignorePaths": ["**/context.tf", "examples/**"]
10+
}
11+
}
12+

.github/workflows/auto-context.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "auto-context"
2+
on:
3+
schedule:
4+
# Update context.tf nightly
5+
- cron: '0 3 * * *'
6+
7+
jobs:
8+
update:
9+
if: github.event_name == 'schedule'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Update context.tf
15+
shell: bash
16+
id: update
17+
env:
18+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
19+
run: |
20+
if [[ -f context.tf ]]; then
21+
echo "Discovered existing context.tf! Fetching most recent version to see if there is an update."
22+
curl -o context.tf -fsSL https://raw.githubusercontent.com/cloudposse/terraform-null-label/master/exports/context.tf
23+
if git diff --no-patch --exit-code context.tf; then
24+
echo "No changes detected! Exiting the job..."
25+
else
26+
echo "context.tf file has changed. Update examples and rebuild README.md."
27+
make init
28+
make github/init/context.tf
29+
make readme/build
30+
echo "::set-output name=create_pull_request::true"
31+
fi
32+
else
33+
echo "This module has not yet been updated to support the context.tf pattern! Please update in order to support automatic updates."
34+
fi
35+
36+
- name: Create Pull Request
37+
if: steps.update.outputs.create_pull_request == 'true'
38+
uses: cloudposse/actions/github/[email protected]
39+
with:
40+
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
41+
committer: 'cloudpossebot <[email protected]>'
42+
author: 'cloudpossebot <[email protected]>'
43+
commit-message: Update context.tf from origin source
44+
title: Update context.tf
45+
body: |-
46+
## what
47+
This is an auto-generated PR that updates the `context.tf` file to the latest version from `cloudposse/terraform-null-label`
48+
49+
## why
50+
To support all the features of the `context` interface.
51+
52+
branch: auto-update/context.tf
53+
base: master
54+
delete-branch: true
55+
labels: |
56+
auto-update
57+
context

0 commit comments

Comments
 (0)