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

Hard fail if api_key is not provided #504

Open
gopivalleru opened this issue Jul 18, 2023 · 2 comments
Open

Hard fail if api_key is not provided #504

gopivalleru opened this issue Jul 18, 2023 · 2 comments

Comments

@gopivalleru
Copy link
Contributor

datadog.conf and datadog.yaml role has below line which sets a invalid default value for api_key. If agent_datadog_config["api_key"] or datadog_api_key vars are not provided then api_key in the datadog has 'youshouldsetthis' which fails to start datadog agent. Setting default here actual installs datadog but fails to start the agent until user notices.

{% if agent_datadog_config["api_key"] is not defined -%}
api_key: {{ datadog_api_key | default('youshouldsetthis') }}
{% endif %}

Its better to hard fail while the role is being executed so that the user will provide necessary mandator variables.

@gopivalleru
Copy link
Contributor Author

Created PR: #505

@anth0d
Copy link

anth0d commented Jan 2, 2024

For many users this is a breaking change, see #505 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants