Skip to content

Commit 8c20676

Browse files
authored
add rdma_cluster_id attribute to bare metal instance (#157)
* update change log * add rdma_cluster_id attribute
1 parent 8d87cde commit 8c20676

File tree

7 files changed

+24
-6
lines changed

7 files changed

+24
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.38.1 (2023-09-03)
2+
3+
FEATURES:
4+
5+
* add rdma_cluster_id attribute to bare metal instance
6+
17
## 1.38.0 (2023-09-03)
28

39
FEATURES:

examples/rssd/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
ucloud = {
44
source = "ucloud/ucloud"
5-
version = "~>1.38.0"
5+
version = "~>1.38.1"
66
}
77
}
88
}

ucloud/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (c *Config) Client() (*UCloudClient, error) {
7272
// enable auto retry with http/connection error
7373
cfg.MaxRetries = c.MaxRetries
7474
cfg.LogLevel = log.PanicLevel
75-
cfg.UserAgent = "Terraform-UCloud/1.38.0"
75+
cfg.UserAgent = "Terraform-UCloud/1.38.1"
7676
cfg.BaseUrl = c.BaseURL
7777

7878
cred := auth.NewCredential()

ucloud/resource_ucloud_baremetal_instance.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ func resourceUCloudBareMetalInstance() *schema.Resource {
213213
"no_raid",
214214
}, false),
215215
},
216+
"rdma_cluster_id": {
217+
Type: schema.TypeString,
218+
Computed: true,
219+
},
216220
},
217221
}
218222
}
@@ -454,6 +458,8 @@ func resourceUCloudBareMetalInstanceRead(d *schema.ResourceData, meta interface{
454458
if _, ok := d.GetOk("network_interface"); ok {
455459
d.Set("network_interface", networkInterfaces)
456460
}
461+
462+
d.Set("rdma_cluster_id", instance.RdmaClusterId)
457463
return nil
458464
}
459465

website/docs/d/baremetal_images.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "Bare Metail (UPhost)"
2+
subcategory: "Bare Metal (UPhost)"
33
layout: "ucloud"
44
page_title: "UCloud: ucloud_baremetal_images"
55
sidebar_current: "docs-ucloud-datasource-baremetal-images"

website/docs/index.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ terraform {
2323
required_providers {
2424
ucloud = {
2525
source = "ucloud/ucloud"
26-
version = "~>1.38.0"
26+
version = "~>1.38.1"
2727
}
2828
}
2929
}
@@ -91,7 +91,7 @@ terraform {
9191
required_providers {
9292
ucloud = {
9393
source = "ucloud/ucloud"
94-
version = "~>1.38.0"
94+
version = "~>1.38.1"
9595
}
9696
}
9797
}

website/docs/r/baremetal_instance.html.markdown

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "Bare Metail (UPhost)"
2+
subcategory: "Bare Metal (UPhost)"
33
layout: "ucloud"
44
page_title: "UCloud: ucloud_baremetal_instance"
55
sidebar_current: "docs-ucloud-resource-baremetal-instance"
@@ -76,6 +76,12 @@ The `network_interface` block supports:
7676
- `eip_internet_type` - (Required, ForceNew) Type of Elastic IP routes. Possible values are: international as international BGP IP and bgp as china mainland BGP IP.
7777
- `eip_charge_mode` - (Required, ForceNew) Elastic IP charge mode. Possible values are raid1, raid0, raid10, raid5 and no_raid.
7878

79+
## Attributes Reference
80+
81+
In addition to all arguments above, the following attributes are exported:
82+
83+
* `rdma_cluster_id` - The RDMA Cluster ID of disk. It is mandatory if your disk type is `rssd_data_disk` in `ucloud_disk` resource and must be set to the same value as the bare metal instance to attach to.
84+
7985
## Import
8086

8187
Bare metal instance can be imported using the `id`, e.g.

0 commit comments

Comments
 (0)