diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..c6f8e15 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Temporary to limit notification noise: +* @ramonsnir \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b0d7e00 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..514953a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributions + +🎉 Thanks for considering contributing to this project! 🎉 + +These guidelines will help you send a pull request. + +If you're submitting an issue instead, please skip this document. + +If your pull request is related to a typo or the documentation being unclear, please click on the relevant page's `Edit` +button (pencil icon) and directly suggest a correction instead. Note that most documentation files are auto-generated from code files. + +This project was made with ❤️. The simplest way to give back is by starring and sharing it online. + +Everyone is welcome regardless of personal background. We enforce a [Code of conduct](CODE_OF_CONDUCT.md) in order to +promote a positive and inclusive environment. + +## Local Development + +### Requirements + +- [Terraform](https://developer.hashicorp.com/terraform/downloads) >= 1.0 +- [Go](https://golang.org/doc/install) >= 1.21 + +### Building the Provider + +1. Clone the repository +1. Enter the repository directory +1. Build the provider using `make build` + +To generate or update documentation, run `make generate`. + +If you updated the `openapi.json` file, you will need to run `make openapi_generate` to update the generated code. + +### Testing the Provider Locally + +To use the provider, you must [generate a Netlify Personal Access Token](https://docs.netlify.com/cli/get-started/#obtain-a-token-in-the-netlify-ui). The token can be provided to the provider using the `NETLIFY_TOKEN` environment variable, or by using the `token` argument in the provider configuration block. + +```hcl +provider "netlify" { + token = "YOUR_NETLIFY_TOKEN" +} +``` + +See the [Debugging](https://developer.hashicorp.com/terraform/plugin/debugging) page in the Terraform documentation on how to use the locally-built version of the provider. It is generally easiest to use the instructions under "Terraform CLI Development Overrides" for local testing. + +## License + +By contributing to Netlify Terraform provider, you agree that your contributions will be licensed under its +[MIT license](LICENSE). \ No newline at end of file diff --git a/GNUmakefile b/GNUmakefile index c54dfc4..b7ebd41 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,8 +6,8 @@ help: ## Show this help. all: deps openapi_generate generate test testacc # build -# build: ## Build Terraform provider. -# go build ??? +build: ## Build Terraform provider. + go install . deps: ## Install dependencies. go mod download diff --git a/README.md b/README.md index 183142c..1315279 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,13 @@ Then commit the changes to `go.mod` and `go.sum`. ## Using the provider -Fill this in for each provider +To use the provider, you must [generate a Netlify Personal Access Token](https://docs.netlify.com/cli/get-started/#obtain-a-token-in-the-netlify-ui). The token can be provided to the provider using the `NETLIFY_TOKEN` environment variable, or by using the `token` argument in the provider configuration block. + +```hcl +provider "netlify" { + token = "YOUR_NETLIFY_TOKEN" +} +``` ## Developing the Provider @@ -39,7 +45,7 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. -To generate or update documentation, run `go generate`. +To generate or update documentation, run `make generate`. In order to run the full suite of Acceptance tests, run `make testacc`.