-
Notifications
You must be signed in to change notification settings - Fork 0
/
resource-fmg-authDevice.tf
52 lines (47 loc) · 1.29 KB
/
resource-fmg-authDevice.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
### AUTHORIZE A DEVICE VIA API!!! ######
#resource "fortimanager_json_generic_api" "authDevice" {
# json_content = <<JSON
#{
# "method": "exec",
# "params": [
# {
# "data": {
# "adom": "${var.workingADOM}",
# "device": {
# "device action": "promote_unreg",
# "name": "${var.deviceInfo.platform_str}",
# "platform_str": "${var.deviceInfo.platform_str}",
# "sn": "${var.deviceInfo.sn}",
# "adm_usr": "${var.deviceInfo.adm_usr}",
# "adm_pass": "${var.deviceInfo.adm_pass}"
# },
# "flags": [
# "create_task"
# ]
# },
# "url": "/dvm/cmd/add/device"
# }
# ]
#}
#JSON
# depends_on = [
# fortimanager_exec_workspace_action.lockADOM
# ]
#}
#resource "fortimanager_dvm_cmd_add_device" "authDevice" {
# fmgadom = var.workingADOM
# flags = ["create_task"]
# device {
# deviceaction = "promote_unreg"
# adm_usr = var.deviceInfo.adm_usr
# adm_pass = var.deviceInfo.adm_pass
# name = var.deviceInfo.platform_str
# platform_str = var.deviceInfo.platform_str # Needed for VM type FGTs!
# sn = var.deviceInfo.sn
# }
# depends_on = [
# fortimanager_exec_workspace_action.lockADOM
# ]
#}
#resource "fortimanager_dvm_cmd_add_device" "authDevice" {
#}