@@ -19,6 +19,20 @@ Please see the [Terraform Registry documentation](https://registry.terraform.io/
1919| ` make testacc ` | Run acceptance tests |
2020| ` make help ` | Show all available commands |
2121
22+ ### Test your changes
23+
24+ Test your changes by running the acceptance tests.
25+
26+ For example, to test alerts source resource in ` provider/resource_alerts_source_test.go ` :
27+
28+ ```
29+ ROOTLY_API_TOKEN="xxx" make testacc TESTARGS="-run TestAccResourceAlertsSource"
30+ ```
31+
32+ To run the tests pointed at an API URL of your choice set the ` ROOTLY_API_URL ` environment variable.
33+
34+ To enable debug logs set ` TF_LOG=DEBUG ` .
35+
2236### Updating provider
2337
2438` make build ` auto-generates code from Rootly's JSON-API schema, compiles provider code, and regenerates docs.
@@ -72,49 +86,3 @@ Releases are automatically published to Terraform Registry when a new tag is pus
72862 . ** CI Trigger** : Pushed tags trigger CI/GoReleaser workflow
73873 . ** Automatic Release** : CI builds and publishes releases to GitHub and Terraform Registry
74884 . ** Version Injection** : The correct version is automatically set in the provider binary during CI build
75-
76- ### Local build
77-
78- ```
79- # build local terraform provider, note every time you make a change
80- go build -o terraform-provider-rootly
81-
82- ```
83-
84- Configure a local Terraform registry ` terraform.local ` in ` ~/.terraform.rc `
85-
86- ```
87- provider_installation {
88- filesystem_mirror {
89- path = "~/.terraform.d/plugins"
90- }
91- direct {
92- exclude = ["terraform.local/*/*"]
93- }
94- }
95- ```
96-
97- After building, copy the plugin to the local registry. Change the architecture label as necessary.
98-
99- ```
100- # make the directory
101- mkdir -p ~/.terraform.d/plugins/terraform.local/local/rootly/1.0.0/darwin_arm64/
102-
103- # copy the provider
104- cp terraform-provider-rootly ~/.terraform.d/plugins/terraform.local/local/rootly/1.0.0/darwin_arm64/terraform-provider-rootly_v1.0.0
105- ```
106-
107- In your Terraform configuration, specify the local plugin and version 1.0.0:
108-
109- ```
110- terraform {
111- required_providers {
112- rootly = {
113- source = "terraform.local/local/rootly"
114- version = "1.0.0"
115- }
116- }
117- }
118- ```
119-
120- Now running ` terraform init ` will install the local build.
0 commit comments