-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix instance policy drift #5308
Fix instance policy drift #5308
Conversation
Forward compatiblity test:
|
Why does it shows a diff in second plan (for metrics) after we create policies with 3 types |
The first tf apply created 3 resources(but incorrectly registered 4 in the state file) we then swap to the new version of the terraform provider and run tf apply. Tf apply recognizes |
@@ -44,11 +44,10 @@ func ResourceIBMKmsInstancePolicy() *schema.Resource { | |||
Description: "public or private", | |||
}, | |||
"dual_auth_delete": { | |||
Type: schema.TypeList, | |||
Optional: true, | |||
AtLeastOneOf: []string{"rotation", "dual_auth_delete", "metrics", "key_create_import_access"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did we removed AtLeastOneOf ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior is wrong. The PUT api this is based off allows empty json bodies where nothing is specified
Changelog:
Community Note
Relates OR Closes #0000
Output from acceptance testing: