diff --git a/Dockerfile b/Dockerfile index 76fe4ab..a192027 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim +FROM python:3.9-slim ENV PYTHONUNBUFFERED 1 ENV SPACEONE_PORT 50051 diff --git a/src/plugin/main.py b/src/plugin/main.py index 281047e..6c88ef2 100644 --- a/src/plugin/main.py +++ b/src/plugin/main.py @@ -107,13 +107,12 @@ def _create_init_metadata(provider: str) -> dict: def _check_secret_data(provider: str, secret_data: dict) -> None: - match provider: - case "aws" | "azure" | "google_cloud": - missing_keys = [key for key in REQUIRED_SECRET_KEYS[provider] if key not in secret_data] - if missing_keys: - for key in missing_keys: - raise ERROR_REQUIRED_PARAMETER(key=f"secret_data.{key}") - case _: - raise ERROR_INVALID_PARAMETER( - key="options.provider", reason="Not supported provider." - ) + if provider in ["aws", "azure", "google_cloud"]: + missing_keys = [key for key in REQUIRED_SECRET_KEYS[provider] if key not in secret_data] + if missing_keys: + for key in missing_keys: + raise ERROR_REQUIRED_PARAMETER(key=f"secret_data.{key}") + else: + raise ERROR_INVALID_PARAMETER( + key="options.provider", reason="Not supported provider." + )