Skip to content

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

@github-actions

Description

@github-actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions