terraform-provider-aci icon indicating copy to clipboard operation
terraform-provider-aci copied to clipboard

Aci resource migration bd (DCNE-147 DCNE-144)

Open akinross opened this issue 1 year ago • 2 comments

closes #1257 closes #1042

akinross avatar Sep 16 '24 08:09 akinross

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.01%. Comparing base (baaa506) to head (d47d0b4). Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1286      +/-   ##
==========================================
- Coverage   85.06%   85.01%   -0.06%     
==========================================
  Files         107      123      +16     
  Lines       39446    48119    +8673     
==========================================
+ Hits        33556    40906    +7350     
- Misses       4340     5337     +997     
- Partials     1550     1876     +326     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 17 '24 13:09 codecov-commenter

Hi @samiib,

The idea behind these migration PRs (same applies to EPG/ESG PRs that have been merged already) is to do so in a not breaking way, so for now it is still a minor change.

The schema in the migrated version supports the old and the new input for the attributes, but does not allow you to provide them at the same time. When a old attribute is used a deprecation warning is provided that this attribute will be removed in the next major release of the provider.

When a attribute input is provided the modify-plan will handle the translation to the new/old attribute input. Only the new attributes are used for the payload construction, but both are read and stored in state. This way the user should be able to toggle between the old and new inputs without triggering a change.

Furthermore in order to migrate the old schema ( schemas are version based ) into the new schema there is a part in the code that defines a state-upgrader, which handles the upgrade of old state to new state. So the old configuration if not changed should not trigger any changes in the plan.

akinross avatar Oct 10 '24 06:10 akinross