You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-8Lines changed: 49 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,26 +10,28 @@
10
10
-[Terraform](https://developer.hashicorp.com/terraform/install) or [OpenTofu](https://opentofu.org/docs/intro/install/)
11
11
- Our provider tests run with Terraform or OpenTofu releases that are supported upstream.
12
12
- Our provider should work with any tool that supports the [terraform plugin protocol version 6](https://developer.hashicorp.com/terraform/plugin/terraform-plugin-protocol#protocol-version-6).
13
-
-[Go](https://go.dev/doc/install)1.21.x (to build the provider plugin)
13
+
-[Go](https://go.dev/doc/install) (to build the provider plugin)
14
14
15
-
## API Stability
15
+
## Development
16
+
17
+
### API Stability
16
18
17
19
This Go module implements a Terraform Provider for Hetzner Cloud
18
20
Services. We thus guarantee backwards compatibility only for use through
19
21
Terraform HCL. The actual _Go code_ in this repository _may change
20
22
without a major version increase_.
21
23
22
-
Currently the code is mostly located in the `hcloud` package. In the
24
+
Currently, the code is mostly located in the `hcloud` package. In the
23
25
long term we want to move most of the `hcloud` package into individual
24
26
sub-packages located in the `internal` directory. The goal is a
25
27
structure similar to HashiCorp's [Terraform Provider
If you are building the provider, follow the instructions to [install it as a plugin](https://www.terraform.io/docs/plugins/basics.html#installing-a-plugin). After placing it into your plugins directory, run `terraform init` to initialize it.
31
33
32
-
## Building the provider
34
+
###Building the provider
33
35
34
36
Clone repository to: `$GOPATH/src/github.com/hetznercloud/terraform-provider-hcloud`
35
37
@@ -45,7 +47,7 @@ $ cd $GOPATH/src/github.com/hetznercloud/terraform-provider-hcloud
45
47
$ make build
46
48
```
47
49
48
-
## Developing the provider
50
+
###Developing the provider
49
51
50
52
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.14+ is _required_). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
51
53
@@ -86,7 +88,7 @@ $ go test -v -timeout=30m -parallel=8 ./internal/server
86
88
# ...
87
89
```
88
90
89
-
## Running a local build
91
+
###Running a local build
90
92
91
93
Choose a terraform cli config file path:
92
94
@@ -133,7 +135,7 @@ You should see the following warning:
133
135
╵
134
136
```
135
137
136
-
## Releasing experimental features
138
+
###Releasing experimental features
137
139
138
140
To publish experimental features as part of regular releases:
139
141
@@ -159,3 +161,42 @@ To publish experimental features as part of regular releases:
1. Mark the attribute in the schema as deprecated (for SDKv2, the docs template may also need updating), in the message explain the deprecation and link to changelog, for example:
170
+
171
+
```go
172
+
funcResource() *schema.Resource {
173
+
return &schema.Resource{
174
+
// ...
175
+
Schema: map[string]*schema.Schema{
176
+
"datacenter": {
177
+
// ...
178
+
Deprecated: "The datacenter attribute is deprecated and will be removed after 1 July 2026. Please use the location attribute instead. See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.",
179
+
// ...
180
+
},
181
+
},
182
+
}
183
+
}
184
+
```
185
+
186
+
2.- For inputs: Implement backwards-compatible behaviour if possible
187
+
- For output: Keep writing the attribute for as long as it is returned from the API. Once it is no longer
188
+
returned the code should return the user config/previous state if available, or `""` (SDKv2) / `null` (Plugin Framework).
189
+
190
+
3. In the resource and datasource docs, add a `## Deprecations` section with a subsection for this field, explaining the behaviour and urging users to upgrade to a compatible version, for example:
191
+
192
+
```md
193
+
### `datacenter` attribute
194
+
195
+
The `datacenter` attribute is deprecated, use the `ABC` attribute instead.
196
+
197
+
See our the [API changelog](https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters) for more details.
198
+
199
+
-> Please upgrade to `v1.W.0+` of the provider to avoid issues once the Hetzner Cloud API no longer returns the `XYZ` attribute.
200
+
```
201
+
202
+
4. Highlight the deprecation in the Release Notes.
0 commit comments