-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
schema.go
521 lines (448 loc) 路 27.3 KB
/
schema.go
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
package schema
// CliConfiguration structure represents schema for `atmos.yaml` CLI config
type CliConfiguration struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
Components Components `yaml:"components" json:"components" mapstructure:"components"`
Stacks Stacks `yaml:"stacks" json:"stacks" mapstructure:"stacks"`
Workflows Workflows `yaml:"workflows,omitempty" json:"workflows,omitempty" mapstructure:"workflows"`
Logs Logs `yaml:"logs,omitempty" json:"logs,omitempty" mapstructure:"logs"`
Commands []Command `yaml:"commands,omitempty" json:"commands,omitempty" mapstructure:"commands"`
CommandAliases CommandAliases `yaml:"aliases,omitempty" json:"aliases,omitempty" mapstructure:"aliases"`
Integrations Integrations `yaml:"integrations,omitempty" json:"integrations,omitempty" mapstructure:"integrations"`
Schemas Schemas `yaml:"schemas,omitempty" json:"schemas,omitempty" mapstructure:"schemas"`
Templates Templates `yaml:"templates,omitempty" json:"templates,omitempty" mapstructure:"templates"`
Initialized bool `yaml:"initialized" json:"initialized" mapstructure:"initialized"`
StacksBaseAbsolutePath string `yaml:"stacksBaseAbsolutePath,omitempty" json:"stacksBaseAbsolutePath,omitempty" mapstructure:"stacksBaseAbsolutePath"`
IncludeStackAbsolutePaths []string `yaml:"includeStackAbsolutePaths,omitempty" json:"includeStackAbsolutePaths,omitempty" mapstructure:"includeStackAbsolutePaths"`
ExcludeStackAbsolutePaths []string `yaml:"excludeStackAbsolutePaths,omitempty" json:"excludeStackAbsolutePaths,omitempty" mapstructure:"excludeStackAbsolutePaths"`
TerraformDirAbsolutePath string `yaml:"terraformDirAbsolutePath,omitempty" json:"terraformDirAbsolutePath,omitempty" mapstructure:"terraformDirAbsolutePath"`
HelmfileDirAbsolutePath string `yaml:"helmfileDirAbsolutePath,omitempty" json:"helmfileDirAbsolutePath,omitempty" mapstructure:"helmfileDirAbsolutePath"`
StackConfigFilesRelativePaths []string `yaml:"stackConfigFilesRelativePaths,omitempty" json:"stackConfigFilesRelativePaths,omitempty" mapstructure:"stackConfigFilesRelativePaths"`
StackConfigFilesAbsolutePaths []string `yaml:"stackConfigFilesAbsolutePaths,omitempty" json:"stackConfigFilesAbsolutePaths,omitempty" mapstructure:"stackConfigFilesAbsolutePaths"`
StackType string `yaml:"stackType,omitempty" json:"StackType,omitempty" mapstructure:"stackType"`
}
type Templates struct {
Settings TemplatesSettings `yaml:"settings" json:"settings" mapstructure:"settings"`
}
type TemplatesSettings struct {
Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"`
Sprig TemplatesSettingsSprig `yaml:"sprig" json:"sprig" mapstructure:"sprig"`
Gomplate TemplatesSettingsGomplate `yaml:"gomplate" json:"gomplate" mapstructure:"gomplate"`
}
type TemplatesSettingsSprig struct {
Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"`
}
type TemplatesSettingsGomplateDatasource struct {
Url string `yaml:"url" json:"url" mapstructure:"url"`
Headers map[string][]string `yaml:"headers" json:"headers" mapstructure:"headers"`
}
type TemplatesSettingsGomplate struct {
Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"`
Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
Datasources map[string]TemplatesSettingsGomplateDatasource `yaml:"datasources" json:"datasources" mapstructure:"datasources"`
}
type Terraform struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
ApplyAutoApprove bool `yaml:"apply_auto_approve" json:"apply_auto_approve" mapstructure:"apply_auto_approve"`
DeployRunInit bool `yaml:"deploy_run_init" json:"deploy_run_init" mapstructure:"deploy_run_init"`
InitRunReconfigure bool `yaml:"init_run_reconfigure" json:"init_run_reconfigure" mapstructure:"init_run_reconfigure"`
AutoGenerateBackendFile bool `yaml:"auto_generate_backend_file" json:"auto_generate_backend_file" mapstructure:"auto_generate_backend_file"`
}
type Helmfile struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
UseEKS bool `yaml:"use_eks" json:"use_eks" mapstructure:"use_eks"`
KubeconfigPath string `yaml:"kubeconfig_path" json:"kubeconfig_path" mapstructure:"kubeconfig_path"`
HelmAwsProfilePattern string `yaml:"helm_aws_profile_pattern" json:"helm_aws_profile_pattern" mapstructure:"helm_aws_profile_pattern"`
ClusterNamePattern string `yaml:"cluster_name_pattern" json:"cluster_name_pattern" mapstructure:"cluster_name_pattern"`
}
type Components struct {
Terraform Terraform `yaml:"terraform" json:"terraform" mapstructure:"terraform"`
Helmfile Helmfile `yaml:"helmfile" json:"helmfile" mapstructure:"helmfile"`
}
type Stacks struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
IncludedPaths []string `yaml:"included_paths" json:"included_paths" mapstructure:"included_paths"`
ExcludedPaths []string `yaml:"excluded_paths" json:"excluded_paths" mapstructure:"excluded_paths"`
NamePattern string `yaml:"name_pattern" json:"name_pattern" mapstructure:"name_pattern"`
NameTemplate string `yaml:"name_template" json:"name_template" mapstructure:"name_template"`
}
type Workflows struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
}
type Logs struct {
File string `yaml:"file" json:"file" mapstructure:"file"`
Level string `yaml:"level" json:"level" mapstructure:"level"`
}
type Context struct {
Namespace string `yaml:"namespace" json:"namespace" mapstructure:"namespace"`
Tenant string `yaml:"tenant" json:"tenant" mapstructure:"tenant"`
Environment string `yaml:"environment" json:"environment" mapstructure:"environment"`
Stage string `yaml:"stage" json:"stage" mapstructure:"stage"`
Region string `yaml:"region" json:"region" mapstructure:"region"`
Component string `yaml:"component" json:"component" mapstructure:"component"`
BaseComponent string `yaml:"base_component" json:"base_component" mapstructure:"base_component"`
ComponentPath string `yaml:"component_path" json:"component_path" mapstructure:"component_path"`
Workspace string `yaml:"workspace" json:"workspace" mapstructure:"workspace"`
Attributes []any `yaml:"attributes" json:"attributes" mapstructure:"attributes"`
File string `yaml:"file" json:"file" mapstructure:"file"`
Folder string `yaml:"folder" json:"folder" mapstructure:"folder"`
TerraformWorkspace string `yaml:"terraform_workspace" json:"terraform_workspace" mapstructure:"terraform_workspace"`
}
type ArgsAndFlagsInfo struct {
AdditionalArgsAndFlags []string
SubCommand string
SubCommand2 string
ComponentFromArg string
GlobalOptions []string
TerraformDir string
HelmfileDir string
ConfigDir string
StacksDir string
WorkflowsDir string
BasePath string
DeployRunInit string
InitRunReconfigure string
AutoGenerateBackendFile string
UseTerraformPlan bool
PlanFile string
DryRun bool
SkipInit bool
NeedHelp bool
JsonSchemaDir string
OpaDir string
CueDir string
AtmosManifestJsonSchema string
RedirectStdErr string
LogsLevel string
LogsFile string
}
type ConfigAndStacksInfo struct {
StackFromArg string
Stack string
StackFile string
ComponentType string
ComponentFromArg string
Component string
ComponentFolderPrefix string
ComponentFolderPrefixReplaced string
BaseComponentPath string
BaseComponent string
FinalComponent string
Command string
SubCommand string
SubCommand2 string
ComponentSection map[string]any
ComponentVarsSection map[any]any
ComponentSettingsSection map[any]any
ComponentOverridesSection map[any]any
ComponentProvidersSection map[any]any
ComponentEnvSection map[any]any
ComponentEnvList []string
ComponentBackendSection map[any]any
ComponentBackendType string
AdditionalArgsAndFlags []string
GlobalOptions []string
BasePath string
TerraformDir string
HelmfileDir string
ConfigDir string
StacksDir string
WorkflowsDir string
Context Context
ContextPrefix string
DeployRunInit string
InitRunReconfigure string
AutoGenerateBackendFile string
UseTerraformPlan bool
PlanFile string
DryRun bool
SkipInit bool
ComponentInheritanceChain []string
ComponentImportsSection []string
NeedHelp bool
ComponentIsAbstract bool
ComponentMetadataSection map[any]any
TerraformWorkspace string
JsonSchemaDir string
OpaDir string
CueDir string
AtmosManifestJsonSchema string
AtmosCliConfigPath string
AtmosBasePath string
RedirectStdErr string
LogsLevel string
LogsFile string
}
// Workflows
type WorkflowStep struct {
Name string `yaml:"name,omitempty" json:"name,omitempty" mapstructure:"name"`
Command string `yaml:"command" json:"command" mapstructure:"command"`
Stack string `yaml:"stack,omitempty" json:"stack,omitempty" mapstructure:"stack"`
Type string `yaml:"type,omitempty" json:"type,omitempty" mapstructure:"type"`
}
type WorkflowDefinition struct {
Description string `yaml:"description,omitempty" json:"description,omitempty" mapstructure:"description"`
Steps []WorkflowStep `yaml:"steps" json:"steps" mapstructure:"steps"`
Stack string `yaml:"stack,omitempty" json:"stack,omitempty" mapstructure:"stack"`
}
type WorkflowConfig map[string]WorkflowDefinition
type WorkflowManifest struct {
Name string `yaml:"name,omitempty" json:"name,omitempty" mapstructure:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty" mapstructure:"description"`
Workflows WorkflowConfig `yaml:"workflows" json:"workflows" mapstructure:"workflows"`
}
type DescribeWorkflowsItem struct {
File string `yaml:"file" json:"file" mapstructure:"file"`
Workflow string `yaml:"workflow" json:"workflow" mapstructure:"workflow"`
}
// EKS update-kubeconfig
type AwsEksUpdateKubeconfigContext struct {
Component string
Stack string
Profile string
ClusterName string
Kubeconfig string
RoleArn string
DryRun bool
Verbose bool
Alias string
Namespace string
Tenant string
Environment string
Stage string
Region string
}
// Component vendoring (`component.yaml` file)
type VendorComponentSource struct {
Type string `yaml:"type" json:"type" mapstructure:"type"`
Uri string `yaml:"uri" json:"uri" mapstructure:"uri"`
Version string `yaml:"version" json:"version" mapstructure:"version"`
IncludedPaths []string `yaml:"included_paths" json:"included_paths" mapstructure:"included_paths"`
ExcludedPaths []string `yaml:"excluded_paths" json:"excluded_paths" mapstructure:"excluded_paths"`
}
type VendorComponentMixins struct {
Type string `yaml:"type" json:"type" mapstructure:"type"`
Uri string `yaml:"uri" json:"uri" mapstructure:"uri"`
Version string `yaml:"version" json:"version" mapstructure:"version"`
Filename string `yaml:"filename" json:"filename" mapstructure:"filename"`
}
type VendorComponentSpec struct {
Source VendorComponentSource `yaml:"source" json:"source" mapstructure:"source"`
Mixins []VendorComponentMixins `yaml:"mixins" json:"mixins" mapstructure:"mixins"`
}
type VendorComponentMetadata struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
}
type VendorComponentConfig struct {
ApiVersion string `yaml:"apiVersion" json:"apiVersion" mapstructure:"apiVersion"`
Kind string `yaml:"kind" json:"kind" mapstructure:"kind"`
Metadata VendorComponentMetadata `yaml:"metadata" json:"metadata" mapstructure:"metadata"`
Spec VendorComponentSpec `yaml:"spec" json:"spec" mapstructure:"spec"`
}
// Custom CLI commands
type Command struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
Env []CommandEnv `yaml:"env" json:"env" mapstructure:"env"`
Arguments []CommandArgument `yaml:"arguments" json:"arguments" mapstructure:"arguments"`
Flags []CommandFlag `yaml:"flags" json:"flags" mapstructure:"flags"`
ComponentConfig CommandComponentConfig `yaml:"component_config" json:"component_config" mapstructure:"component_config"`
Steps []string `yaml:"steps" json:"steps" mapstructure:"steps"`
Commands []Command `yaml:"commands" json:"commands" mapstructure:"commands"`
Verbose bool `yaml:"verbose" json:"verbose" mapstructure:"verbose"`
}
type CommandArgument struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
}
type CommandFlag struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Shorthand string `yaml:"shorthand" json:"shorthand" mapstructure:"shorthand"`
Type string `yaml:"type" json:"type" mapstructure:"type"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
Usage string `yaml:"usage" json:"usage" mapstructure:"usage"`
Required bool `yaml:"required" json:"required" mapstructure:"required"`
}
type CommandEnv struct {
Key string `yaml:"key" json:"key" mapstructure:"key"`
Value string `yaml:"value" json:"value" mapstructure:"value"`
ValueCommand string `yaml:"valueCommand" json:"valueCommand" mapstructure:"valueCommand"`
}
type CommandComponentConfig struct {
Component string `yaml:"component" json:"component" mapstructure:"component"`
Stack string `yaml:"stack" json:"stack" mapstructure:"stack"`
}
// CLI command aliases
type CommandAliases map[string]string
// Integrations
type Integrations struct {
Atlantis Atlantis `yaml:"atlantis,omitempty" json:"atlantis,omitempty" mapstructure:"atlantis"`
GitHub map[string]any `yaml:"github,omitempty" json:"github,omitempty" mapstructure:"github"`
}
// Atlantis integration
type Atlantis struct {
Path string `yaml:"path,omitempty" json:"path,omitempty" mapstructure:"path"`
ConfigTemplates map[string]AtlantisRepoConfig `yaml:"config_templates,omitempty" json:"config_templates,omitempty" mapstructure:"config_templates"`
ProjectTemplates map[string]AtlantisProjectConfig `yaml:"project_templates,omitempty" json:"project_templates,omitempty" mapstructure:"project_templates"`
WorkflowTemplates map[string]any `yaml:"workflow_templates,omitempty" json:"workflow_templates,omitempty" mapstructure:"workflow_templates"`
}
type AtlantisRepoConfig struct {
Version int `yaml:"version" json:"version" mapstructure:"version"`
Automerge bool `yaml:"automerge" json:"automerge" mapstructure:"automerge"`
DeleteSourceBranchOnMerge bool `yaml:"delete_source_branch_on_merge" json:"delete_source_branch_on_merge" mapstructure:"delete_source_branch_on_merge"`
ParallelPlan bool `yaml:"parallel_plan" json:"parallel_plan" mapstructure:"parallel_plan"`
ParallelApply bool `yaml:"parallel_apply" json:"parallel_apply" mapstructure:"parallel_apply"`
AllowedRegexpPrefixes []string `yaml:"allowed_regexp_prefixes" json:"allowed_regexp_prefixes" mapstructure:"allowed_regexp_prefixes"`
}
type AtlantisProjectConfig struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Workspace string `yaml:"workspace" json:"workspace" mapstructure:"workspace"`
Workflow string `yaml:"workflow,omitempty" json:"workflow,omitempty" mapstructure:"workflow"`
Dir string `yaml:"dir" json:"dir" mapstructure:"dir"`
TerraformVersion string `yaml:"terraform_version" json:"terraform_version" mapstructure:"terraform_version"`
DeleteSourceBranchOnMerge bool `yaml:"delete_source_branch_on_merge" json:"delete_source_branch_on_merge" mapstructure:"delete_source_branch_on_merge"`
Autoplan AtlantisProjectAutoplanConfig `yaml:"autoplan" json:"autoplan" mapstructure:"autoplan"`
ApplyRequirements []string `yaml:"apply_requirements" json:"apply_requirements" mapstructure:"apply_requirements"`
}
type AtlantisProjectAutoplanConfig struct {
Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"`
WhenModified []string `yaml:"when_modified" json:"when_modified" mapstructure:"when_modified"`
}
type AtlantisConfigOutput struct {
Version int `yaml:"version" json:"version" mapstructure:"version"`
Automerge bool `yaml:"automerge" json:"automerge" mapstructure:"automerge"`
DeleteSourceBranchOnMerge bool `yaml:"delete_source_branch_on_merge" json:"delete_source_branch_on_merge" mapstructure:"delete_source_branch_on_merge"`
ParallelPlan bool `yaml:"parallel_plan" json:"parallel_plan" mapstructure:"parallel_plan"`
ParallelApply bool `yaml:"parallel_apply" json:"parallel_apply" mapstructure:"parallel_apply"`
AllowedRegexpPrefixes []string `yaml:"allowed_regexp_prefixes" json:"allowed_regexp_prefixes" mapstructure:"allowed_regexp_prefixes"`
Projects []AtlantisProjectConfig `yaml:"projects" json:"projects" mapstructure:"projects"`
Workflows map[string]any `yaml:"workflows,omitempty" json:"workflows,omitempty" mapstructure:"workflows"`
}
// Validation schemas
type JsonSchema struct {
BasePath string `yaml:"base_path,omitempty" json:"base_path,omitempty" mapstructure:"base_path"`
}
type Cue struct {
BasePath string `yaml:"base_path,omitempty" json:"base_path,omitempty" mapstructure:"base_path"`
}
type Opa struct {
BasePath string `yaml:"base_path,omitempty" json:"base_path,omitempty" mapstructure:"base_path"`
}
type AtmosSchema struct {
Manifest string `yaml:"manifest,omitempty" json:"manifest,omitempty" mapstructure:"manifest"`
}
type Schemas struct {
JsonSchema JsonSchema `yaml:"jsonschema,omitempty" json:"jsonschema,omitempty" mapstructure:"jsonschema"`
Cue Cue `yaml:"cue,omitempty" json:"cue,omitempty" mapstructure:"cue"`
Opa Opa `yaml:"opa,omitempty" json:"opa,omitempty" mapstructure:"opa"`
Atmos AtmosSchema `yaml:"atmos,omitempty" json:"atmos,omitempty" mapstructure:"atmos"`
}
type ValidationItem struct {
SchemaType string `yaml:"schema_type" json:"schema_type" mapstructure:"schema_type"`
SchemaPath string `yaml:"schema_path" json:"schema_path" mapstructure:"schema_path"`
ModulePaths []string `yaml:"module_paths" json:"module_paths" mapstructure:"module_paths"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
Disabled bool `yaml:"disabled" json:"disabled" mapstructure:"disabled"`
Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
}
type Validation map[string]ValidationItem
// Affected Atmos components and stacks given two Git commits
type Affected struct {
Component string `yaml:"component" json:"component" mapstructure:"component"`
ComponentType string `yaml:"component_type" json:"component_type" mapstructure:"component_type"`
ComponentPath string `yaml:"component_path" json:"component_path" mapstructure:"component_path"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty" mapstructure:"namespace"`
Tenant string `yaml:"tenant,omitempty" json:"tenant,omitempty" mapstructure:"tenant"`
Environment string `yaml:"environment,omitempty" json:"environment,omitempty" mapstructure:"environment"`
Stage string `yaml:"stage,omitempty" json:"stage,omitempty" mapstructure:"stage"`
Stack string `yaml:"stack" json:"stack" mapstructure:"stack"`
StackSlug string `yaml:"stack_slug" json:"stack_slug" mapstructure:"stack_slug"`
SpaceliftStack string `yaml:"spacelift_stack,omitempty" json:"spacelift_stack,omitempty" mapstructure:"spacelift_stack"`
AtlantisProject string `yaml:"atlantis_project,omitempty" json:"atlantis_project,omitempty" mapstructure:"atlantis_project"`
Affected string `yaml:"affected" json:"affected" mapstructure:"affected"`
File string `yaml:"file,omitempty" json:"file,omitempty" mapstructure:"file"`
Folder string `yaml:"folder,omitempty" json:"folder,omitempty" mapstructure:"folder"`
}
type BaseComponentConfig struct {
BaseComponentVars map[any]any
BaseComponentSettings map[any]any
BaseComponentEnv map[any]any
BaseComponentProviders map[any]any
FinalBaseComponentName string
BaseComponentCommand string
BaseComponentBackendType string
BaseComponentBackendSection map[any]any
BaseComponentRemoteStateBackendType string
BaseComponentRemoteStateBackendSection map[any]any
ComponentInheritanceChain []string
}
// Stack imports (`import` section)
type StackImport struct {
Path string `yaml:"path" json:"path" mapstructure:"path"`
Context map[string]any `yaml:"context" json:"context" mapstructure:"context"`
SkipTemplatesProcessing bool `yaml:"skip_templates_processing,omitempty" json:"skip_templates_processing,omitempty" mapstructure:"skip_templates_processing"`
IgnoreMissingTemplateValues bool `yaml:"ignore_missing_template_values,omitempty" json:"ignore_missing_template_values,omitempty" mapstructure:"ignore_missing_template_values"`
SkipIfMissing bool `yaml:"skip_if_missing,omitempty" json:"skip_if_missing,omitempty" mapstructure:"skip_if_missing"`
}
// Dependencies
type DependsOn map[any]Context
type Dependent struct {
Component string `yaml:"component" json:"component" mapstructure:"component"`
ComponentType string `yaml:"component_type" json:"component_type" mapstructure:"component_type"`
ComponentPath string `yaml:"component_path" json:"component_path" mapstructure:"component_path"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty" mapstructure:"namespace"`
Tenant string `yaml:"tenant,omitempty" json:"tenant,omitempty" mapstructure:"tenant"`
Environment string `yaml:"environment,omitempty" json:"environment,omitempty" mapstructure:"environment"`
Stage string `yaml:"stage,omitempty" json:"stage,omitempty" mapstructure:"stage"`
Stack string `yaml:"stack" json:"stack" mapstructure:"stack"`
StackSlug string `yaml:"stack_slug" json:"stack_slug" mapstructure:"stack_slug"`
SpaceliftStack string `yaml:"spacelift_stack,omitempty" json:"spacelift_stack,omitempty" mapstructure:"spacelift_stack"`
AtlantisProject string `yaml:"atlantis_project,omitempty" json:"atlantis_project,omitempty" mapstructure:"atlantis_project"`
}
// Settings
type SettingsSpacelift map[any]any
type Settings struct {
DependsOn DependsOn `yaml:"depends_on,omitempty" json:"depends_on,omitempty" mapstructure:"depends_on"`
Spacelift SettingsSpacelift `yaml:"spacelift,omitempty" json:"spacelift,omitempty" mapstructure:"spacelift"`
Templates Templates `yaml:"templates,omitempty" json:"templates,omitempty" mapstructure:"templates"`
}
// ConfigSourcesStackDependency defines schema for sources of config sections
type ConfigSourcesStackDependency struct {
StackFile string `yaml:"stack_file" json:"stack_file" mapstructure:"stack_file"`
StackFileSection string `yaml:"stack_file_section" json:"stack_file_section" mapstructure:"stack_file_section"`
DependencyType string `yaml:"dependency_type" json:"dependency_type" mapstructure:"dependency_type"`
VariableValue any `yaml:"variable_value" json:"variable_value" mapstructure:"variable_value"`
}
type ConfigSourcesStackDependencies []ConfigSourcesStackDependency
type ConfigSourcesItem struct {
FinalValue any `yaml:"final_value" json:"final_value" mapstructure:"final_value"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
StackDependencies ConfigSourcesStackDependencies `yaml:"stack_dependencies" json:"stack_dependencies" mapstructure:"stack_dependencies"`
}
type ConfigSources map[string]map[string]ConfigSourcesItem
// Atmos vendoring (`vendor.yaml` file)
type AtmosVendorSource struct {
Component string `yaml:"component" json:"component" mapstructure:"component"`
Source string `yaml:"source" json:"source" mapstructure:"source"`
Version string `yaml:"version" json:"version" mapstructure:"version"`
File string `yaml:"file" json:"file" mapstructure:"file"`
Targets []string `yaml:"targets" json:"targets" mapstructure:"targets"`
IncludedPaths []string `yaml:"included_paths,omitempty" json:"included_paths,omitempty" mapstructure:"included_paths"`
ExcludedPaths []string `yaml:"excluded_paths,omitempty" json:"excluded_paths,omitempty" mapstructure:"excluded_paths"`
Tags []string `yaml:"tags" json:"tags" mapstructure:"tags"`
}
type AtmosVendorSpec struct {
Imports []string `yaml:"imports,omitempty" json:"imports,omitempty" mapstructure:"imports"`
Sources []AtmosVendorSource `yaml:"sources" json:"sources" mapstructure:"sources"`
}
type AtmosVendorMetadata struct {
Name string `yaml:"name" json:"name" mapstructure:"name"`
Description string `yaml:"description" json:"description" mapstructure:"description"`
}
type AtmosVendorConfig struct {
ApiVersion string `yaml:"apiVersion" json:"apiVersion" mapstructure:"apiVersion"`
Kind string `yaml:"kind" json:"kind" mapstructure:"kind"`
Metadata AtmosVendorMetadata
Spec AtmosVendorSpec `yaml:"spec" json:"spec" mapstructure:"spec"`
}