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

[CES-767] Upgrade Postgres SKUs to v5 #298

Conversation

Krusty93
Copy link
Contributor

List of changes

Tier L now uses GP_Standard_D4ds_v5 and tier M moved to GP_Standard_D2ds_v5

Motivation and context

PagoPA owns reservations only for v5

Type of changes

  • Add new resources
  • Update configuration to existing resources
  • Remove existing resources

Does this introduce a change to production resources with possible user impact?

  • Yes, users may be impacted applying this change
  • No

Other information

@Krusty93 Krusty93 requested review from a team as code owners February 20, 2025 10:00
Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: 7494f69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
azure_postgres_server Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@gunzip gunzip left a comment

Choose a reason for hiding this comment

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

does this cause a resource delete ?

@Krusty93
Copy link
Contributor Author

does this cause a resource delete ?

It should trigger an update in place, buy nobody's using the module yet: we have only one reference from CGN repo, but this change have been asked by them

@gunzip
Copy link
Contributor

gunzip commented Feb 20, 2025

As a general priciple, it's ok to maintain minor for update in place, but 'nobody's using the module' still triggers a major for breaking changes :-)

It looks like this is worth an Azure Policy that limits available SKU, isn't it? Maybe we can contribute to the global repo?

@Krusty93
Copy link
Contributor Author

As a general priciple, it's ok to maintain minor for update in place, but 'nobody's using the module' still triggers a major for breaking changes :-)

It is a personal struggle with numbers incredibly high as major versions and I tend to avoid it when possible, despite I'm aware to be on mistake :) BTW I've changed it to major

It looks like this is worth an Azure Policy that limits available SKU, isn't it? Maybe we can contribute to the global repo?

Probably
@pasqualedevita any though?

@Krusty93 Krusty93 enabled auto-merge (squash) February 20, 2025 10:23
@pasqualedevita
Copy link
Member

pasqualedevita commented Feb 20, 2025

It looks like this is worth an Azure Policy that limits available SKU, isn't it? Maybe we can contribute to the global repo?

Probably @pasqualedevita any though?

We can add only a policy in audit mode because the best sku version can change over the time but old resources can have active reservation.

So the generic policy should be:

  1. for new resources must use the latest sku (v5)
  2. existing resources should migrate to v5 if not already reserved
  3. existing resources on v4 should add an exception with expiration date equal to reservation expire

GP_Standard_D2s_v3 is very old (maybe deprecated in next 1 or 2 year) so probably we can deny this sku

@pasqualedevita
Copy link
Member

changing sku cause a downtime because db will be restarted, maybe we can insert this information into changelog

@pasqualedevita
Copy link
Member

pasqualedevita commented Feb 20, 2025

Anyway Postgresql SKU policy is already active for all PROD subscriptions

https://github.com/pagopa/eng-azure-governance/blob/main/src/03_policy_set/01_postgresql_prod.tf

@Krusty93 Krusty93 merged commit bc3027b into main Feb 20, 2025
8 checks passed
@Krusty93 Krusty93 deleted the CES-767-aggiornare-gli-sku-postgres-del-modulo-terraform-alla-v-5 branch February 20, 2025 13:44
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.

4 participants