Skip to content

Commit e00830e

Browse files
author
Clément Decoodt
committed
doc(iot): Add documentation for IoT Networks
1 parent f4370f1 commit e00830e

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

docs/resources/iot_network.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
layout: "scaleway"
3+
page_title: "Scaleway: scaleway_iot_network"
4+
description: |-
5+
Manages Scaleway IoT Networks.
6+
---
7+
8+
# scaleway_iot_network
9+
10+
-> **Note:** This terraform resource is currently in beta and might include breaking change in future releases.
11+
12+
Creates and manages Scaleway IoT Networks. For more information, see the following:
13+
14+
- [API documentation](https://developers.scaleway.com/en/products/iot/api).
15+
- [Product documentation](https://www.scaleway.com/en/docs/scaleway-iothub-networks/)
16+
17+
For more step-by-step instructions on how to setup the networks on the external providers backends, you can follow these guides:
18+
19+
- [Configuring the Sigfox backend](https://www.scaleway.com/en/docs/scaleway-iothub-networks/#-Configuring-the-Sigfox-backend)
20+
- [Using the Rest Network](https://www.scaleway.com/en/docs/scaleway-iothub-networks/#-Using-the-Rest-Network)
21+
22+
## Examples
23+
24+
```hcl
25+
resource "scaleway_iot_network" "main" {
26+
name = "main"
27+
hub_id = scaleway_iot_hub.main.id
28+
type = "sigfox"
29+
}
30+
resource "scaleway_iot_hub" "main" {
31+
name = "main"
32+
product_plan = "plan_shared"
33+
}
34+
```
35+
36+
## Arguments Reference
37+
38+
~> **Important:** Updates to any value will recreate the IoT Route.
39+
40+
The following arguments are supported:
41+
42+
- `name` - (Required) The name of the IoT Network you want to create (e.g. `my-net`).
43+
44+
- `hub_id` - (Required) The hub ID to which the Network will be attached to.
45+
46+
- `type` - (Required) The network type to create (e.g. `sigfox`).
47+
48+
- `topic_prefix` - (Optional) The prefix that will be prepended to all topics for this Network.
49+
50+
## Attributes Reference
51+
52+
In addition to all arguments above, the following attributes are exported:
53+
54+
- `id` - The ID of the Network.
55+
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the Network is attached to.
56+
- `created_at` - The date and time the Network was created.
57+
- `endpoint` - The endpoint to use when interacting with the network.
58+
- `secret` - The endpoint key to keep secret.
59+
60+
## Import
61+
62+
IoT Networks can be imported using the `{region}/{id}`, e.g.
63+
64+
```bash
65+
$ terraform import scaleway_iot_network.net01 fr-par/11111111-1111-1111-1111-111111111111
66+
```
67+

0 commit comments

Comments
 (0)