Skip to content

Using dogshell with keys supplied in env variables doesn't work for datadoghq.eu #652

@janorn

Description

@janorn

If you try to supply API and APP keys via env variables in a container and your Datadog site is datadoghq.eu it will fail.
This is due to dogshell lacking a site config parameter or environment variable.

I have tried a workaround by supplying the site config in a dogrc file while the KEYs via env variables.
However due to this code the dogrc file will never be used if you supply keys via env variables.

if api_key is not None and app_key is not None:
self["api_key"] = api_key
self["app_key"] = app_key
else:
if os.access(config_file, os.F_OK):
config.read(config_file)
if not config.has_section("Connection"):
report_errors({"errors": ["%s has no [Connection] section" % config_file]})

Adding the keys to a config file in the container is not a viable solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleStale - Bot reminder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions