Skip to content

Commit

Permalink
Depricating terraform_modules option since no longer used (#1057)
Browse files Browse the repository at this point in the history
* Depricating terraform_modules option since no longer used

* remove terraform_modules on upgrade to 0.4.0

Co-authored-by: Dan Lester <dan@ideonate.com>
  • Loading branch information
costrouc and danlester authored Feb 12, 2022
1 parent 24c7721 commit 2be3bce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 0 additions & 9 deletions qhub/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 =============


Expand Down Expand Up @@ -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]
Expand Down
6 changes: 6 additions & 0 deletions qhub/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2be3bce

Please sign in to comment.