diff --git a/terrawrap/utils/config.py b/terrawrap/utils/config.py index 1988fed..9d6dff3 100644 --- a/terrawrap/utils/config.py +++ b/terrawrap/utils/config.py @@ -309,7 +309,7 @@ def calc_backend_config( :return: A dictionary representing the backend configuration for the Terraform directory. """ - backend_config = ["-reconfigure"] + backend_config = ["-reconfigure", "-upgrade"] options: Dict[str, str] = {} repo_path = calc_repo_path(path=path) diff --git a/terrawrap/version.py b/terrawrap/version.py index 9de35b6..8d1410d 100644 --- a/terrawrap/version.py +++ b/terrawrap/version.py @@ -1,4 +1,4 @@ """Place of record for the package version""" -__version__ = "0.10.1" +__version__ = "0.10.2" __git_hash__ = "GIT_HASH" diff --git a/test/unit/test_config.py b/test/unit/test_config.py index 4904dbc..407378d 100644 --- a/test/unit/test_config.py +++ b/test/unit/test_config.py @@ -157,6 +157,7 @@ def test_calc_backend_config(self): expected_config = [ "-reconfigure", + "-upgrade", (f"-backend-config=dynamodb_table={LOCK_TABLE}"), "-backend-config=encrypt=true", "-backend-config=key=terrawrap/config/app1.tfstate", @@ -183,6 +184,7 @@ def test_calc_backend_config_wrapper_config(self): expected_config = [ "-reconfigure", + "-upgrade", f"-backend-config=dynamodb_table={LOCK_TABLE}", "-backend-config=encrypt=true", "-backend-config=key=terrawrap/config/app1.tfstate", @@ -211,6 +213,7 @@ def test_calc_backend_config_with_role_arn(self): expected_config = [ "-reconfigure", + "-upgrade", f"-backend-config=dynamodb_table={LOCK_TABLE}", "-backend-config=encrypt=true", "-backend-config=key=terrawrap/config/app1.tfstate",