diff --git a/internal/meta/base_meta.go b/internal/meta/base_meta.go index 3355b5a..03e384d 100644 --- a/internal/meta/base_meta.go +++ b/internal/meta/base_meta.go @@ -497,6 +497,8 @@ func (meta baseMeta) CleanUpWorkspace(_ context.Context) error { tmpMainCfg := filepath.Join(tmpDir, meta.outputFileNames.MainFileName) tmpProviderCfg := filepath.Join(tmpDir, meta.outputFileNames.ProviderFileName) + tmpResourceMappingFileName := filepath.Join(tmpDir, ResourceMappingFileName) + tmpSkippedResourcesFileName := filepath.Join(tmpDir, SkippedResourcesFileName) if err := utils.CopyFile(filepath.Join(meta.outdir, meta.outputFileNames.MainFileName), tmpMainCfg); err != nil { return err @@ -504,6 +506,12 @@ func (meta baseMeta) CleanUpWorkspace(_ context.Context) error { if err := utils.CopyFile(filepath.Join(meta.outdir, meta.outputFileNames.ProviderFileName), tmpProviderCfg); err != nil { return err } + if err := utils.CopyFile(filepath.Join(meta.outdir, ResourceMappingFileName), tmpResourceMappingFileName); err != nil { + return err + } + if err := utils.CopyFile(filepath.Join(meta.outdir, SkippedResourcesFileName), tmpSkippedResourcesFileName); err != nil { + return err + } if err := utils.RemoveEverythingUnder(meta.outdir); err != nil { return err @@ -515,6 +523,12 @@ func (meta baseMeta) CleanUpWorkspace(_ context.Context) error { if err := utils.CopyFile(tmpProviderCfg, filepath.Join(meta.outdir, meta.outputFileNames.ProviderFileName)); err != nil { return err } + if err := utils.CopyFile(tmpResourceMappingFileName, filepath.Join(meta.outdir, ResourceMappingFileName)); err != nil { + return err + } + if err := utils.CopyFile(tmpSkippedResourcesFileName, filepath.Join(meta.outdir, SkippedResourcesFileName)); err != nil { + return err + } } return nil