secretmanager: fixed secret_data/secret_data_wo constraint allowing neither to be set#18320
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit e2f8f34: Diff reportYour PR generated the following diffs in downstream repositories:
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @malhotrasagar2212, @melinath VCR tests complete for e2f8f34! |
|
FYI the new test is impacted by hashicorp/terraform-provider-google#15427 & should probably be marked as SkipIfVcr to avoid confusion. |
BBBmau
left a comment
There was a problem hiding this comment.
@melinath This PR was actually something I had in mind to open after looking further into the PR i had opened. The old PR can be closed as the actual logic that we want to focus on now is in the writeOnlyField logic that adds the write-only and write-only-version fields.
The suggested changes are to resolve the missing required_with which is due to not properly naming secretDataWoVersion, the FEATURE-BRANCH-major-release-8.0.0 will of course resolve this by using the new write_only: true and not write_only_legacy: true
| - 'payload.0.secretData' | ||
| - 'payload.0.secretDataWo' | ||
| write_only_legacy: true | ||
| - name: 'SecretDataWoVersion' |
There was a problem hiding this comment.
| - name: 'SecretDataWoVersion' | |
| - name: 'secretDataWoVersion' |
| @@ -213,8 +214,9 @@ properties: | |||
| api_name: data | |||
| required_with: | |||
| - 'SecretDataWoVersion' | |||
There was a problem hiding this comment.
| - 'SecretDataWoVersion' | |
| - 'payload.0.secretDataWoVersion' |
There was a problem hiding this comment.
I think this change would be a breaking change that's not allowed in a minor release; the breaking change already in this PR is allowed because the resource can't work otherwise, but I don't think that's true for this one.
| required_with: | ||
| - 'SecretDataWoVersion' |
There was a problem hiding this comment.
This should be deleted for clarity, then re-added in the major release branch.
| required_with: | |
| - 'SecretDataWoVersion' |
google_secret_manager_secret_versionaccepted a config with neithersecret_datanorsecret_data_woset. terraform planned it successfully, created the parent secret , then failed at apply with an API error naming a field that doesn't exist in the provider:Error: Error creating SecretVersion: googleapi: Error 400: Field [payload] is required.Fixes hashicorp/terraform-provider-google#24269
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.