Add allowed_deletion Config Option to resourceHerokuApp
#391
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
allowed_deletionConfig Option toresourceHerokuAppDescription
This PR introduces a new configuration option,
allowed_deletion, to theresourceHerokuAppresource in theterraform-provider-heroku. By default, this option blocks any actions that require deletion of a Heroku app, unless explicitly allowed by the user. This change is not backward-compatible, as all delete operations will now be blocked by default unlessallowed_deletionis explicitly set totrue.Changes
allowed_deletionOption:boolfalsefalse(default), any action requiring the deletion of a Heroku app (e.g.,terraform destroyorterraform applywith adeleteoperation) will fail with a clear error message.true, deletion actions are allowed, restoring the previous behavior.Behavior Changes:
allowed_deletionis not explicitly set, deletion actions will now fail.allowed_deletion = trueto permit deletions.Documentation Updates:
resource_heroku_appdocumentation has been updated to detail theallowed_deletionoption, its purpose, and provide examples for enabling deletion.Tests:
allowed_deletionin scenarios with and without deletion actions.Why is this change necessary?
Accidental deletion of Heroku apps can lead to data loss and service outages. This change introduces a safer default configuration that requires explicit user action to allow deletions, reducing the risk of unintended consequences.
Example Usage