Skip to content

Commit fd56e3b

Browse files
authored
feat(baremetal): add support for project in baremetal (#612)
1 parent e1cee81 commit fd56e3b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/resources/baremetal_server.md

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#g
5555

5656
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the server is associated with.
5757

58+
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the server is associated with.
59+
5860

5961
## Attributes Reference
6062

scaleway/resource_baremetal_server.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func resourceScalewayBaremetalServer() *schema.Resource {
8181
},
8282
"zone": zoneSchema(),
8383
"organization_id": organizationIDSchema(),
84+
"project_id": projectIDSchema(),
8485
"ips": {
8586
Type: schema.TypeList,
8687
Computed: true,
@@ -139,6 +140,7 @@ func resourceScalewayBaremetalServerCreate(d *schema.ResourceData, m interface{}
139140
Zone: zone,
140141
Name: expandOrGenerateString(d.Get("name"), "bm"),
141142
OrganizationID: expandStringPtr(d.Get("organization_id")),
143+
ProjectID: expandStringPtr(d.Get("project_id")),
142144
Description: d.Get("description").(string),
143145
OfferID: offerID.ID,
144146
Tags: expandStrings(d.Get("tags")),
@@ -210,6 +212,7 @@ func resourceScalewayBaremetalServerRead(d *schema.ResourceData, m interface{})
210212
_ = d.Set("name", server.Name)
211213
_ = d.Set("zone", server.Zone.String())
212214
_ = d.Set("organization_id", server.OrganizationID)
215+
_ = d.Set("project_id", server.ProjectID)
213216
_ = d.Set("offer_id", newZonedID(server.Zone, offer.ID).String())
214217
_ = d.Set("tags", server.Tags)
215218
_ = d.Set("domain", server.Domain)

0 commit comments

Comments
 (0)