chore(docs): improve docs for image_v2 and machine_type (#977)
* chore(docs): improve docs for image_v2 and machine_type Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud> * review changes Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud> --------- Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
This commit is contained in:
parent
0eaaf75588
commit
7c1920f55e
4 changed files with 32 additions and 10 deletions
|
|
@ -20,6 +20,10 @@ description: |-
|
|||
}
|
||||
}
|
||||
|
||||
You can also list available images using the STACKIT CLI https://github.com/stackitcloud/stackit-cli:
|
||||
|
||||
stackit image list
|
||||
|
||||
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
|
||||
---
|
||||
|
||||
|
|
@ -47,6 +51,12 @@ resource "stackit_server" "example" {
|
|||
}
|
||||
```
|
||||
|
||||
You can also list available images using the [STACKIT CLI](https://github.com/stackitcloud/stackit-cli):
|
||||
|
||||
```bash
|
||||
stackit image list
|
||||
```
|
||||
|
||||
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
|
||||
|
||||
## Example Usage
|
||||
|
|
|
|||
|
|
@ -52,7 +52,13 @@ Examples:
|
|||
- extraSpecs.cpu == "intel-icelake-generic"
|
||||
- extraSpecs.cpu == "intel-icelake-generic" && vcpus == 2
|
||||
|
||||
See https://expr-lang.org/docs/language-definition for syntax.
|
||||
Syntax reference: https://expr-lang.org/docs/language-definition
|
||||
|
||||
You can also list available machine-types using the [STACKIT CLI](https://github.com/stackitcloud/stackit-cli):
|
||||
|
||||
```bash
|
||||
stackit server machine-type list
|
||||
```
|
||||
- `project_id` (String) STACKIT Project ID.
|
||||
|
||||
### Optional
|
||||
|
|
|
|||
|
|
@ -178,6 +178,10 @@ func (d *imageDataV2Source) Schema(_ context.Context, _ datasource.SchemaRequest
|
|||
" ignore_changes = [boot_volume[0].source_id]\n"+
|
||||
" }\n"+
|
||||
"}\n"+
|
||||
"```\n\n"+
|
||||
"You can also list available images using the [STACKIT CLI](https://github.com/stackitcloud/stackit-cli):\n\n"+
|
||||
"```bash\n"+
|
||||
"stackit image list\n"+
|
||||
"```",
|
||||
), core.Datasource)
|
||||
resp.Schema = schema.Schema{
|
||||
|
|
|
|||
|
|
@ -92,15 +92,17 @@ func (d *machineTypeDataSource) Schema(_ context.Context, _ datasource.SchemaReq
|
|||
Optional: true,
|
||||
},
|
||||
"filter": schema.StringAttribute{
|
||||
Description: `Expr-lang filter for filtering machine types.
|
||||
|
||||
Examples:
|
||||
- vcpus == 2
|
||||
- ram >= 2048
|
||||
- extraSpecs.cpu == "intel-icelake-generic"
|
||||
- extraSpecs.cpu == "intel-icelake-generic" && vcpus == 2
|
||||
|
||||
See https://expr-lang.org/docs/language-definition for syntax.`,
|
||||
Description: "Expr-lang filter for filtering machine types.\n\n" +
|
||||
"Examples:\n" +
|
||||
"- vcpus == 2\n" +
|
||||
"- ram >= 2048\n" +
|
||||
"- extraSpecs.cpu == \"intel-icelake-generic\"\n" +
|
||||
"- extraSpecs.cpu == \"intel-icelake-generic\" && vcpus == 2\n\n" +
|
||||
"Syntax reference: https://expr-lang.org/docs/language-definition\n\n" +
|
||||
"You can also list available machine-types using the [STACKIT CLI](https://github.com/stackitcloud/stackit-cli):\n\n" +
|
||||
"```bash\n" +
|
||||
"stackit server machine-type list\n" +
|
||||
"```",
|
||||
Required: true,
|
||||
},
|
||||
"description": schema.StringAttribute{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue