-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement dedicated_server_operating_systems data source (#52)
* feat: implement dedicated_server_operating_systems data source --------- Co-authored-by: Imtiaz Ahmed <[email protected]>
- Loading branch information
1 parent
020cd06
commit 590475a
Showing
30 changed files
with
562 additions
and
40 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* @alrayyes | ||
* @majidkarimizadeh | ||
* @imtiazPabel | ||
* @arunvarghe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "leaseweb_dedicated_server_operating_systems Data Source - leaseweb" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# leaseweb_dedicated_server_operating_systems (Data Source) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
# List all Dedicated server operating systems | ||
data "leaseweb_dedicated_server_operating_systems" "all" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `operating_systems` (Attributes List) (see [below for nested schema](#nestedatt--operating_systems)) | ||
|
||
<a id="nestedatt--operating_systems"></a> | ||
### Nested Schema for `operating_systems` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) |
2 changes: 2 additions & 0 deletions
2
examples/data-sources/leaseweb_dedicated_server_operating_systems/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# List all Dedicated server operating systems | ||
data "leaseweb_dedicated_server_operating_systems" "all" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package dedicated_server | ||
|
||
type OperatingSystem struct { | ||
Id string | ||
Name string | ||
} | ||
|
||
func NewOperatingSystem(id string, name string) OperatingSystem { | ||
return OperatingSystem{Id: id, Name: name} | ||
} |
14 changes: 14 additions & 0 deletions
14
internal/core/domain/dedicated_server/operating_system_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dedicated_server | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestNew(t *testing.T) { | ||
got := NewOperatingSystem("id", "name") | ||
want := OperatingSystem{Id: "id", Name: "name"} | ||
|
||
assert.Equal(t, want, got) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package dedicated_server | ||
|
||
type OperatingSystems []OperatingSystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.