-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v17] Add dynamic Windows desktops to terraform provider (#49077)
* yaml * make tfschema * make tfschema again * make tfschema again + tests * tests + docs * lint * rename resource * example fix and labels --------- Co-authored-by: Przemko Robakowski <przemko.robakowski@goteleport.com>
- Loading branch information
1 parent
c66adad
commit 94b60fc
Showing
15 changed files
with
1,683 additions
and
8 deletions.
There are no files selected for viewing
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
58 changes: 58 additions & 0 deletions
58
docs/pages/reference/terraform-provider/data-sources/dynamic_windows_desktop.mdx
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,58 @@ | ||
--- | ||
title: Reference for the teleport_dynamic_windows_desktop Terraform data-source | ||
description: This page describes the supported values of the teleport_dynamic_windows_desktop data-source of the Teleport Terraform provider. | ||
--- | ||
|
||
{/*Auto-generated file. Do not edit.*/} | ||
{/*To regenerate, navigate to integrations/terraform and run `make docs`.*/} | ||
|
||
|
||
|
||
|
||
|
||
{/* schema generated by tfplugindocs */} | ||
## Schema | ||
|
||
### Required | ||
|
||
- `spec` (Attributes) Spec is the DynamicWindows host spec. (see [below for nested schema](#nested-schema-for-spec)) | ||
- `version` (String) Version is the API version used to create the resource. It must be specified. Based on this version, Teleport will apply different defaults on resource creation or deletion. It must be an integer prefixed by "v". For example: `v1` | ||
|
||
### Optional | ||
|
||
- `metadata` (Attributes) Metadata is resource metadata (see [below for nested schema](#nested-schema-for-metadata)) | ||
- `sub_kind` (String) SubKind is an optional resource sub kind, used in some resources | ||
|
||
### Nested Schema for `spec` | ||
|
||
Required: | ||
|
||
- `addr` (String) Addr is the address that this host can be reached at. | ||
|
||
Optional: | ||
|
||
- `domain` (String) Domain is the ActiveDirectory domain that this host belongs to. | ||
- `non_ad` (Boolean) NonAD marks this desktop as a standalone host that is not joined to an Active Directory domain. | ||
- `screen_size` (Attributes) ScreenSize specifies the size of the screen to use for sessions on this host. In most cases this should be unspecified, in which case Teleport will fill the browser window. (see [below for nested schema](#nested-schema-for-specscreen_size)) | ||
|
||
### Nested Schema for `spec.screen_size` | ||
|
||
Optional: | ||
|
||
- `height` (Number) | ||
- `width` (Number) | ||
|
||
|
||
|
||
### Nested Schema for `metadata` | ||
|
||
Required: | ||
|
||
- `name` (String) Name is an object name | ||
|
||
Optional: | ||
|
||
- `description` (String) Description is object description | ||
- `expires` (String) Expires is a global expiry time header can be set on any resource in the system. | ||
- `labels` (Map of String) Labels is a set of labels | ||
|
81 changes: 81 additions & 0 deletions
81
docs/pages/reference/terraform-provider/resources/dynamic_windows_desktop.mdx
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,81 @@ | ||
--- | ||
title: Reference for the teleport_dynamic_windows_desktop Terraform resource | ||
description: This page describes the supported values of the teleport_dynamic_windows_desktop resource of the Teleport Terraform provider. | ||
--- | ||
|
||
{/*Auto-generated file. Do not edit.*/} | ||
{/*To regenerate, navigate to integrations/terraform and run `make docs`.*/} | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "teleport_dynamic_windows_desktop" "example" { | ||
version = "v1" | ||
metadata = { | ||
name = "example" | ||
description = "Test Windows desktop" | ||
labels = { | ||
"teleport.dev/origin" = "dynamic" // This label is added on Teleport side by default | ||
} | ||
} | ||
spec = { | ||
addr = "some.host.com" | ||
non_ad = true | ||
domain = "my.domain" | ||
screen_size = { | ||
width = 800 | ||
height = 600 | ||
} | ||
} | ||
} | ||
``` | ||
|
||
{/* schema generated by tfplugindocs */} | ||
## Schema | ||
|
||
### Required | ||
|
||
- `spec` (Attributes) Spec is the DynamicWindows host spec. (see [below for nested schema](#nested-schema-for-spec)) | ||
- `version` (String) Version is the API version used to create the resource. It must be specified. Based on this version, Teleport will apply different defaults on resource creation or deletion. It must be an integer prefixed by "v". For example: `v1` | ||
|
||
### Optional | ||
|
||
- `metadata` (Attributes) Metadata is resource metadata (see [below for nested schema](#nested-schema-for-metadata)) | ||
- `sub_kind` (String) SubKind is an optional resource sub kind, used in some resources | ||
|
||
### Nested Schema for `spec` | ||
|
||
Required: | ||
|
||
- `addr` (String) Addr is the address that this host can be reached at. | ||
|
||
Optional: | ||
|
||
- `domain` (String) Domain is the ActiveDirectory domain that this host belongs to. | ||
- `non_ad` (Boolean) NonAD marks this desktop as a standalone host that is not joined to an Active Directory domain. | ||
- `screen_size` (Attributes) ScreenSize specifies the size of the screen to use for sessions on this host. In most cases this should be unspecified, in which case Teleport will fill the browser window. (see [below for nested schema](#nested-schema-for-specscreen_size)) | ||
|
||
### Nested Schema for `spec.screen_size` | ||
|
||
Optional: | ||
|
||
- `height` (Number) | ||
- `width` (Number) | ||
|
||
|
||
|
||
### Nested Schema for `metadata` | ||
|
||
Required: | ||
|
||
- `name` (String) Name is an object name | ||
|
||
Optional: | ||
|
||
- `description` (String) Description is object description | ||
- `expires` (String) Expires is a global expiry time header can be set on any resource in the system. | ||
- `labels` (Map of String) Labels is a set of labels | ||
|
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
20 changes: 20 additions & 0 deletions
20
integrations/terraform/examples/resources/teleport_dynamic_windows_desktop/resource.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,20 @@ | ||
resource "teleport_dynamic_windows_desktop" "example" { | ||
version = "v1" | ||
metadata = { | ||
name = "example" | ||
description = "Test Windows desktop" | ||
labels = { | ||
"teleport.dev/origin" = "dynamic" // This label is added on Teleport side by default | ||
} | ||
} | ||
|
||
spec = { | ||
addr = "some.host.com" | ||
non_ad = true | ||
domain = "my.domain" | ||
screen_size = { | ||
width = 800 | ||
height = 600 | ||
} | ||
} | ||
} |
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
82 changes: 82 additions & 0 deletions
82
integrations/terraform/provider/data_source_teleport_dynamic_windows_desktop.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.