Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit 2f9f2f4

Browse files
committed
feat: add sdcard data source
Signed-off-by: Justin Lecher <[email protected]>
1 parent e66ffd4 commit 2f9f2f4

24 files changed

+347
-493
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,4 @@ nomad/nomad.rc
342342
# Custom rules
343343
#
344344
###############################################################################
345+
terraform-provider-turing-pi-bmc

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ repos:
8989
args:
9090
- --hook-config=--add-to-existing-file=true
9191
- id: terraform_providers_lock
92+
exclude: "examples"
9293
- id: terraform_tflint
9394
- id: terraform_tfsec
9495
args:

docs/data-sources/scaffolding_example.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/data-sources/sdcard.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "turing-pi-bmc_sdcard Data Source - terraform-provider-turing-pi-bmc"
4+
subcategory: ""
5+
description: |-
6+
Turing PI SDCard Data Source
7+
---
8+
9+
# turing-pi-bmc_sdcard (Data Source)
10+
11+
Turing PI SDCard Data Source
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Read-Only
19+
20+
- `free` (Number) Total capacity of SDCard
21+
- `id` (String) ID
22+
- `total` (Number) Total capacity of SDCard
23+
- `use` (Number) Total capacity of SDCard

docs/index.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
page_title: "turing-pi-bmc Provider"
44
subcategory: ""
55
description: |-
6-
6+
77
---
88

99
# turing-pi-bmc Provider
@@ -13,14 +13,23 @@ description: |-
1313
## Example Usage
1414

1515
```terraform
16-
provider "scaffolding" {
17-
# example configuration here
16+
terraform {
17+
required_providers {
18+
turing-pi-bmc = {
19+
source = "jlec.de/dev/turing-pi-bmc"
20+
version = ">0"
21+
}
22+
}
23+
}
24+
25+
provider "turing-pi-bmc" {
26+
endpoint = "10.100.100.231"
1827
}
1928
```
2029

2130
<!-- schema generated by tfplugindocs -->
2231
## Schema
2332

24-
### Optional
33+
### Required
2534

26-
- `endpoint` (String) Example provider attribute
35+
- `endpoint` (String) Turing Pi BMC endpoint

docs/resources/scaffolding_example.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

examples/data-sources/scaffolding_example/data-source.tf

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
terraform {
3+
required_version = "~>1.4"
4+
5+
required_providers {
6+
turing-pi-bmc = {
7+
source = "jlec.de/dev/turing-pi-bmc"
8+
version = ">0"
9+
}
10+
}
11+
}
12+
13+
provider "turing-pi-bmc" {
14+
endpoint = "10.100.100.231"
15+
}
16+
17+
data "turing-pi-bmc_sdcard" "example" {
18+
}
19+
20+
output "sdcard" {
21+
value = data.turing-pi-bmc_sdcard.example
22+
}

examples/provider/provider.tf

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
provider "scaffolding" {
2-
# example configuration here
1+
terraform {
2+
required_version = "~>1.4"
3+
4+
required_providers {
5+
turing-pi-bmc = {
6+
source = "jlec.de/dev/turing-pi-bmc"
7+
version = ">0"
8+
}
9+
}
10+
}
11+
12+
provider "turing-pi-bmc" {
13+
endpoint = "10.100.100.231"
314
}

examples/resources/scaffolding_example/resource.tf

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)