github.com/pix4d/terravalet@v0.8.1-0.20240131132849-abcd6a79eeeb/CHANGELOG.md (about) 1 # Terravalet Changelog 2 3 All notable changes to this project will be documented in this file. 4 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## UNRELEASED 9 10 ## [v0.8.0] - (2024-01-31) 11 12 #### New 13 14 - New command `remove` to remove resources from the Terraform state. See the README for details. 15 - The script generated by `terravalet import` now prints each command before executing it. This helps to understand which command is being executed. 16 17 ### Changes 18 19 - Use Go 1.21 20 21 ## [v0.7.2] - (2023-02-28) 22 23 ### Fixes 24 25 - import: don't break the loop if a resource is not defined 26 27 ## [v0.7.1] - (2023-02-21) 28 29 ### Fixes 30 31 - import: use quote formatting verb to allow for multi-word resource addresses 32 33 ## [v0.7.0] - (2022-02-08) 34 35 ### New 36 37 - New command `move-before`, to move resources to a root environment upstream in the dependency chain (see README for details): 38 ``` 39 $ terravalet move-before -h 40 Usage: terravalet move-before --script SCRIPT --before BEFORE --after AFTER 41 Options: 42 --script SCRIPT the migration scripts; will generate SCRIPT_up.sh and SCRIPT_down.sh 43 --before BEFORE the before root directory; will look for BEFORE.tfplan and BEFORE.tfstate 44 --after AFTER the after root directory; will look for AFTER.tfstate 45 ``` 46 47 - Simplify workflow for state move (see README for details). 48 49 ### Breaking changes 50 51 - Rename command `move` to `move-after` (to be uniform with the new command `move-before`). 52 - Command `move-after` now takes 3 (different) CLI options instead of the previous 6: 53 ``` 54 $ terravalet move-after -h 55 Usage: terravalet move-after --script SCRIPT --before BEFORE --after AFTER 56 Options: 57 --script SCRIPT the migration scripts; will generate SCRIPT_up.sh and SCRIPT_down.sh 58 --before BEFORE the before root directory; will look for BEFORE.tfplan and BEFORE.tfstate 59 --after AFTER the after root directory; will look for BEFORE.tfstate and AFTER.tfstate 60 ``` 61 62 ### Changes 63 64 - Command-line parsing: replace flaggy with [go-arg](https://github.com/alexflint/go-arg). 65 66 ### Fixes 67 68 - Fix a test flake due to the use of unsorted set (i.e {abcde} -> {abdcde} or {abdecde} -> {abdcde}) 69 70 ## [v0.6.1] - (2021-08-24) 71 72 ### Changes 73 74 - Update Go to 1.17 75 76 ### Fixes 77 78 - Fix breaking too early the loop giving a not fully compiled script. 79 80 ## [v0.6.0] - (2021-08-11) 81 82 ### New 83 84 - Subcommand `import` (new functionality): 85 ``` 86 import - Import resources generated out-of-band of Terraform 87 88 Flags: 89 -res-defs Path to resources definitions 90 -src-plan Path to the SRC terraform plan in json format 91 -up Path to the resources import script to generate (import.up.sh). 92 -down Path to the resources remove script to generate (import.down.sh). 93 ``` 94 95 ## [v0.5.0] - (2021-07-23) 96 97 ### Fixes 98 99 - Improved Fuzzy matching selection algorithm to iteratively consume the best matching create/destroy combination. 100 101 ## [v0.4.0] - (2021-01-25) 102 103 ### Breaking changes 104 105 - Due to the introduction of subcommands, the CLI API has changed; now it must be invoked by specifying a subcommand. See section New for details. 106 107 ### Changes 108 109 ### New 110 111 - Introduction of subcommands. 112 - Subcommand `rename` (existing functionality): 113 ``` 114 rename - Rename resources in the same tf root environment 115 116 Flags: 117 -plan Path to the terraform plan. 118 -fuzzy-match Enable q-gram distance fuzzy matching. 119 -up Path to the up migration script to generate 120 -down Path to the down migration script to generate 121 ``` 122 - Subcommand `move` (new functionality): 123 ``` 124 move - Move resources from one root environment to another 125 126 Flags: 127 -src-plan Path to the SRC terraform plan 128 -dst-plan Path to the DST terraform plan 129 -src-state Path to the SRC local state to modify 130 -dst-state Path to the DST local state to modify 131 -up Path to the up migration script to generate 132 -down Path to the down migration script to generate 133 ``` 134 135 ## [v0.3.0] - (2020-12-11) 136 137 ### New 138 139 - Fuzzy matching. See README for more information. 140 141 ## [v0.2.0] - (2020-11-27) 142 143 ### Breaking changes 144 145 - The CLI API has changed; now it must be invoked as 146 ``` 147 $ terravalet -plan=PLAN -up=UP.sh -down=DOWN.sh 148 ``` 149 150 ### Changes 151 152 - Migration script: do not print anymore the count `>>> 1/N`, because each time N changed, this was causing N spurious diffs, hiding the real elements that changed. The `terravalet_output_format` is now 2. 153 - Migration script: do not take a lock; it is useless as long as the operations are strictly on a local state file. This speeds up the runtime. 154 155 ### New 156 157 - Generate also the DOWN migration script. 158 - Extensive tests. 159 160 ## [v0.1.0] - (2020-11-20) 161 162 ### New 163 164 - For the time being, this repository is kept private. Will be open-sourced later. 165 - First release, with scripted release support. 166 - Basic functionalities, generate the UP migration script only. 167 - CLI API: 168 ``` 169 $ terravalet -plan=PLAN > UP.sh 170 ``` 171 - flag `-version` reports the git commit. 172 173 174 [v0.1.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.1.0 175 [v0.2.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.2.0 176 [v0.3.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.3.0 177 [v0.4.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.4.0 178 [v0.5.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.5.0 179 [v0.6.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.6.0 180 [v0.6.1]: https://github.com/Pix4D/terravalet/releases/tag/v0.6.1 181 [v0.7.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.7.0 182 [v0.7.1]: https://github.com/Pix4D/terravalet/releases/tag/v0.7.1 183 [v0.7.2]: https://github.com/Pix4D/terravalet/releases/tag/v0.7.2 184 [v0.8.0]: https://github.com/Pix4D/terravalet/releases/tag/v0.8.0