@@ -135,31 +135,15 @@ func runUp(options *createOptions, banzaiCli cli.Cli) error {
135
135
}
136
136
137
137
source := "/export"
138
-
139
- // for backward compatibility
140
- hasExports , err := imageFileExists (options .cpContext , source )
141
- if err != nil {
138
+ var defaultValues map [string ]interface {}
139
+ exportHandlers := []ExportedFilesHandler {
140
+ defaultValuesExporter (filepath .Join (strings .TrimPrefix (source , "/" ), "values.yaml" ), & defaultValues ),
141
+ }
142
+ if err := processExports (options .cpContext , source , exportHandlers ); err != nil {
142
143
return err
143
144
}
144
-
145
- if hasExports {
146
- var defaultValues map [string ]interface {}
147
- exportHandlers := []ExportedFilesHandler {
148
- defaultValuesExporter (filepath .Join (strings .TrimPrefix (source , "/" ), "values.yaml" ), & defaultValues ),
149
- }
150
- if err := processExports (options .cpContext , source , exportHandlers ); err != nil {
151
- return err
152
- }
153
- if err := writeMergedValues (options .cpContext , defaultValues , values ); err != nil {
154
- return err
155
- }
156
- } else {
157
- log .Warnf ("%s is not available in the image, skipping export handlers" , source )
158
- // this is the legacy behaviour that should be removed as soon as we can deprecate old image versions
159
- // where the null_resource.preapply_hook did the merging
160
- if err := runTerraform ("apply" , options .cpContext , nil , "null_resource.preapply_hook" ); err != nil {
161
- return errors .WrapIf (err , "failed to run null_resource.preapply_hook as a standalone target" )
162
- }
145
+ if err := writeMergedValues (options .cpContext , defaultValues , values ); err != nil {
146
+ return err
163
147
}
164
148
165
149
var env map [string ]string
0 commit comments