-
Notifications
You must be signed in to change notification settings - Fork 114
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
1 parent
60ed815
commit 127a442
Showing
1 changed file
with
36 additions
and
0 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,36 @@ | ||
# HTTP Provider Design | ||
|
||
The HTTP Provider offers functionality for interacting with generic HTTP servers as part of terraform configuration. | ||
Specifically, the provider issues an HTTP GET request to the defined URL on every Terraform run. | ||
|
||
Below we have a collection of _Goals_ and _Patterns_: they represent the guiding principles applied during the | ||
development of this provider. Some are in place, others are ongoing processes, others are still just inspirational. | ||
|
||
## Goals | ||
|
||
* [_Stability over features_](.github/CONTRIBUTING.md) | ||
* Provide managed data source to issue HTTP GET request. | ||
* Support usage of requests to URLs directed to either `http` or `https`. | ||
* Support the supplying of request headers. | ||
* Expose response headers returned from request. | ||
* Expose response body as string where applicable. | ||
|
||
## Patterns | ||
|
||
Specific to this provider: | ||
|
||
* Only idempotent GET requests are supported. | ||
* Only 200 status codes are considered successful. | ||
|
||
General to development: | ||
|
||
* **Avoid repetition**: the entities managed can sometimes require similar pieces of logic and/or schema to be realised. | ||
When this happens it's important to keep the code shared in communal sections, so to avoid having to modify code in | ||
multiple places when they start changing. | ||
* **Test expectations as well as bugs**: While it's typical to write tests to exercise a new functionality, it's key to | ||
also provide tests for issues that get identified and fixed, so to prove resolution as well as avoid regression. | ||
* **Automate boring tasks**: Processes that are manual, repetitive and can be automated, should be. In addition to be a | ||
time-saving practice, this ensures consistency and reduces human error (ex. static code analysis). | ||
* **Semantic versioning**: Adhering to HashiCorp's own | ||
[Versioning Specification](https://www.terraform.io/plugin/sdkv2/best-practices/versioning#versioning-specification) | ||
ensures we provide a consistent practitioner experience, and a clear process to deprecation and decommission. |