Documentation ¶
Index ¶
- func AddRegionField(targetDir string, backupDir string) (err error)
- func AddRegionToProvider(targetFile string, backupFile string) error
- func CopyFile(targetFile string, backupFile string) (err error)
- func CreateBackup(targetDir string, backupDir string) (err error)
- func DeleteBackup(backupDir string) (err error)
- func Migrate(targetDir string, backupDir string) (err error)
- func MigratePlanFile(targetFile string, backupFile string) (err error)
- func ProcessDirectory(targetDir string, backupDir string, fileActionFn FileAction, ...) (err error)
- func RestoreBackup(backupDir string, targetDir string) (err error)
- type FileAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRegionField ¶
Traverse all .tf files and insert `region = "us-phoenix-1"` where region is not specified
func AddRegionToProvider ¶
Scan TF files for provider blocks and inject a region value if not specified
func CreateBackup ¶
Copy target directory and append .backup
func MigratePlanFile ¶
Read file from backup location, apply transforms and overwrite original file
func ProcessDirectory ¶
func ProcessDirectory(targetDir string, backupDir string, fileActionFn FileAction, targetExtns ...string) (err error)
Traverse a directory, executing the supplied FileAction on each file
func RestoreBackup ¶
Overwrite target directory with contents of .backup directory
Types ¶
type FileAction ¶
Individual file io strategies for different operations
Click to show internal directories.
Click to hide internal directories.