Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the secrets manager to get the connection parameters for the database. #16

Open
github-actions bot opened this issue Aug 11, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

https://api.github.com/nanlabs/aws-glue-etl-boilerplate/blob/228e97dc1f6fafbc714c17f2b3c01cabd8db2213/libs/config/config.py#L52

        """
        return {
            **self.aws_client_vars,
            "bucket_name": self.env.get_var("S3_BUCKET_NAME"),
        }

    @cached_property
    def documentdb_vars(self) -> dict:
        """
        Get connection parameters for the Database.

        :return: A json with the connection parameters.
        """

        # TODO: Use the secrets manager to get the connection parameters for the database.

        return {
            "engine": self.env.get_var("DOCUMENT_DB_ENGINE"),
            "host": self.env.get_var("DOCUMENT_DB_HOST"),
            "port": self.env.get_var("DOCUMENT_DB_PORT"),
            "database": self.env.get_var("DOCUMENT_DB_NAME"),
            "user": self.env.get_var("DOCUMENT_DB_USERNAME"),
            "password": self.env.get_var("DOCUMENT_DB_PASSWORD"),
            "ssl": self.env.get_var("DOCUMENT_DB_SSL") == "true",
        }

    @cached_property
    def postgresdb_vars(self) -> dict:
        """
        Get connection parameters for the Database.

        :return: A json with the connection parameters.
        """

        # TODO: Use the secrets manager to get the connection parameters for the database.

        return {
            "engine": self.env.get_var("POSTGRES_DB_ENGINE"),
            "host": self.env.get_var("POSTGRES_DB_HOST"),
            "port": self.env.get_var("POSTGRES_DB_PORT"),
            "database": self.env.get_var("POSTGRES_DB_NAME"),
            "user": self.env.get_var("POSTGRES_DB_USERNAME"),
            "password": self.env.get_var("POSTGRES_DB_PASSWORD"),
        }


config_instance = None
@github-actions github-actions bot added the todo label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants