-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,798 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: | ||
- "@commitlint/config-conventional" | ||
|
||
rules: | ||
subject-case: [2, "always", ["sentence-case"]] | ||
footer-max-line-length: [0, "always", 100] | ||
footer-max-length: [0, "always", 100] | ||
header-max-length: [0, "always", 100] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
**/.env | ||
**/output.txt | ||
last-test.log | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Workaround to get lint-staged to work outside of main shell | ||
# (e.g. Git GUIs) | ||
ASDF_SHIMS_PATH=$(realpath ~/.asdf/shims) | ||
ASDF_BIN_PATH=$(realpath ~/.asdf/bin) | ||
PATH="$ASDF_SHIMS_PATH:$ASDF_BIN_PATH:$PATH" npx --no -- commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Workaround to get lint-staged to work outside of main shell | ||
# (e.g. Git GUIs) | ||
ASDF_SHIMS_PATH=$(realpath ~/.asdf/shims) | ||
ASDF_BIN_PATH=$(realpath ~/.asdf/bin) | ||
PATH="$ASDF_SHIMS_PATH:$ASDF_BIN_PATH:$PATH" npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
"*.{tf,hcl}": "node with-direnv.js just format-hcl", | ||
"*.go": "node with-direnv.js just format-go", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
branches: | ||
- "+([0-9])?(.{+([0-9]),x}).x" | ||
- main | ||
- name: beta | ||
prerelease: true | ||
- name: alpha | ||
prerelease: true | ||
|
||
repositoryUrl: https://github.com/petsinc/terraform-provider-telnyx | ||
|
||
plugins: | ||
- "@semantic-release/commit-analyzer" | ||
- "@semantic-release/release-notes-generator" | ||
- "@semantic-release/github" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
terraform 1.7.3 | ||
nodejs 18.19.0 | ||
pnpm 8.10.2 | ||
|
||
# Be sure to keep this in sync with .github/release.yml | ||
golang 1.22.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Telnyx Terraform Provider | ||
|
||
This is a Terraform provider for Telnyx. It is currently in alpha status and not recommended | ||
for production use. | ||
|
||
## Documentation | ||
|
||
The provider [documentation can be found on the registry](https://registry.terraform.io/providers/petsinc/telnyx/latest/docs). | ||
|
||
## Developing | ||
|
||
### Initial Setup | ||
|
||
#### Direct System Dependencies | ||
|
||
First, you need a couple global dependencies installed, see their documentation for details: | ||
|
||
- [direnv](https://direnv.net/docs/installation.html) | ||
- [asdf](https://asdf-vm.com/guide/getting-started.html) | ||
- Be sure to use the official `git` installation method or you may have issues with | ||
pre-commit hooks finding `~/.asdf/bin` | ||
|
||
Note that these tools require a UNIX-style shell, such as bash or zsh. If | ||
you are on Windows, you can use WSL or Git Bash. If you are using Pycharm, | ||
you can configure the built-in terminal to use Git Bash. | ||
|
||
#### First Steps | ||
|
||
Clone the repo and run `direnv allow`. This will take a while on the first time to install the remaining dependencies. | ||
|
||
#### ENV Variables | ||
|
||
You will need to set `TELNYX_API_KEY` in the `.env` file to run tests. | ||
|
||
## Day-to-day Development | ||
|
||
### Tests | ||
|
||
To run all tests, run `just test`. If you add a new resource, be sure to add it | ||
to the tests in `provider_test.go`. | ||
|
||
### Conventional Commits & Semantic Release | ||
|
||
This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) | ||
to power [semantic release](https://semantic-release.gitbook.io/semantic-release/). This means | ||
that when you commit, you should use the following format: | ||
|
||
``` | ||
<type>[optional scope]: <description> | ||
``` | ||
|
||
For example, `feat: Add new feature` or `fix: Fix bug`. | ||
|
||
When creating a PR, please name the PR in this way as well so that the squashed | ||
commit from the PR will have a conventional commit message. There is a PR | ||
check that enforces this. | ||
|
||
### Pre-commit Hooks | ||
|
||
This project uses Husky and Lint-staged to run pre-commit hooks. This means that | ||
when you commit, it will format the files | ||
you edited, and also check that your commit message is a conventional commit. | ||
|
||
If you are not able to commit, it is likely because your commit message is not | ||
in the conventional commit format. | ||
|
||
### `justfile` | ||
|
||
This project uses [`just`](https://github.com/casey/just) to automate various | ||
project activities. Any new project commands should be added to the `justfile`. | ||
|
||
There are commands such as `just test` and `just format-go`, see | ||
the `justfile` for more details. | ||
|
||
## Author | ||
|
||
This project is authored by Patient Engagement Technologies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "local-dev", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"just": "./scripts/env/bin/just", | ||
"prepare": "husky install" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@commitlint/cli": "^16.2.3", | ||
"@commitlint/config-conventional": "^16.2.1", | ||
"lint-staged": "^12.4.1", | ||
"husky": "^7.0.4" | ||
} | ||
} |
Oops, something went wrong.