Skip to content

Commit 5245912

Browse files
authored
Merge branch 'master' into instance_eos_warning_displays_5_types
2 parents 2c94d7e + 7fb48fd commit 5245912

File tree

9 files changed

+75
-8
lines changed

9 files changed

+75
-8
lines changed

docs/data-sources/baremetal_server.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ In addition to all above arguments, the following attributes are exported:
3535

3636
- `id` - The ID of the server.
3737

38+
The `scaleway_baremetal_server` data source exports certain attributes once the baremetal server information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. The exported attributes are those that come from the `scaleway_baremetal_server` [resource](../resources/baremetal_server.md)
39+
3840
~> **Important:** Baremetal servers' IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111`

docs/data-sources/cockpit_plan.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ page_title: "Scaleway: scaleway_cockpit_plan"
44
---
55
# scaleway_cockpit_plan
66

7-
The `scaleway_cockpit_plan` data source is used to fetch details about a specific Scaleway Cockpit pricing plan. This information can then be used to configure resources like `scaleway_cockpit`.
7+
**Note:** As of January 1st, 2025, Cockpit pricing plans have been deprecated. While this data source remains available temporarily for backward compatibility, Scaleway no longer supports configuring Cockpit resources using fixed pricing plans. Instead, you should now independently configure retention periods for your data sources (metrics, logs, and traces). Refer to [Scaleway Cockpit Documentation](https://www.scaleway.com/en/docs/cockpit/concepts/#retention) for updated guidelines and [pricing information](https://www.scaleway.com/en/docs/cockpit/faq/#how-am-i-billed-for-increasing-data-retention-period).
8+
9+
The `scaleway_cockpit_plan` data source retrieves details about a specific Scaleway Cockpit pricing plan. You can use this data source to manage existing Terraform configurations that reference Cockpit plans.
810

911
Find out more about [pricing plans](https://console.scaleway.com/cockpit/plans) in the Scaleway console.
1012

docs/resources/baremetal_server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ In addition to all arguments above, the following attributes are exported:
316316
- `os_name` - The name of the os.
317317
- `private_network` - The private networks attached to the server.
318318
- `id` - The ID of the private network.
319+
- `mapping_id` - The ID of the Server-to-Private Network mapping.
319320
- `vlan` - The VLAN ID associated to the private network.
320321
- `status` - The private network status.
321322
- `created_at` - The date and time of the creation of the private network.

docs/resources/cockpit.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ As of September 2024, Cockpit has introduced [regionalization](https://www.scale
1010
If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized [data sources](../resources/cockpit_source.md).
1111

1212
-> **Note:**
13-
Cockpit plans scheduled for deprecation on January 1st 2025.
14-
The retention period previously set for your logs and metrics will remain the same after that date.
15-
You will be able to edit the retention period for your metrics, logs, and traces for free during Beta.
13+
From January 1st 2025, Cockpit plans have been deprecated. You can now edit the retention period for all your datasources (metrics, logs, and traces) separately. Refer to our product documentation for more information on [possible retention values](https://www.scaleway.com/en/docs/cockpit/concepts/#retention) and [pricing](https://www.scaleway.com/en/docs/cockpit/faq/#how-am-i-billed-for-increasing-data-retention-period).
1614

1715
Please note that even if you provide the grafana_url, it will only be active if a [Grafana user](../resources/cockpit_grafana_user.md) is created first. Make sure to create a Grafana user in your Cockpit instance to enable full access to Grafana.
1816

docs/resources/mnq_sns_credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The following arguments are supported:
3434

3535
- `name` - (Optional) The unique name of the SNS credentials.
3636

37-
- `permissions` - (Optional). List of permissions associated with these credentials. Only one of the following permissions may be set:
37+
- `permissions` - (Optional). List of permissions associated with these credentials.
3838
- `can_publish` - (Optional). Defines whether the user can publish messages to the service.
3939
- `can_receive` - (Optional). Defines whether the user can receive messages from the service.
4040
- `can_manage` - (Optional). Defines whether the user can manage the associated resource(s).

docs/resources/mnq_sqs_credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The following arguments are supported:
3434

3535
- `name` - (Optional) The unique name of the SQS credentials.
3636

37-
- `permissions` - (Optional). List of permissions associated with these credentials. Only one of the following permissions may be set:
37+
- `permissions` - (Optional). List of permissions associated with these credentials.
3838
- `can_publish` - (Optional). Defines whether the user can publish messages to the service.
3939
- `can_receive` - (Optional). Defines whether the user can receive messages from the service.
4040
- `can_manage` - (Optional). Defines whether the user can manage the associated resource(s).

docs/resources/vpc_route.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For more information, see [the main documentation](https://www.scaleway.com/en/d
1010

1111
## Example Usage
1212

13-
### Basic
13+
### With Instance
1414

1515
```terraform
1616
resource "scaleway_vpc" "vpc01" {
@@ -45,6 +45,64 @@ resource "scaleway_vpc_route" "rt01" {
4545
}
4646
```
4747

48+
### With Baremetal
49+
50+
```terraform
51+
resource "scaleway_vpc" "vpc01" {
52+
name = "tf-vpc-vpn"
53+
}
54+
55+
resource "scaleway_vpc_private_network" "pn01" {
56+
name = "tf-pn-vpn"
57+
ipv4_subnet {
58+
subnet = "172.16.64.0/22"
59+
}
60+
vpc_id = scaleway_vpc.vpc01.id
61+
}
62+
63+
data "scaleway_baremetal_os" "my_os" {
64+
zone = "fr-par-2"
65+
name = "Ubuntu"
66+
version = "22.04 LTS (Jammy Jellyfish)"
67+
}
68+
69+
data "scaleway_baremetal_offer" "my_offer" {
70+
zone = "fr-par-2"
71+
name = "EM-B112X-SSD"
72+
}
73+
74+
data "scaleway_baremetal_option" "private_network" {
75+
zone = "fr-par-2"
76+
name = "Private Network"
77+
}
78+
79+
data "scaleway_iam_ssh_key" "my_key" {
80+
name = "main"
81+
}
82+
83+
resource "scaleway_baremetal_server" "my_server" {
84+
zone = "fr-par-2"
85+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
86+
os = data.scaleway_baremetal_os.my_os.os_id
87+
ssh_key_ids = [data.scaleway_iam_ssh_key.my_key.id]
88+
89+
options {
90+
id = data.scaleway_baremetal_option.private_network.option_id
91+
}
92+
private_network {
93+
id = scaleway_vpc_private_network.pn01.id
94+
}
95+
}
96+
97+
resource "scaleway_vpc_route" "rt01" {
98+
vpc_id = scaleway_vpc.vpc01.id
99+
description = "tf-route-vpn"
100+
tags = ["tf", "route"]
101+
destination = "10.0.0.0/24"
102+
nexthop_resource_id = scaleway_baremetal_server.my_server.private_network.0.mapping_id
103+
}
104+
```
105+
48106
## Argument Reference
49107

50108
The following arguments are supported:

internal/services/baremetal/server.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,18 @@ If this behaviour is wanted, please set 'reinstall_on_ssh_key_changes' argument
217217
Schema: map[string]*schema.Schema{
218218
"id": {
219219
Type: schema.TypeString,
220-
Description: "The private network ID",
220+
Description: "The ID of the private network to associate with the server",
221221
Required: true,
222222
ValidateDiagFunc: verify.IsUUIDorUUIDWithLocality(),
223223
StateFunc: func(i interface{}) string {
224224
return locality.ExpandID(i.(string))
225225
},
226226
},
227+
"mapping_id": {
228+
Type: schema.TypeString,
229+
Description: "The ID of the Server-to-Private Network mapping",
230+
Computed: true,
231+
},
227232
"ipam_ip_ids": {
228233
Type: schema.TypeList,
229234
Optional: true,

internal/services/baremetal/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func flattenPrivateNetworks(region scw.Region, privateNetworks []*baremetalV3.Se
195195
for _, privateNetwork := range privateNetworks {
196196
flattenedPrivateNetworks = append(flattenedPrivateNetworks, map[string]interface{}{
197197
"id": regional.NewIDString(region, privateNetwork.PrivateNetworkID),
198+
"mapping_id": regional.NewIDString(region, privateNetwork.ID),
198199
"ipam_ip_ids": regional.NewRegionalIDs(region, privateNetwork.IpamIPIDs),
199200
"vlan": types.FlattenUint32Ptr(privateNetwork.Vlan),
200201
"status": privateNetwork.Status,

0 commit comments

Comments
 (0)