Skip to content

Commit b883c19

Browse files
author
David Kraushuber
committed
improved docs
1 parent a416dfe commit b883c19

File tree

10 files changed

+23
-26
lines changed

10 files changed

+23
-26
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ provider to build your own SimpleMDM infrastructure.Provider's official document
1919

2020
## Know issues
2121

22-
- API current doesnt support Create and Delete for Device Groups
23-
- API currently doesnt support update of "name" attribute for Device Groups
24-
- Custom Profiles/Profiles for Assignment group and Devices can no be updated because of API limitation (they are compared only between plan and state from previous plan), aka adding profile via web will not be considered in next apply.
22+
-app assignemnt is not exactly working as expected because of missing data from API (changes requested already), currently there will be always diff in app assignement.

docs/resources/assignmentgroup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "simplemdm_assignmentgroup Resource - simplemdm"
44
subcategory: ""
55
description: |-
6-
Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s), Device Group(s) and set addition details regarding Group.
6+
Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s) and set addition details regarding Group. In case you dont want to manage device/app assignments use lifecycle. Currently App assignment will always show diff in configuration as API is not providing all needed data (request for API change was already submitted).
77
---
88

99
# simplemdm_assignmentgroup (Resource)
1010

11-
Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s), Device Group(s) and set addition details regarding Group.
11+
Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s) and set addition details regarding Group. In case you dont want to manage device/app assignments use lifecycle. Currently App assignment will always show diff in configuration as API is not providing all needed data (request for API change was already submitted).
1212

1313
## Example Usage
1414

@@ -19,15 +19,15 @@ resource "simplemdm_assignmentgroup" "myfirstgroup" {
1919
//auto deploy true or false, default is true
2020
auto_deploy = true
2121
//group type "standard" or "munki", defaults to standard. If this parameter is changed it will destroy/create whole group
22-
group_type = "standard"
23-
install_type = "managed"
24-
apps = [123456]
2522
profiles = [123456, 987654]
26-
groups = [135431, 654321]
2723
devices = [135431, 987654]
2824
profiles_sync = false
2925
apps_push = false
3026
apps_update = false
27+
attributes = {
28+
"testAttribute" = "attributevalue"
29+
}
30+
apps = [{ app_id = 553192, deployment_type = "munki", install_type = "managed" }]
3131
}
3232
```
3333

docs/resources/customdeclaration.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,13 @@ resource "simplemdm_customdeclaration" "test" {
4343
### Read-Only
4444

4545
- `id` (String) ID of a Custom Declaration in SimpleMDM
46+
47+
## Import
48+
49+
Import is supported using the following syntax:
50+
51+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
52+
53+
```shell
54+
terraform import simplemdm_customdeclaration.example 12345
55+
```

docs/resources/scriptjob.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Script resource can be used to manage Scripts Jobs.
1616
resource "simplemdm_scriptjob" "test" {
1717
script_id = "35"
1818
device_ids = ["1", "2", "3"]
19-
group_ids = ["4", "5"]
2019
assignment_group_ids = ["6", "7"]
2120
custom_attribute = "greeting_attribute"
2221
custom_attribute_regex = "\\n"

examples/resources/simplemdm_assignmentgroup/resource.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ resource "simplemdm_assignmentgroup" "myfirstgroup" {
44
//auto deploy true or false, default is true
55
auto_deploy = true
66
//group type "standard" or "munki", defaults to standard. If this parameter is changed it will destroy/create whole group
7-
group_type = "standard"
8-
install_type = "managed"
9-
apps = [123456]
107
profiles = [123456, 987654]
11-
groups = [135431, 654321]
128
devices = [135431, 987654]
139
profiles_sync = false
1410
apps_push = false
1511
apps_update = false
12+
attributes = {
13+
"testAttribute" = "attributevalue"
14+
}
15+
apps = [{ app_id = 553192, deployment_type = "munki", install_type = "managed" }]
1616
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import simplemdm_customdeclaration.example 12345

examples/resources/simplemdm_devicegroup/import.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/resources/simplemdm_devicegroup/resource.tf

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/resources/simplemdm_scriptjob/resource.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
resource "simplemdm_scriptjob" "test" {
22
script_id = "35"
33
device_ids = ["1", "2", "3"]
4-
group_ids = ["4", "5"]
54
assignment_group_ids = ["6", "7"]
65
custom_attribute = "greeting_attribute"
76
custom_attribute_regex = "\\n"

provider/assignmentGroup_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (r *assignment_groupResource) Metadata(_ context.Context, req resource.Meta
7575
// Schema defines the schema for the resource.
7676
func (r *assignment_groupResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
7777
resp.Schema = schema.Schema{
78-
Description: "Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s), Device Group(s) and set addition details regarding Group.",
78+
Description: "Assignment Group resource is used to manage group, you can assign App(s), Profile(s), Custom Profile(s), Custom Declaration(s), Device(s) and set addition details regarding Group. In case you dont want to manage device/app assignments use lifecycle. Currently App assignment will always show diff in configuration as API is not providing all needed data (request for API change was already submitted).",
7979
Attributes: map[string]schema.Attribute{
8080
"name": schema.StringAttribute{
8181
Required: true,

0 commit comments

Comments
 (0)