Skip to content

feat(postgresflex): add instance deletion protection - #1813

Open
MarcAd1234 wants to merge 1 commit into
stackitcloud:mainfrom
MarcAd1234:feat/postgresflex-instance-deletion-protection
Open

MarcAd1234 wants to merge 1 commit into
stackitcloud:mainfrom
MarcAd1234:feat/postgresflex-instance-deletion-protection

Conversation

@MarcAd1234

Copy link
Copy Markdown

Description

Adds deletion_protection to stackit_postgresflex_instance (optional) and the data source .

  • The create API doesn't accept the flag, so protection is enabled via POST .../protections once the instance is ready.
  • terraform destroy fails early with a clear message if the instance is protected.
  • If the attribute isn't set, the current value from the API is kept, so existing configs show no diff after upgrading

relates to #1800

FYI: TestAccPostgresFlexInstanceMax passes create, data source and import, but the update step fails on 5 pre-existing checks so this seems to be an issue in the test case rather than in this change.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant