Skip to content

feat: Add display_name to datasource ovh_dedicated_server #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ovh/data_dedicated_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ func dataSourceDedicatedServer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"display_name": {
Type: schema.TypeString,
Computed: true,
},
"boot_id": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -206,6 +210,7 @@ func dataSourceDedicatedServerRead(d *schema.ResourceData, meta interface{}) err

d.SetId(ds.Name)
d.Set("urn", ds.URN)
d.Set("display_name", ds.DisplayName)
d.Set("boot_id", ds.BootId)
d.Set("boot_script", ds.BootScript)
d.Set("commercial_range", ds.CommercialRange)
Expand Down
2 changes: 2 additions & 0 deletions ovh/data_dedicated_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func TestAccDedicatedServerDataSource_basic(t *testing.T) {
"data.ovh_dedicated_server.server", "boot_script", ""),
resource.TestCheckResourceAttrSet(
"data.ovh_dedicated_server.server", "urn"),
resource.TestCheckResourceAttrSet(
"data.ovh_dedicated_server.server", "display_name"),
),
},
},
Expand Down
31 changes: 16 additions & 15 deletions website/docs/d/dedicated_server.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,27 @@ data "ovh_dedicated_server" "server" {
`id` is set with the service_name of the dedicated server.
In addition, the following attributes are exported:

* `boot_id` - boot id of the server
* `boot_script` - boot script of the server
* `boot_id` - Boot id of the server
* `boot_script` - Boot script of the server
* `urn` - URN of the dedicated server instance
* `commercial_range` - dedicated server commercial range
* `datacenter` - dedicated datacenter localisation (bhs1,bhs2,...)
* `ip` - dedicated server ip (IPv4)
* `ips` - dedicated server ip blocks
* `link_speed` - link speed of the server
* `commercial_range` - Dedicated server commercial range
* `datacenter` - Dedicated datacenter localisation (bhs1,bhs2,...)
* `ip` - Dedicated server ip (IPv4)
* `ips` - Dedicated server ip blocks
* `link_speed` - Link speed of the server
* `monitoring` - Icmp monitoring state
* `name` - dedicated server name
* `name` - Dedicated server name
* `display_name` - Dedicated server display name
* `os` - Operating system
* `professional_use` - Does this server have professional use option
* `rack` - rack id of the server
* `rescue_mail` - rescue mail of the server
* `reverse` - dedicated server reverse
* `root_device` - root device of the server
* `server_id` - your server id
* `state` - error, hacked, hackedBlocked, ok
* `rack` - Rack id of the server
* `rescue_mail` - Rescue mail of the server
* `reverse` - Dedicated server reverse
* `root_device` - Root device of the server
* `server_id` - Server id
* `state` - Error, hacked, hackedBlocked, ok
* `support_level` - Dedicated server support level (critical, fastpath, gs, pro)
* `vnis` - the list of Virtualnetworkinterface assiociated with this server
* `vnis` - The list of Virtualnetworkinterface associated with this server
* `enabled` - VirtualNetworkInterface activation state
* `mode` - VirtualNetworkInterface mode (public,vrack,vrack_aggregation)
* `name` - User defined VirtualNetworkInterface name
Expand Down