developmentseed / eoapi-template

Template repository to deploy eoapi application using eoapi-cdk constructs on AWS.
https://eoapi.dev
4 stars 1 forks source link

How to pass list of `schemas` to `TiPgApiLambda` #19

Closed hrodmn closed 11 months ago

hrodmn commented 11 months ago

I am adding some eoapi-cdk constructs to a CloudFormation stack and I want to point TiPG at a database with some schemas not named public. Is there a way to pass the TIPGDB* settings through via the TiPgApiLambda constructor?

Maybe it is possible via api_env? https://github.com/developmentseed/eoapi-template/blob/main/eoapi_template/pgStacInfra.py#L121-L124

hrodmn commented 11 months ago

I got it to work like this:

        TiPgApiLambda(
            ...,
            api_env={
                "NAME": app_config.build_service_name("tipg API"),
                "TIPG_DB_SCHEMAS": f'["{target_schema}", "public"]',
                "description": f"{app_config.stage} tipg API",
            },
            ...
        )