Skip to content

Commit a85b4f2

Browse files
committed
feat(specs): Create spec, tests and examples for panos_custom_log_settings
1 parent cd67396 commit a85b4f2

File tree

4 files changed

+339
-12
lines changed

4 files changed

+339
-12
lines changed

assets/terraform/examples/provider/provider.tf

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# A config log setting can be imported by providing the following base64 encoded object as the ID
2+
# {
3+
# location = {
4+
# template = {
5+
# name = "example-template"
6+
# panorama_device = "localhost.localdomain"
7+
# }
8+
# }
9+
#
10+
# name = "example-config-settings"
11+
# }
12+
terraform import panos_config_log_settings.example $(echo '{"location":{"template":{"name":"example-template","panorama_device":"localhost.localdomain"}},"name":"example-config-settings"}' | base64)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
resource "panos_template" "example" {
2+
location = { panorama = {} }
3+
name = "example-template"
4+
}
5+
6+
resource "panos_syslog_profile" "example" {
7+
location = {
8+
template = {
9+
name = panos_template.example.name
10+
}
11+
}
12+
13+
name = "example-profile-1"
14+
servers = [{
15+
name = "syslog-server1"
16+
server = "10.0.0.1"
17+
}]
18+
}
19+
20+
resource "panos_config_log_settings" "example" {
21+
location = {
22+
template = {
23+
name = panos_template.example.name
24+
}
25+
}
26+
27+
name = "example-config-settings"
28+
description = "config log settings example"
29+
filter = "(dgname eq default)"
30+
send_to_panorama = true
31+
syslog_profiles = [panos_syslog_profile.example.name]
32+
}
Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
name: config-log-settings
2+
terraform_provider_config:
3+
description: Config Log Settings
4+
skip_resource: false
5+
skip_datasource: false
6+
resource_type: entry
7+
resource_variants:
8+
- singular
9+
suffix: config_log_settings
10+
plural_suffix: ''
11+
plural_name: ''
12+
plural_description: ''
13+
go_sdk_config:
14+
skip: false
15+
package:
16+
- device
17+
- logsettings
18+
- config
19+
panos_xpath:
20+
path:
21+
- log-settings
22+
- config
23+
- match-list
24+
vars: []
25+
locations:
26+
- name: panorama
27+
xpath:
28+
path:
29+
- config
30+
- panorama
31+
vars: []
32+
description: Located in a panorama.
33+
validators: []
34+
required: false
35+
read_only: false
36+
- name: template
37+
xpath:
38+
path:
39+
- config
40+
- devices
41+
- $panorama_device
42+
- template
43+
- $template
44+
- config
45+
- shared
46+
vars:
47+
- name: panorama_device
48+
description: Specific Panorama device
49+
required: false
50+
default: localhost.localdomain
51+
validators: []
52+
type: entry
53+
- name: template
54+
description: Specific Panorama template
55+
required: true
56+
validators: []
57+
type: entry
58+
description: A shared resource located within a specific template
59+
devices:
60+
- panorama
61+
validators: []
62+
required: false
63+
read_only: false
64+
- name: template-vsys
65+
xpath:
66+
path:
67+
- config
68+
- devices
69+
- $panorama_device
70+
- template
71+
- $template
72+
- config
73+
- devices
74+
- $ngfw_device
75+
- vsys
76+
- $vsys
77+
vars:
78+
- name: panorama_device
79+
description: Specific Panorama device
80+
required: false
81+
default: localhost.localdomain
82+
validators: []
83+
type: entry
84+
- name: template
85+
description: Specific Panorama template
86+
required: true
87+
validators: []
88+
type: entry
89+
- name: ngfw_device
90+
description: The NGFW device
91+
required: false
92+
default: localhost.localdomain
93+
validators: []
94+
type: entry
95+
- name: vsys
96+
description: The vsys.
97+
required: false
98+
default: vsys1
99+
validators:
100+
- type: not-values
101+
spec:
102+
values:
103+
- value: shared
104+
error: The vsys cannot be "shared".
105+
type: entry
106+
description: Located in a specific template, device and vsys.
107+
devices:
108+
- panorama
109+
- ngfw
110+
validators: []
111+
required: false
112+
read_only: false
113+
- name: template-stack
114+
xpath:
115+
path:
116+
- config
117+
- devices
118+
- $panorama_device
119+
- template-stack
120+
- $template_stack
121+
- config
122+
- shared
123+
vars:
124+
- name: panorama_device
125+
description: Specific Panorama device
126+
required: false
127+
default: localhost.localdomain
128+
validators: []
129+
type: entry
130+
- name: template_stack
131+
description: The template stack
132+
required: true
133+
validators: []
134+
type: entry
135+
description: Located in a specific template
136+
devices:
137+
- panorama
138+
validators: []
139+
required: false
140+
read_only: false
141+
- name: template-stack-vsys
142+
xpath:
143+
path:
144+
- config
145+
- devices
146+
- $panorama_device
147+
- template-stack
148+
- $template_stack
149+
- config
150+
- devices
151+
- $ngfw_device
152+
- vsys
153+
- $vsys
154+
vars:
155+
- name: panorama_device
156+
description: Specific Panorama device
157+
required: false
158+
default: localhost.localdomain
159+
validators: []
160+
type: entry
161+
- name: template_stack
162+
description: The template stack
163+
required: true
164+
validators: []
165+
type: entry
166+
- name: ngfw_device
167+
description: The NGFW device
168+
required: false
169+
default: localhost.localdomain
170+
validators: []
171+
type: entry
172+
- name: vsys
173+
description: The vsys.
174+
required: false
175+
default: vsys1
176+
validators:
177+
- type: not-values
178+
spec:
179+
values:
180+
- value: shared
181+
error: The vsys cannot be "shared".
182+
type: entry
183+
description: Located in a specific template, device and vsys.
184+
devices:
185+
- panorama
186+
- ngfw
187+
validators: []
188+
required: false
189+
read_only: false
190+
entries:
191+
- name: name
192+
description: ''
193+
validators: []
194+
imports: []
195+
spec:
196+
params:
197+
- name: description
198+
type: string
199+
profiles:
200+
- xpath:
201+
- description
202+
validators:
203+
- type: length
204+
spec:
205+
min: 0
206+
max: 1023
207+
spec: {}
208+
description: ''
209+
required: false
210+
- name: filter
211+
type: string
212+
profiles:
213+
- xpath:
214+
- filter
215+
validators:
216+
- type: length
217+
spec:
218+
max: 1023
219+
spec: {}
220+
description: ''
221+
required: false
222+
- name: send-email
223+
type: list
224+
profiles:
225+
- xpath:
226+
- send-email
227+
type: member
228+
validators: []
229+
spec:
230+
type: string
231+
items:
232+
type: string
233+
description: ''
234+
required: false
235+
codegen_overrides:
236+
terraform:
237+
name: email-profiles
238+
- name: send-http
239+
type: list
240+
profiles:
241+
- xpath:
242+
- send-http
243+
type: member
244+
validators: []
245+
spec:
246+
type: string
247+
items:
248+
type: string
249+
description: ''
250+
required: false
251+
codegen_overrides:
252+
terraform:
253+
name: http-profiles
254+
- name: send-snmptrap
255+
type: list
256+
profiles:
257+
- xpath:
258+
- send-snmptrap
259+
type: member
260+
validators: []
261+
spec:
262+
type: string
263+
items:
264+
type: string
265+
description: ''
266+
required: false
267+
codegen_overrides:
268+
terraform:
269+
name: snmp-profiles
270+
- name: send-syslog
271+
type: list
272+
profiles:
273+
- xpath:
274+
- send-syslog
275+
type: member
276+
validators: []
277+
spec:
278+
type: string
279+
items:
280+
type: string
281+
description: ''
282+
required: false
283+
codegen_overrides:
284+
terraform:
285+
name: syslog-profiles
286+
- name: send-to-panorama
287+
type: bool
288+
profiles:
289+
- xpath:
290+
- send-to-panorama
291+
validators: []
292+
spec: {}
293+
description: ''
294+
required: false
295+
variants: []

0 commit comments

Comments
 (0)