-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(infra): ensure we set az for primary in postgresql #1973
Conversation
📝 WalkthroughWalkthroughThis update adds an Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.azure/infrastructure/main.bicep (1)
60-68
: AddavailabilityZone
property topostgresConfiguration
parameterA new property (
availabilityZone: string
) has been added inside thepostgresConfiguration
object. This enables specifying the availability zone for the PostgreSQL deployment directly from the main template. Please make sure that documentation and corresponding parameter files (e.g., for prod, staging, etc.) are updated accordingly.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.azure/infrastructure/main.bicep
(2 hunks).azure/infrastructure/prod.bicepparam
(1 hunks).azure/infrastructure/staging.bicepparam
(1 hunks).azure/infrastructure/test.bicepparam
(1 hunks).azure/infrastructure/yt01.bicepparam
(1 hunks).azure/modules/postgreSql/create.bicep
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Dry run deploy infrastructure / Deploy to test
🔇 Additional comments (7)
.azure/infrastructure/staging.bicepparam (1)
41-41
: Availability zone added for PostgreSQL instanceThe addition of
availabilityZone: '2'
specifies which Azure availability zone to use for the PostgreSQL instance in the staging environment. This aligns with the PR objective to ensure that the primary availability zone is correctly set during deployment..azure/infrastructure/prod.bicepparam (1)
41-41
: Correct availability zone added for productionAdding
availabilityZone: '3'
for the production environment ensures the PostgreSQL instance will be deployed in the right zone. This is especially important for the production environment whereenableHighAvailability
is set totrue
(line 39), addressing the issue mentioned in the PR objectives where the bicep deployment failed because the primary AZ wasn't set correctly..azure/infrastructure/test.bicepparam (1)
41-41
: Test environment availability zone setAdding
availabilityZone: '1'
for the test environment ensures consistent configuration across environments. This parameter was missing previously and is now properly set..azure/infrastructure/yt01.bicepparam (1)
43-43
: YT01 environment availability zone configuredThe addition of
availabilityZone: '1'
ensures the PostgreSQL instance will be deployed in the correct availability zone for the YT01 environment. This completes the consistent configuration across all environments..azure/infrastructure/main.bicep (1)
221-223
: PassavailabilityZone
to the PostgreSQL moduleThe module instantiation for
postgresql
now passes the new property via
availabilityZone: postgresConfiguration.availabilityZone
. This ensures that the module receives the correct configuration for the availability zone. Verify that the module’s usage of this parameter aligns with the updated HA configuration requirements..azure/modules/postgreSql/create.bicep (2)
58-60
: Introduce theavailabilityZone
parameter in the PostgreSQL moduleA new parameter (
availabilityZone: string
) is added along with a description explaining that it denotes the availability zone for the PostgreSQL primary server. This is consistent with changes in the main template and supports the required HA configuration.
129-129
: IntegrateavailabilityZone
into the PostgreSQL resource propertiesWithin the
postgres
resource block, theavailabilityZone
property is now assigned (i.e.availabilityZone: availabilityZone
). Please verify that this property is supported by the selected API version (2024-08-01
) and that the passed value aligns with the expected format.
🤖 I have created a release *beep* *boop* --- ## [1.56.1](v1.56.0...v1.56.1) (2025-02-27) ### Bug Fixes * **infra:** ensure we set az for primary in postgresql ([#1973](#1973)) ([b4fd665](b4fd665)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
We had an issue where we added HA for
prod
, but the bicep deployment didn't go through because we need to set the primary az. Setting the primary az to the one that it was added to when created.Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)