File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -114,3 +114,29 @@ output "inventory_xyz" {
114
114
- ` named_url ` (String) Named URL of the inventory
115
115
- ` organization_name ` (String) Name for the organization.
116
116
- ` url ` (String) URL of the inventory
117
+
118
+ ## Inventory Look Up
119
+
120
+ You can look up inventories by using either the ` id ` or a combination of ` name ` and ` organization_name ` .
121
+
122
+ Creating a new inventory in the Default organization:
123
+ ``` terraform
124
+ resource "aap_inventory" "sample" {
125
+ name = "My Sample Inventory"
126
+ organization_name = "Default"
127
+ description = "A new inventory for testing"
128
+ variables = jsonencode(yamldecode(local.values_variables))
129
+ }
130
+ ```
131
+
132
+ You can access this inventory using either the ` id ` or the combination of ` name ` and ` organization_name ` .
133
+ ``` terraform
134
+ data "aap_inventory" "sample" {
135
+ id = aap_inventory.sample.id
136
+ }
137
+
138
+ data "aap_inventory" "sample" {
139
+ name = aap_inventory.sample.name
140
+ organization_name = aap_inventory.sample.organization_name
141
+ }
142
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ page_title: "{{ .Name }} {{ .Type }} - {{ .ProviderName }}"
3
+ description: |-
4
+ {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
5
+ ---
6
+
7
+ # {{ .Name }} ({{ .Type }})
8
+
9
+ {{ .Description | trimspace }}
10
+
11
+ {{ if .HasExample }}
12
+ ## Example Usage
13
+
14
+ {{ tffile .ExampleFile }}
15
+ {{ end }}
16
+
17
+ {{ .SchemaMarkdown | trimspace }}
18
+
19
+ ## Inventory Look Up
20
+
21
+ You can look up inventories by using either the `id` or a combination of `name` and `organization_name`.
22
+
23
+ Creating a new inventory in the Default organization:
24
+ ```terraform
25
+ resource "aap_inventory" "sample" {
26
+ name = "My Sample Inventory"
27
+ organization_name = "Default"
28
+ description = "A new inventory for testing"
29
+ variables = jsonencode(yamldecode(local.values_variables))
30
+ }
31
+ ```
32
+
33
+ You can access this inventory using either the `id` or the combination of `name` and `organization_name`.
34
+ ```terraform
35
+ data "aap_inventory" "sample" {
36
+ id = aap_inventory.sample.id
37
+ }
38
+
39
+ data "aap_inventory" "sample" {
40
+ name = aap_inventory.sample.name
41
+ organization_name = aap_inventory.sample.organization_name
42
+ }
43
+ ```
You can’t perform that action at this time.
0 commit comments