Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jpluta authored Oct 2, 2023
0 parents commit e226184
Show file tree
Hide file tree
Showing 25 changed files with 778 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# https://direnv.net/
#

pre-commit install

source_env_if_exists .envrc.private
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @opsd-io/terraformers
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug report
description: File a bug/issue
title: "[BUG]: "
labels: ["bug"]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Are there other open or closed issues or Pull Requests that match your issue?
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: In a few words, describe the problem you are struggling with.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **Terraform version**: 1.3.0
- **Terraform provider version**: 4.0
value: |
- Terraform version: 0.0.0
- Terraform provider version: 0.0
render: markdown
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
**Tip**: You can attach images or log files by clicking this area to highlight it and then dragging files in.
**Tip**: You can use GitHub Gist to share debug output.
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Join to the OPSd community on Slack
url: https://join.slack.com/t/opsd-community/signup
about: If you want to contact us personally join our Slack.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature request
description: Suggest new functionality
title: "[FEATURE]: "
labels: ["enhancement"]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Are there other open or closed issues or Pull Requests that match your suggestion?
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Mockups? Anything that will give us more context about the feature you are encountering!
**Tip**: You can attach images or log files by clicking this area to highlight it and then dragging files in.
**Tip**: You can use GitHub Gist to share your concepts/ideas.
validations:
required: true
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## What changes does your PR bring?

In a few words, describe what changes your commits make to the code.

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (non-breaking change to the build process or auxiliary tools)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Documentation (Improvements or additions to documentation)
- [ ] Breaking change (fix or feature that would cause existing functionality not to work as expected)

## References

Fixes:

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
16 changes: 16 additions & 0 deletions .github/img/OPSD_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
## Changes
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: 'Features'
labels:
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'bug'
- title: 'Documentation'
labels:
- 'documentation'
- title: 'Maintenance'
label: 'chore'
collapse-after: 5

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

version-resolver:
major:
labels:
- 'breaking'
minor:
labels:
- 'enhancement'
patch:
labels:
- 'bug'
- 'documentation'
- 'chore'

exclude-labels:
- 'skip-changelog'
27 changes: 27 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Static code analysis

on:
pull_request:
paths-ignore:
- "**.svg"
# push:
# # paths-ignore:
# # - "**.md"

jobs:
tools:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install all the tools from .tool-versions file
uses: asdf-vm/actions/install@v2
- name: Install python for pre-commit purposes
uses: actions/setup-python@v4
- name: Exectute all the pre-commit tasks from .pre-commit-config.yaml file
uses: pre-commit/[email protected]
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Terraform

## local directories
.terraform*/
.terraform/

# lock & state files
.terraform.lock.hcl
*.tfstate
*.tfstate.*

# Code Editors

## VI
*.swp

## Visual Studio Code
*.code-workspace

# Misc

## MacOS
**/.DS_Store
**/.CFUserTextEncoding
**/.Trash/
**/$RECYCLE.BIN/

## direnv
/.envrc.private
/.direnv/
62 changes: 62 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
repos:
# Pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 # See the release notes at https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- id: end-of-file-fixer
name: end of file fixer
description: Let's be sure that a new line has been added to the end of the file.
- id: trailing-whitespace
name: trailing whitespace
description: Automatically remove trailing whitespace before committing.
- id: check-merge-conflict
name: check merge conflict
description: Check for files that contain merge conflict strings.
stages: [commit]
- id: check-executables-have-shebangs
name: check executables have shebangs
description: Checks that non-binary executables have a proper shebang.
stages: [commit]
- id: detect-private-key
name: detect private key
description: Checks for the existence of private keys.
stages: [commit]
- id: check-symlinks
name: check symlinks
description: Checks for symlinks which do not point to anything.
stages: [commit]
- id: mixed-line-ending
name: mixed line ending
description: Replaces or checks mixed line ending.
stages: [commit]
- id: check-yaml
name: check yaml
description: checks yaml files for parseable syntax.
entry: check-yaml
language: python
types: [yaml]

# Terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.82.0 # See the release notes at https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
name: terraform fmt
description: Checks if the terraform code format is valid.
stages: [commit]
- id: terraform_tflint
name: terraform tflint
description: Automatic terraform linting.
stages: [commit]
exclude: (examples)
- id: terraform_validate
name: terraform validate
description: Terraform code validator.
stages: [commit]
exclude: (examples)
- id: terraform_docs
name: terraform docs
description: Generates terraform documentation.
args:
- --args=--config=.terraform-docs.yml
stages: [commit]
31 changes: 31 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
formatter: markdown table

version: ">= 0.16.0, < 1.0.0"

output:
file: README.md
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
sort:
enabled: true
by: name

settings:
anchor: true
color: true
default: true
description: false
escape: true
hide-empty: false
html: true
indent: 2
lockfile: false
read-comments: true
required: true
sensitive: true
type: true
Loading

0 comments on commit e226184

Please sign in to comment.