[Feature] Add databricks_secret write-only attributes#5480
[Feature] Add databricks_secret write-only attributes#5480ashenm wants to merge 1 commit intodatabricks:mainfrom
databricks_secret write-only attributes#5480Conversation
144575c to
b6e51cc
Compare
a1c3cbd to
aa340c4
Compare
rauchy
left a comment
There was a problem hiding this comment.
@ashenm Thanks for the PR!
The write-only approach makes sense, but I'm not a fan of changing provider infrastructure (common/resource.go, qa/) for this - that affects every resource in the provider and I'd rather keep the blast radius small.
I think you may avoid all of that by adding an Update handler to the resource. PutSecret is already an upsert so it'd be basically the same as Create. That makes the resource CRUD instead of CRD, which means the ForceNew loop in common/resource.go won't kick in and you don't need to patch it. As a bonus, string_value_wo_version wouldn't need ForceNew either - bumping it would just trigger an update instead of destroy+recreate, which is nicer for users doing secret rotation.
49f846d to
9abdf2e
Compare
|
@rauchy yep make sense; updated to CRUD as suggested removing |
ca6c32f to
514e731
Compare
514e731 to
a7cb18a
Compare
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Changes
Add
string_value_woandstring_value_wo_versionephemeral attributes todatabricks_secretresource allowing write-only secret value population avoiding secret value being written to stateTests
Tested via unit-tests and also deployed locally using local provider build
make testrun locallydocs/folderinternal/acceptanceNEXT_CHANGELOG.mdfile