|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "semaphoreui_project_inventory Data Source - semaphoreui" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The project inventory data source allows you to read the Ansible inventory or a Terraform/OpenTofu workspace for a project. |
| 7 | +--- |
| 8 | + |
| 9 | +# semaphoreui_project_inventory (Data Source) |
| 10 | + |
| 11 | +The project inventory data source allows you to read the Ansible inventory or a Terraform/OpenTofu workspace for a project. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# Lookup by Inventory ID |
| 17 | +data "semaphoreui_project_inventory" "inventory" { |
| 18 | + project_id = 1 |
| 19 | + id = 2 |
| 20 | +} |
| 21 | +
|
| 22 | +# Lookup by Inventory Name |
| 23 | +data "semaphoreui_project_inventory" "example" { |
| 24 | + project_id = 1 |
| 25 | + name = "Example Invewntory" |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | +<!-- schema generated by tfplugindocs --> |
| 30 | +## Schema |
| 31 | + |
| 32 | +### Required |
| 33 | + |
| 34 | +- `project_id` (Number) The project ID that the inventory belongs to. |
| 35 | + |
| 36 | +### Optional |
| 37 | + |
| 38 | +- `id` (Number) The inventory ID. Ensure that one and only one attribute from this collection is set : `id`, `name`. |
| 39 | +- `name` (String) The display name of the inventory or workspace. Ensure that one and only one attribute from this collection is set : `id`, `name`. |
| 40 | + |
| 41 | +### Read-Only |
| 42 | + |
| 43 | +- `file` (Attributes) Inventory File. (see [below for nested schema](#nestedatt--file)) |
| 44 | +- `ssh_key_id` (Number) The Project Key ID to use for accessing hosts in the inventory. This attribute is required for all inventory types in SemaphoreUI. You should set it to the ID of a Key of type `none` if the inventory doesn't require credentials, or for Workspace type inventories. |
| 45 | +- `static` (Attributes) Static Inventory. (see [below for nested schema](#nestedatt--static)) |
| 46 | +- `static_yaml` (Attributes) Static YAML Inventory. (see [below for nested schema](#nestedatt--static_yaml)) |
| 47 | +- `terraform_workspace` (Attributes) Terraform Workspace. (see [below for nested schema](#nestedatt--terraform_workspace)) |
| 48 | + |
| 49 | +<a id="nestedatt--file"></a> |
| 50 | +### Nested Schema for `file` |
| 51 | + |
| 52 | +Read-Only: |
| 53 | + |
| 54 | +- `become_key_id` (Number) The Project Key ID to use for privilege escalation (sudo) on hosts in the inventory. Only accepts `password` type Keys. |
| 55 | +- `path` (String) The path to the inventory file, relative to the Template or custom Repository. Example: `folder/hosts.yml`. |
| 56 | +- `repository_id` (Number) The ID of the Repository that contains the inventory file. |
| 57 | + |
| 58 | + |
| 59 | +<a id="nestedatt--static"></a> |
| 60 | +### Nested Schema for `static` |
| 61 | + |
| 62 | +Read-Only: |
| 63 | + |
| 64 | +- `become_key_id` (Number) The Project Key ID to use for privilege escalation (sudo) on hosts in the inventory. Only accepts `password` type Keys. |
| 65 | +- `inventory` (String) Static inventory content in INI format. |
| 66 | + |
| 67 | + |
| 68 | +<a id="nestedatt--static_yaml"></a> |
| 69 | +### Nested Schema for `static_yaml` |
| 70 | + |
| 71 | +Read-Only: |
| 72 | + |
| 73 | +- `become_key_id` (Number) The Project Key ID to use for privilege escalation (sudo) on hosts in the inventory. Only accepts `password` type Keys. |
| 74 | +- `inventory` (String) Static inventory content in YAML format. |
| 75 | + |
| 76 | + |
| 77 | +<a id="nestedatt--terraform_workspace"></a> |
| 78 | +### Nested Schema for `terraform_workspace` |
| 79 | + |
| 80 | +Read-Only: |
| 81 | + |
| 82 | +- `workspace` (String) The Terraform workspace name. |
0 commit comments