From 2be3bce68e95c163c014ee8df7efa0fd1da7d2c0 Mon Sep 17 00:00:00 2001 From: Christopher Ostrouchov Date: Sat, 12 Feb 2022 05:51:34 -0500 Subject: [PATCH] Depricating terraform_modules option since no longer used (#1057) * Depricating terraform_modules option since no longer used * remove terraform_modules on upgrade to 0.4.0 Co-authored-by: Dan Lester --- qhub/schema.py | 9 --------- qhub/upgrade.py | 6 ++++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/qhub/schema.py b/qhub/schema.py index 9d41ee8d50..df4d30780b 100644 --- a/qhub/schema.py +++ b/qhub/schema.py @@ -100,12 +100,6 @@ class TerraformState(Base): config: typing.Optional[typing.Dict[str, str]] -class TerraformModules(Base): - # No longer used, so ignored, but could still be in qhub-config.yaml - repository: str - rev: str - - # ============ Certificate ============= @@ -415,9 +409,6 @@ class Main(Base): ci_cd: typing.Optional[CICD] domain: str terraform_state: typing.Optional[TerraformState] - terraform_modules: typing.Optional[ - TerraformModules - ] # No longer used, so ignored, but could still be in qhub-config.yaml certificate: Certificate helm_extensions: typing.Optional[typing.List[HelmExtension]] prefect: typing.Optional[Prefect] diff --git a/qhub/upgrade.py b/qhub/upgrade.py index 98a6013eba..6429bdd9ff 100644 --- a/qhub/upgrade.py +++ b/qhub/upgrade.py @@ -303,6 +303,12 @@ def _version_specific_upgrade( if "groups" in security: del security["groups"] + if "terraform_modules" in config: + del config["terraform_modules"] + print( + "Removing terraform_modules field from config as it is no longer used.\n" + ) + # Create root password default_password = "".join( secrets.choice(string.ascii_letters + string.digits) for i in range(16)