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 variablesDYNATRACE_WIF_AUDIENCE/DT_WIF_AUDIENCE). Setting it turns on WIF, which then takes precedence overplatform_tokenand OAuth credentials. - GitHub Actions is the only supported identity provider. The job needs the
id-token: writepermission. - 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 keysRESOURCE_ATTRIBUTESandGROUP_RESOURCE_ATTRIBUTES.
Breaking changes
dynatrace_network_monitor:local_consecutive_outage_count_thresholdandlocal_location_outage_count_thresholdcan now only be set whenlocal_outagesistrue.global_consecutive_outage_count_thresholdcan now only be set whenglobal_outagesistrue. Previously the API silently dropped these values, which caused permanent drift.global_consecutive_outage_count_thresholdno longer has a default value; it falls back to1whenglobal_outagesis enabled.dynatrace_network_monitor:tags.tag.sourcenow only acceptsUSER. The API ignoresAUTOandRULE_BASEDon write.dynatrace_network_monitor: Removed the environment variableDYNATRACE_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,tagand the*_propagationfields are rejected when the selectedkeyorentity_typedoes not use them.dynamic_keyis 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 aterraform planrun within about a minute of an apply can still show a temporary diff.- Provider: API requests are now also retried on HTTP
502,503and504responses, in addition to429.
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