[DOCS-11780] Add API and app key setup guidance to Terraform integration doc#23875
[DOCS-11780] Add API and app key setup guidance to Terraform integration doc#23875buraizu wants to merge 2 commits into
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e034c9e61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| **Note**: If you are not using the Datadog US1 site, you must set the `api_url` [optional parameter][7] with your [Datadog site][6]. Ensure the documentation site selector on the right of the page is set to your correct Datadog site, then use the following URL as the value of the `api_url` parameter: | ||
| **Notes**: | ||
| - The `api_key` and `app_key` values are your Datadog API key and application key. See [API and application keys][8] to create these credentials. To avoid storing credentials in your configuration files, set them as Terraform environment variables (`TF_VAR_datadog_api_key` and `TF_VAR_datadog_app_key`) before running any Terraform commands. |
There was a problem hiding this comment.
Declare variables before recommending TF_VAR credentials
For this exact main.tf snippet, setting TF_VAR_datadog_api_key and TF_VAR_datadog_app_key does not make var.datadog_api_key or var.datadog_app_key exist; Terraform only uses TF_VAR_ values for already-declared input variables (see HashiCorp's input-variable docs). Users following the doc as written will still hit undeclared input variable errors during validation/plan/apply unless the example also includes variable blocks for both names, or the guidance instead uses the Datadog provider's supported DD_API_KEY/DD_APP_KEY environment variables.
Useful? React with 👍 / 👎.
Validation Report
Run Passed validations (20)
|
What does this PR do? What is the motivation?
Fixes DOCS-11780
Adds a note to the Configuration section of the Terraform integration README explaining that
api_keyandapp_keyrefer to Datadog API and application keys, with a link to create them and guidance to useTF_VAR_*environment variables to avoid hardcoding credentials.Merge instructions
Merge readiness:
Additional notes
References