Skip to content

Conversation

@Kirdock
Copy link
Collaborator

@Kirdock Kirdock commented Nov 13, 2025

Why this PR?

The OAuth permission environment-api:* is not available anymore. Therefore, it doesn't make sense that some resources that rely on this one make OAuth requests

What has changed?

Affected classic environment resources are now API token-only instead of API token and OAuth.

How does it do it?

By replacing HybridClients with ApiTokenClients

How is it tested?

Current tests are sufficient.

How does it affect users?

They have to use API tokens instead or in addition to OAuth for the following resources:

  • dynatrace_host_monitoring_mode (uses OAuth and API tokens)
  • dynatrace_slo
  • dynatrace_slo_v2 (uses OAuth and API tokens)
  • dynatrace_custom_tags
  • dynatrace_browser_monitor
  • dynatrace_http_monitor_script
  • dynatrace_http_monitor
  • dynatrace_ag_token
  • dynatrace_api_token
  • dynatrace_credentials
  • dynatrace_custom_device
  • dynatrace_key_requests (uses OAuth and API tokens)
  • dynatrace_hub_extension_active_version
  • dynatrace_hub_extension_config
  • dynatrace_network_zone
  • dynatrace_network_monitor

Regarding uses OAuth and API tokens: There are some resources that combine multiple requests. For example, dynatrace_host_monitoring_mode calls the entities endpoint and settings builtin:host.monitoring.mode. In this case OAuth is preferred for the request if the env DYNATRACE_HTTP_OAUTH_PREFERENCE is set to true.

and the following data sources:

  • dynatrace_lambda_agent_version
  • dynatrace_synthetic_nodes
  • dynatrace_entities
  • dynatrace_entity

Issue: CA-17080

BREAKING CHANGE:
Updated all environment classic service implementations to use rest.APITokenClient instead of rest.HybridClient for API requests. This change standardizes client usage and removes support for platform requests for most classic-environment endpoints, retaining only settings-related paths.
@sonarqubecloud
Copy link

@Kirdock Kirdock merged commit d13a690 into main Nov 17, 2025
5 of 6 checks passed
@Kirdock Kirdock deleted the fix/classic/remove-hybrid-from-environment-classic branch November 17, 2025 08:52
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

Successfully merging this pull request may close these issues.

4 participants