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
feat(primary-ip): make auto_delete attribute optional (#1429)
The `auto_delete` attribute is currently required, but we recommend
always setting its value to `false`:
Setting `auto_delete` to `false` is recommended, because if a server
assigned to the managed ip
is getting deleted, it will also delete the primary IP which will break
the terraform state.
This change makes the `auto_delete` attribute optional, and defaults to
false. Simplifying user's configurations and using a recommended
default.
https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/create_primary_ip
-`auto_delete` (Boolean) Whether auto delete is enabled. Setting `auto_delete` to `false` is recommended, because if a server assigned to the managed ip is getting deleted, it will also delete the primary IP which will break the terraform state.
70
69
-`name` (String) Name of the Primary IP.
71
70
-`type` (String) Type of the Primary IP (`ipv4` or `ipv6`).
72
71
73
72
### Optional
74
73
75
74
-`assignee_id` (Number) ID of the resource the Primary IP should be assigned to.
76
75
-`assignee_type` (String) Type of the resource the Primary IP should be assigned to.
76
+
-`auto_delete` (Boolean) Whether auto delete is enabled. Setting `auto_delete` to `true` is not recommended, because if a server assigned to the managed ip is deleted, it will also delete the primary IP which will break the terraform state.
77
77
-`datacenter` (String, Deprecated) Name of the Datacenter for the Primary IP. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-datacenters-are-there) for more details about datacenters.
78
78
-`delete_protection` (Boolean) Whether delete protection is enabled.
79
79
-`labels` (Map of String) User-defined [labels](https://docs.hetzner.cloud/reference/cloud#labels) (key-value pairs) for the resource.
Copy file name to clipboardExpand all lines: internal/primaryip/resource.go
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -123,8 +123,10 @@ communicating with the API.
123
123
Computed: true,
124
124
},
125
125
"auto_delete": schema.BoolAttribute{
126
-
MarkdownDescription: "Whether auto delete is enabled. Setting `auto_delete` to `false` is recommended, because if a server assigned to the managed ip is getting deleted, it will also delete the primary IP which will break the terraform state.",
127
-
Required: true,
126
+
MarkdownDescription: "Whether auto delete is enabled. Setting `auto_delete` to `true` is not recommended, because if a server assigned to the managed ip is deleted, it will also delete the primary IP which will break the terraform state.",
0 commit comments