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
ip_net = "172.16.20.4/22" # IP address within a given IP network
108
80
pn_id = scaleway_vpc_private_network.pn.id
81
+
ip_net = "172.16.20.4/22" # IP address within a given IP network
82
+
(enable_ipam = false)
109
83
}
110
-
disable_public_endpoint = true
111
84
}
112
85
```
113
86
87
+
#### 1 IPAM private network endpoint + 1 public endpoint
88
+
89
+
```hcl
90
+
resource "scaleway_vpc_private_network" "pn" {}
91
+
92
+
resource "scaleway_rdb_instance" "main" {
93
+
node_type = "DB-DEV-S"
94
+
engine = "PostgreSQL-11"
95
+
private_network {
96
+
pn_id = scaleway_vpc_private_network.pn.id
97
+
(enable_ipam = true)
98
+
}
99
+
load_balancer {}
100
+
}
101
+
```
102
+
103
+
#### Default: 1 public endpoint
104
+
105
+
```hcl
106
+
resource "scaleway_rdb_instance" "main" {
107
+
node_type = "db-dev-s"
108
+
engine = "PostgreSQL-11"
109
+
}
110
+
```
111
+
112
+
-> If nothing is defined, your instance will have a default public load-balancer endpoint
113
+
114
114
## Arguments Reference
115
115
116
116
The following arguments are supported:
@@ -145,6 +145,16 @@ and if you are using `bssd` storage, you should increase the volume size before
145
145
146
146
-`name` - (Optional) The name of the Database Instance.
147
147
148
+
-`tags` - (Optional) The tags associated with the Database Instance.
149
+
150
+
-`region` - (Defaults to [provider](../index.md#arguments-reference)`region`) The [region](../guides/regions_and_zones.md#regions)
151
+
in which the Database Instance should be created.
152
+
153
+
-`project_id` - (Defaults to [provider](../index.md#arguments-reference)`project_id`) The ID of the project the Database
154
+
Instance is associated with.
155
+
156
+
### Backups
157
+
148
158
-`disable_backup` - (Optional) Disable automated backup for the database instance.
149
159
150
160
-`backup_schedule_frequency` - (Optional) Backup schedule frequency in hours.
@@ -153,40 +163,32 @@ and if you are using `bssd` storage, you should increase the volume size before
153
163
154
164
-`backup_same_region` - (Optional) Boolean to store logical backups in the same region as the database instance.
155
165
156
-
-`init_settings` - (Optional) Map of engine settings to be set at database initialisation.
157
-
158
-
~> **Important:** Updates to `init_settings` will recreate the Database Instance.
166
+
### Settings
159
167
160
168
-`settings` - (Optional) Map of engine settings to be set. Using this option will override default config.
161
169
162
-
-`tags` - (Optional) The tags associated with the Database Instance.
163
-
164
-
-`disable_public_endpoint` - (Optional) Disable the default public endpoint
165
-
166
-
-`region` - (Defaults to [provider](../index.md#region)`region`) The [region](../guides/regions_and_zones.md#regions)
167
-
in which the Database Instance should be created.
168
-
169
-
-`project_id` - (Defaults to [provider](../index.md#project_id)`project_id`) The ID of the project the Database
170
-
Instance is associated with.
170
+
-`init_settings` - (Optional) Map of engine settings to be set at database initialisation.
171
171
172
-
## Settings
172
+
~> **Important:** Updates to `init_settings` will recreate the Database Instance.
173
173
174
-
Please consult
175
-
the [GoDoc](https://pkg.go.dev/github.com/scaleway/[email protected]/api/rdb/v1#EngineVersion) to list all
176
-
available `settings` and `init_settings` on your `node_type` of your convenient.
174
+
Please consult the [GoDoc](https://pkg.go.dev/github.com/scaleway/[email protected]/api/rdb/v1#EngineVersion) to list all available `settings` and `init_settings` for the `node_type` of your convenience.
177
175
178
-
##Private Network
176
+
### Endpoints
179
177
180
-
~> **Important:** Updates to `private_network`will recreate the attachment Instance.
178
+
-`private_network`- List of private networks endpoints of the database instance.
181
179
182
-
~> **NOTE:** Please calculate your host IP.
183
-
using [cirhost](https://developer.hashicorp.com/terraform/language/functions/cidrhost). Otherwise, lets IPAM service
180
+
-`pn_id` - (Required) The ID of the private network.
181
+
-`enable_ipam` - (Optional) Whether the endpoint should be configured with IPAM. Defaults to `false` if `ip_net` is defined, `true` otherwise.
182
+
-`ip_net` - (Optional) The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation.
183
+
The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
184
+
185
+
~> **NOTE:** Please calculate your host IP using [cidrhost](https://developer.hashicorp.com/terraform/language/functions/cidrhost). Otherwise, let IPAM service
184
186
handle the host IP on the network.
185
187
186
-
-`ip_net` - (Optional) The IP network address within the private subnet. This must be an IPv4 address with a
187
-
CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM)
188
-
service if not set.
189
-
-`pn_id` - (Required) The ID of the private network.
188
+
~> **Important:** Updates to `private_network` will recreate the Instance's endpoint
189
+
190
+
-`load_balancer` - (Optional) List of load balancer endpoints of the database instance. A load-balancer endpoint will be set by default if no private network is.
191
+
This block must be defined if you want a public endpoint in addition to your private endpoint.
0 commit comments