|
1 | 1 | # Terraform Provider for Hatchet Cloud |
2 | | - |
3 | | -A Terraform provider for managing Hatchet Cloud resources. |
4 | | - |
5 | | -## Requirements |
6 | | - |
7 | | -- [Terraform](https://www.terraform.io/downloads.html) >= 1.0 |
8 | | -- [Go](https://golang.org/doc/install) >= 1.21 |
9 | | - |
10 | | -## Building The Provider |
11 | | - |
12 | | -1. Clone the repository |
13 | | -2. Enter the repository directory |
14 | | -3. Build the provider using the Go `go build` command: |
15 | | - |
16 | | -```shell |
17 | | -go build -o terraform-provider-hatchetcloud |
18 | | -``` |
19 | | - |
20 | | -## Installing the Provider |
21 | | - |
22 | | -### Local Installation |
23 | | - |
24 | | -To install the provider locally for development: |
25 | | - |
26 | | -```shell |
27 | | -make install |
28 | | -``` |
29 | | - |
30 | | -This will build the provider and install it in the correct location for Terraform to find it. |
31 | | - |
32 | | -### Using the Provider |
33 | | - |
34 | | -Create a Terraform configuration file (e.g., `main.tf`) with the following content: |
35 | | - |
36 | | -```hcl |
37 | | -terraform { |
38 | | - required_providers { |
39 | | - hatchetcloud = { |
40 | | - source = "hatchet-dev/hatchetcloud" |
41 | | - version = "~> 1.0" |
42 | | - } |
43 | | - } |
44 | | -} |
45 | | -
|
46 | | -provider "hatchetcloud" { |
47 | | - # endpoint is optional and defaults to "cloud.onhatchet.run" |
48 | | - # token is required |
49 | | - token = "your-api-token-here" |
50 | | -} |
51 | | -``` |
52 | | - |
53 | | -## Development |
54 | | - |
55 | | -### Running Tests |
56 | | - |
57 | | -```shell |
58 | | -make test |
59 | | -``` |
60 | | - |
61 | | -### Formatting Code |
62 | | - |
63 | | -```shell |
64 | | -make fmt |
65 | | -``` |
66 | | - |
67 | | -### Generating Documentation |
68 | | - |
69 | | -```shell |
70 | | -make docs |
71 | | -``` |
72 | | - |
73 | | -### Cleaning Build Artifacts |
74 | | - |
75 | | -```shell |
76 | | -make clean |
77 | | -``` |
78 | | - |
79 | | -## Provider Configuration |
80 | | - |
81 | | -The Hatchet Cloud provider supports the following configuration options: |
82 | | - |
83 | | -- `endpoint` (Optional): The Hatchet Cloud API endpoint. Defaults to "cloud.onhatchet.run". |
84 | | -- `token` (Required, Sensitive): Your Hatchet Cloud API token for authentication. |
85 | | - |
86 | | -## Contributing |
87 | | - |
88 | | -1. Fork the repository |
89 | | -2. Create a feature branch |
90 | | -3. Make your changes |
91 | | -4. Add tests for your changes |
92 | | -5. Run the test suite |
93 | | -6. Submit a pull request |
94 | | - |
95 | | -## License |
96 | | - |
97 | | -This project is licensed under the MIT License. |
0 commit comments