Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/exec/stack_processor_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func ProcessYAMLConfigFile(

// Process `Go` templates in the imported stack manifest using the provided `context`
// https://atmos.tools/core-concepts/stacks/imports#go-templates-in-imports
if !skipTemplatesProcessingInImports && len(context) > 0 {
if !skipTemplatesProcessingInImports && (atmosConfig.Templates.Settings.Import.ProcessWithoutContext || len(context) > 0) {
stackManifestTemplatesProcessed, err = ProcessTmpl(relativeFilePath, stackYamlConfig, context, ignoreMissingTemplateValues)
if err != nil {
if atmosConfig.Logs.Level == u.LogLevelTrace || atmosConfig.Logs.Level == u.LogLevelDebug {
Expand Down
5 changes: 5 additions & 0 deletions pkg/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ type TemplatesSettings struct {
Delimiters []string `yaml:"delimiters,omitempty" json:"delimiters,omitempty" mapstructure:"delimiters"`
Evaluations int `yaml:"evaluations,omitempty" json:"evaluations,omitempty" mapstructure:"evaluations"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty" mapstructure:"env"`
Import TemplateSettingsImport `yaml:"import,omitempty" json:"import,omitempty" mapstructure:"import"`
}

type TemplatesSettingsSprig struct {
Expand All @@ -303,6 +304,10 @@ type TemplatesSettingsGomplate struct {
Datasources map[string]TemplatesSettingsGomplateDatasource `yaml:"datasources" json:"datasources" mapstructure:"datasources"`
}

type TemplateSettingsImport struct {
ProcessWithoutContext bool `yaml:"process_without_context" json:"process_without_context" mapstructure:"process_without_context"`
}

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"`
Expand Down
Loading