Skip to content

[datadog_service_account_application_key] Fix scoped key example#3832

Open
lot-koichi wants to merge 1 commit into
DataDog:masterfrom
lot-koichi:fix-service-account-app-key-scopes
Open

[datadog_service_account_application_key] Fix scoped key example#3832
lot-koichi wants to merge 1 commit into
DataDog:masterfrom
lot-koichi:fix-service-account-app-key-scopes

Conversation

@lot-koichi
Copy link
Copy Markdown

@lot-koichi lot-koichi commented May 29, 2026

What

This updates the datadog_service_account_application_key scoped key example.

  • Remove the example that passes permission IDs returned by data.datadog_permissions into scopes
  • Use Datadog authorization scope names directly, which is what the API accepts
  • Regenerate docs/resources/service_account_application_key.md from the updated example

Why

As described in #3819, the current example suggests passing permission IDs into application key scopes. Datadog rejects that request with Invalid scopes.

The provider implementation and acceptance tests already use scope names directly, so this change aligns the documentation example with the provider behavior and Datadog API expectations.

References

Tests

  • PASS: make fmtcheck
  • PASS: make docs
  • PASS: make check-docs
  • PASS: make test TEST="./datadog ./datadog/dashboardmapping ./datadog/fwprovider ./datadog/fwprovider/observability_pipeline ./datadog/internal/customtypes ./datadog/internal/fwutils ./datadog/internal/planmodifiers ./datadog/internal/utils ./datadog/internal/validators ./version"
  • NOTE: full make test was attempted, but datadog/tests includes acceptance tests and failed because DD_TEST_CLIENT_API_KEY is not set in this local environment.

@lot-koichi lot-koichi marked this pull request as ready for review May 29, 2026 01:34
@lot-koichi lot-koichi requested review from a team as code owners May 29, 2026 01:34
@urseberry
Copy link
Copy Markdown
Contributor

DOCS-14577 created for review

Copy link
Copy Markdown

@OliviaShoup OliviaShoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, thanks so much for the PR! we always appreciate when people help us update the documentation :)

@datadog-datadog-prod-us1

This comment has been minimized.

@fpighi fpighi enabled auto-merge (squash) June 3, 2026 12:54
@fpighi fpighi disabled auto-merge June 4, 2026 08:04
@fpighi
Copy link
Copy Markdown
Member

fpighi commented Jun 4, 2026

@lot-koichi we require commits to be signed. Can you please make sure of that? Once done the PR will be merged. Thank you again.

@lot-koichi lot-koichi force-pushed the fix-service-account-app-key-scopes branch from 5f2f068 to 4c96343 Compare June 5, 2026 01:12
@lot-koichi
Copy link
Copy Markdown
Author

@lot-koichi we require commits to be signed. Can you please make sure of that? Once done the PR will be merged. Thank you again.

@fpighi Thank you for comment. I signed the commit, please take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: service_account_application_key scopes example uses permission IDs

4 participants