gitlab_application_settings: Provider produced unexpected value for package_metadata_purl_types after apply
Bug Report: gitlab_application_settings package_metadata_purl_types inconsistent state
Problem
When applying terraform with gitlab_application_settings resource, the package_metadata_purl_types value is set successfully but provider reads back different values, causing
perpetual drift.
Debug logs showing the issue
Provider produced an unexpected new value for gitlab_application_settings.instance:
- .package_metadata_purl_types[0]: was cty.NumberIntVal(2), but now cty.NumberIntVal(999)
Expected vs Actual
- Set:
[2](npm only) - Read back:
[999](unknown)
Provider version: 18.3.0
GitLab version: 18.4.1
Implementation Guide
In the gitlabApplicationSettingsToUpdateOptions function, add a block similar to the existing ones that checks for changes to package_metadata_purl_types and adds to the options if true.
Add a new test case to resource_gitlab_application_settings_test.go that attempts to set the value of package_metadata_purl_types.
Edited by 🤖 GitLab Bot 🤖