Skip to content

Conversation

@shemau
Copy link
Contributor

@shemau shemau commented Jul 24, 2025

Description

Add support for two ICD features:

Deletion protection

This is feature flag, that when set to true provides protection from accidentally deleting the ICD instance.

Conceptually the instance is created with this flag set to true and if/when a destroy is attempted the request fails. In addition to requesting a destroy the flag must be set to false.

Note: This does not prevent the resource being destroyed outside of terraform.

In place major version upgrade

This feature allows the major version, eg. 6.0 to upgraded to 7.0 by an in-place upgrade, retaining the original instance connection endpoints. During a major version upgrade, the instance is set to read-only (setUserWriteBlock mode), upgraded and set to accept writes again. There is a service outage during this time, since the service will not accept database updates.

There is an feature flag, version_upgrade_skip_backup. It is NOT recommended to use this feature, since an upgrade failure may result in data loss. This flag avoids taking a backup whilst in read-only mode to speed the process up.

Full documentation at: https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-upgrading&interface=ui

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@shemau shemau requested a review from iamar7 as a code owner July 24, 2025 21:26
@shemau
Copy link
Contributor Author

shemau commented Jul 24, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

Consistency changes were made to the timeouts block on the ibm_database resource. It is now possible to override the update timeout and the new default 120 minutes shows as a change. This, along with addition of version_upgrade_skip_backup causes the upgrade test to fail.

        	            	DIFF:
        	            	  Before: 
        	            		{"timeouts":{"create":"120m","delete":null,"update":null},"version_upgrade_skip_backup":null}
        	            	  After: 
        	            		{"timeouts":{"create":"120m","delete":"15m","update":"120m"},"version_upgrade_skip_backup":false}

It is safe to skip upgrade, since this was the only issue.

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

Two errors unrelated to the changes.

  • Failed to get checksum for IBM provider 1.80.4 (which is a good version)
  • Failed to destroy an instance, still existed.

Try again.

@shemau
Copy link
Contributor Author

shemau commented Jul 25, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 28, 2025

/run pipeline

1 similar comment
@shemau
Copy link
Contributor Author

shemau commented Jul 29, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jul 29, 2025

/run pipeline

Copy link
Member

@iamar7 iamar7 left a comment

Choose a reason for hiding this comment

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

Few minor comments

shemau and others added 2 commits July 30, 2025 16:45
@shemau
Copy link
Contributor Author

shemau commented Jul 30, 2025

/run pipeline

Copy link
Member

@iamar7 iamar7 left a comment

Choose a reason for hiding this comment

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

LGTM

@ocofaigh ocofaigh merged commit 8b4e544 into main Jul 31, 2025
2 checks passed
@ocofaigh ocofaigh deleted the major-upgrade branch July 31, 2025 10:55
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants