github dynatrace-oss/terraform-provider-dynatrace v1.109.0

3 hours ago

Workload identity federation support

The provider now supports Workload identity federation (WIF) for the Dynatrace platform APIs. Inside a GitHub Actions job, the provider gets a short-lived OIDC token and renews it automatically, so you no longer need to store a long-lived secret.

  • Provider: Added the optional attribute wif_audience (environment variables DYNATRACE_WIF_AUDIENCE / DT_WIF_AUDIENCE). Setting it turns on WIF, which then takes precedence over platform_token and OAuth credentials.
  • GitHub Actions is the only supported identity provider. The job needs the id-token: write permission.
  • WIF covers platform APIs only. IAM (Account Management) resources still need OAuth credentials, and classic resources still need an API token.
  • See the provider documentation for setup steps and a sample GitHub Actions workflow.
  • For how to configure your Dynatrace environment, see Workload identity federation.

New fields

  • dynatrace_autotag_v2, dynatrace_autotag_rules: Updated to schema version 1.0.19. Added the attribute keys RESOURCE_ATTRIBUTES and GROUP_RESOURCE_ATTRIBUTES.

Breaking changes

  • dynatrace_network_monitor: local_consecutive_outage_count_threshold and local_location_outage_count_threshold can now only be set when local_outages is true. global_consecutive_outage_count_threshold can now only be set when global_outages is true. Previously the API silently dropped these values, which caused permanent drift. global_consecutive_outage_count_threshold no longer has a default value; it falls back to 1 when global_outages is enabled.
  • dynatrace_network_monitor: tags.tag.source now only accepts USER. The API ignores AUTO and RULE_BASED on write.
  • dynatrace_network_monitor: Removed the environment variable DYNATRACE_CREATE_CONFIRM_SYNTHETIC_MONITORS_V2. The resource no longer waits for or retries a confirmation read after create/update.
  • dynatrace_autotag_v2, dynatrace_autotag_rules: Conditional fields are now validated in both directions. case_sensitive, dynamic_key, dynamic_key_source, entity_id, enum_value, integer_value, string_value, tag and the *_propagation fields are rejected when the selected key or entity_type does not use them. dynamic_key is now required for label and resource-attribute keys instead of defaulting to an empty string.

Bug fixes

  • dynatrace_network_monitor: Create and update no longer read the monitor back afterwards, which makes deployments much faster. The API is eventually consistent, so a terraform plan run within about a minute of an apply can still show a temporary diff.
  • Provider: API requests are now also retried on HTTP 502, 503 and 504 responses, in addition to 429.

Misc

  • Settings 2.0 resources: Faster refresh, because the object order of a schema is fetched once and reused across resources during terraform plan/refresh.

Changelog

  • ef825a6 docs: update docs
  • 9e25a65 fix: improve performance of dynatrace_network_monitor
  • f0e4154 test: Check and resource utilities
  • 4698cd3 test: enable bucket test
  • 84d08e4 test: run a test for each API
  • d09f6ea fix: check environment URL for WIF auth
  • b297506 ci: fix WIF setup
  • 59f407c feat(wif): add WIF attributes to provider config
  • 7859e30 perf: reuse Settings 2.0 object order during refresh
  • 27bb871 chore(deps): bump golang.org/x/oauth2 from 0.37.0 to 0.38.0
  • 4797e4d chore: extend msgpack ignore another month
  • ef4e3a9 feat: updated dynatrace_autotag_v2 to v1.0.19
  • 214e698 feat: retry on 503 and 504
  • 63d1c32 chore(deps): bump github.com/zclconf/go-cty from 1.19.0 to 1.20.0
  • b1760a6 chore(deps): bump SonarSource/sonarqube-scan-action from 8.4.0 to 8.4.1

Don't miss a new terraform-provider-dynatrace release

NewReleases is sending notifications on new releases.