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: docs/resources/iot_device.md
+25-2
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,27 @@ resource scaleway_iot_device main {
27
27
}
28
28
```
29
29
30
+
### With custom certificate
31
+
32
+
```hcl
33
+
resource scaleway_iot_hub main {
34
+
name = "test-iot"
35
+
product_plan = "plan_shared"
36
+
}
37
+
38
+
data local_file device_cert {
39
+
filename = "device-certificate.pem"
40
+
}
41
+
42
+
resource scaleway_iot_device main {
43
+
hub_id = scaleway_iot_hub.main.id
44
+
name = "test-iot"
45
+
certificate {
46
+
crt = data.local_file.device_cert.content
47
+
}
48
+
}
49
+
```
50
+
30
51
## Arguments Reference
31
52
32
53
The following arguments are supported:
@@ -55,6 +76,9 @@ The following arguments are supported:
55
76
-`policy` (Optional) Same as publish rules.
56
77
-`topics` (Optional) Same as publish rules.
57
78
79
+
-`certificate.crt` - (Optional) The certificate of the device, either generated by Scaleway or provided.
80
+
81
+
~> **Important:** Updates to `certificate.crt` will disconnect connected devices and the previous certificate will be deleted and won't be recoverable.
58
82
59
83
## Attributes Reference
60
84
@@ -64,8 +88,7 @@ In addition to all arguments above, the following attributes are exported:
64
88
-`created_at` - The date and time the device was created.
65
89
-`updated_at` - The date and time the device resource was updated.
66
90
-`certificate` - The certificate bundle of the device.
67
-
-`crt` - The certificate of the device.
68
-
-`key` - The private key of the device.
91
+
-`key` - The private key of the device, in case it is generated by Scaleway.
69
92
-`status` - The current status of the device.
70
93
-`last_activity_at` - The last MQTT activity of the device.
71
94
-`is_connected` - The current connection status of the device.
0 commit comments