-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathterraform.lr
More file actions
233 lines (215 loc) · 5.65 KB
/
terraform.lr
File metadata and controls
233 lines (215 loc) · 5.65 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1
option provider = "go.mondoo.com/cnquery/v9/providers/terraform"
option go_package = "go.mondoo.com/cnquery/v11/providers/terraform/resources"
// Terraform configuration files
terraform {
// Access to individual files including .tf and .tf.json files
files() []terraform.file
// The attributes defined in .tfvars and .tfvars.json
tfvars() dict
// All referenced Terraform modules
modules() []terraform.module
// Raw HCL blocks
blocks() []terraform.block
// Provider blocks
providers() []terraform.block
// Data sources blocks
datasources() []terraform.block
// All blocks with the type resource
resources() []terraform.block
// Variable blocks
variables() []terraform.block
// Output blocks
outputs() []terraform.block
}
// Terraform configuration file (.tf or .tf.json file)
terraform.file @defaults("path") {
// Terraform (.tf or tf.json file)
path string
// All blocks within the file
blocks() []terraform.block
}
// Position of the Terraform configuration block in the file
terraform.fileposition {
// File path to the Terraform configuration file
path string
// Line of the block
line int
// Column of the block
column int
// Size of the file
byte int
}
// Terraform resource block
private terraform.block @defaults("type labels") {
// Block type
type string
// Block Labels
labels []string
// Block name label
nameLabel() string
// Block start position
start terraform.fileposition
// Block end position
end terraform.fileposition
// Block arguments
arguments() dict
// Raw block attributes
attributes() dict
// Child blocks
blocks() []terraform.block
// Related blocks
related() []terraform.block
// Block snippet
snippet string
}
// Terraform module block
terraform.module @defaults("key source") {
// Unique identifier for the module
key string
// Source from which the module was loaded
source string
// Module version
version string
// Path to the directory where the module is stored
dir string
// Block (including the configuration)
block() terraform.block
}
// Terraform settings
terraform.settings {
// Settings block
block terraform.block
// Provider requirements
requiredProviders dict
// Backend configuration
backend dict
}
// Terraform state
terraform.state {
// Terraform state format version
formatVersion string
// Generated by Terraform version
terraformVersion string
// Output values
outputs() []terraform.state.output
// Root module which consists resources defined in .tf files
rootModule() terraform.state.module
// Flat list of all modules
modules() []terraform.state.module
// A flat list of all resources across all modules
resources() []terraform.state.resource
}
// Terraform state output values
terraform.state.output @defaults("identifier") {
init(identifier string)
// Output identifier
identifier string
// Whether the output is sensitive
sensitive bool
// Output value
value() dict
// Output value type
type() dict
}
// Terraform state module
terraform.state.module @defaults("address") {
init(identifier string)
// Module identifier address
address string
// Resources that describe infrastructure objects
resources() []terraform.state.resource
// Child modules called from this module
childModules() []terraform.state.module
}
// Terraform state resource
terraform.state.resource @defaults("type name") {
// Address is the absolute resource address
address string
// Mode: managed or data
mode string
// Resource type
type string
// Resource name
name string
// Terraform provider
providerName string
// Which version of the resource type schema the `values` property conforms to
schemaVersion int
// Attribute values
values dict
// List of the resource's dependencies
dependsOn []string
// Whether the resource is tainted in the Terraform state
tainted bool
// Whether the resource is deposed in the Terraform state
deposedKey string
}
// Terraform plan
terraform.plan {
// Terraform plan format version
formatVersion string
// Generated by Terraform version
terraformVersion string
// Resource changes
resourceChanges() []terraform.plan.resourceChange
// Variables used to generate the Terraform plan
variables []terraform.plan.variable
// Whether `apply` is valid for the plan
applyable bool
// Whether the plan errored
errored bool
}
// Terraform plan configuration
terraform.plan.configuration {
// Provider configuration
providerConfig() []dict
// Root module resource configuration
resources() []dict
}
// Terraform plan variable
terraform.plan.variable @defaults("name value") {
// Variable name
name string
// Variable value
value dict
}
// Terraform plan resource change
terraform.plan.resourceChange @defaults("type name") {
// Resource address
address string
// Resource previous address
previousAddress string
// Resource module address
moduleAddress string
// Resource mode
mode string
// Resource type
type string
// Resource name
name string
// Provider name
providerName string
// Whether the action applies to a deposed object
deposed string
// Change to make to this object
change terraform.plan.proposedChange
// Resource action reason
actionReason string
}
// Terraform plan proposed change
terraform.plan.proposedChange @defaults("actions after") {
// Resource address
address string
// Actions that wil be taken for on the object
actions []string
// Resource before values
before dict
// Resource after values
after dict
afterUnknown dict
beforeSensitive dict
afterSensitive dict
replacePaths dict
}