Skip to content
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

Add RequiresReplace attribute for secret_name in hvs secret resource #1157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func (r *resourceVaultsecretsSecret) Schema(_ context.Context, _ resource.Schema
"must contain only ASCII letters, numbers, and underscores; must not start with a number",
),
},
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
Copy link
Contributor

@maxcoulombe maxcoulombe Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this to the app_name since it is not a modifiable field either.

Can we add tests for that scenario? Something like a CheckDestroy that verifies the secret with the old name no longer exists after the rename is applied. A good rule of thumb is 1 regression = 1 new test!

},
"secret_value": schema.StringAttribute{
Description: "The value of the secret",
Expand Down
Loading