Skip to content

Commit

Permalink
update mist_org_inventory documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Oct 17, 2024
1 parent b260929 commit b6c44e9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 114 deletions.
34 changes: 16 additions & 18 deletions docs/resources/org_inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,24 @@ It can be used to claim, unclaim, assign, unassign, reassign devices
## Example Usage

```terraform
resource "mist_org_inventory" "inventory_one" {
resource "mist_org_inventory" "inventory" {
org_id = mist_org.terraform_test.id
devices = [
// for to claim and man devices, use the claim code
{
claim_code = "<device_claim_code>"
site_id = mist_site.terraform_site.id
},
{
claim_code = "<device_claim_code>"
},
// for adopted devices
{
mac = "<device_mac_address>"
devices = {
# Device Claim Code
"CPKL2EXXXXXXXXX" = {}
"G87JHBFXXXXXXXX" = {
site_id = mist_site.terraform_site.id
},
{
mac = "<device_mac_address>"
},
]
unclaim_when_destroyed = true
}
# MAC Address
"2c2131000000" = {
site_id = mist_site.terraform_site.id
unclaim_when_destroyed = true
}
"2c2131000001" = {
unclaim_when_destroyed = false
}
}
}
```

Expand Down
36 changes: 17 additions & 19 deletions examples/resources/mist_org_inventory/resource.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
resource "mist_org_inventory" "inventory_one" {
resource "mist_org_inventory" "inventory" {
org_id = mist_org.terraform_test.id
devices = [
// for to claim and man devices, use the claim code
{
claim_code = "<device_claim_code>"
site_id = mist_site.terraform_site.id
},
{
claim_code = "<device_claim_code>"
},
// for adopted devices
{
mac = "<device_mac_address>"
devices = {
# Device Claim Code
"CPKL2EXXXXXXXXX" = {}
"G87JHBFXXXXXXXX" = {
site_id = mist_site.terraform_site.id
},
{
mac = "<device_mac_address>"
},
]
}
unclaim_when_destroyed = true
}
# MAC Address
"2c2131000000" = {
site_id = mist_site.terraform_site.id
unclaim_when_destroyed = true
}
"2c2131000001" = {
unclaim_when_destroyed = false
}
}
}
13 changes: 0 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ module github.com/Juniper/terraform-provider-mist
go 1.22.4

require (
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.12.0
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
github.com/hashicorp/terraform-plugin-go v0.24.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.10.0
github.com/tmunzer/mistapi-go v0.3.41
golang.org/x/net v0.30.0
)
Expand All @@ -23,7 +21,6 @@ require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/ProtonMail/go-crypto v1.1.0-beta.0-proton // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apimatic/go-core-runtime v0.0.25 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
Expand All @@ -36,19 +33,15 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
Expand All @@ -58,8 +51,6 @@ require (
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/oklog/run v1.1.0 // indirect
Expand All @@ -68,7 +59,6 @@ require (
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
Expand All @@ -78,11 +68,8 @@ require (
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
Expand Down
Loading

0 comments on commit b6c44e9

Please sign in to comment.