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

provider: support for the postgresql_flexible_server.restart_server_on_configuration_value_change property #23811

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

igorkliushnikov
Copy link
Contributor

@igorkliushnikov igorkliushnikov commented Nov 7, 2023

Adding new azurerm provider feature postgresql_flexible_server.restart_server_on_configuration_value_change that allows to opt out from Azure Postgres Flex Server restarts on each static parameter change.

By default, the feature is set to true, which is compatible with current azurerm provider behaviour.

The Pull Request also

  • includes server-restart check to existing acceptance test, and adds a new acceptance test to cover the scenario when the server-restarts are disabled.
  • extends checkReset function to support different types of checks, then I reused it for pending-restart property verification.

I executed all Postgres Flex Server Configuration tests in my sandbox subscription via make acctests SERVICE='postgres' TESTARGS='-run=TestAccFlexibleServerConfiguration_' TESTTIMEOUT='60m'

Example code to disable postgres flex server restarts:

provider "azurerm" {
  features {
    postgresql_flexible_server {
      restart_server_on_configuration_value_change = false
    }
  }
}

This PR fixes #22257

@igorkliushnikov
Copy link
Contributor Author

I have corrected the tf-code formatting that was failing in the previous check run.
The second action failed in the code that looks like was fixed a few hours ago in the mainstream repository: 6815d73
Should I rebase my fork on top of the mainstream?

@igorkliushnikov
Copy link
Contributor Author

The branch was rebased on top of the main

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in getting this reviewed and merged @igorkliushnikov - dug into it today and it LGTM 🚚

@katbyte katbyte changed the title azurerm_postgresql_flexible_server_configuration: allow disabling server restarts when static configuration parameter changes provider: support for the postgresql_flexible_server.restart_server_on_configuration_value_change property Feb 14, 2024
@katbyte katbyte merged commit d53e370 into hashicorp:main Feb 14, 2024
24 checks passed
@github-actions github-actions bot added this to the v3.92.0 milestone Feb 14, 2024
katbyte added a commit that referenced this pull request Feb 14, 2024
dduportal added a commit to jenkins-infra/azure that referenced this pull request Feb 19, 2024
<Actions>
<action
id="f410411e63aff4bb73a81c2aec1d373cf8a903e63b30dee2006b0030d8a94cc8">
        <h3>Bump Terraform `azurerm` provider version</h3>
<details
id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24">
            <summary>Update Terraform lock file</summary>
<p>changes detected:&#xA;&#x9;&#34;hashicorp/azurerm&#34; updated from
&#34;3.91.0&#34; to &#34;3.92.0&#34; in file
&#34;.terraform.lock.hcl&#34;</p>
            <details>
                <summary>3.92.0</summary>
<pre>Changelog retrieved
from:&#xA;&#x9;https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.92.0&#xA;FEATURES:&#xA;&#xA;*
**New Data Source**: `azurerm_virtual_desktop_application_group`
([#24771](https://github.com/hashicorp/terraform-provider-azurerm/issues/24771))&#xA;&#xA;ENHANCEMENTS:&#xA;&#xA;*
provider: support for the feature flag
`postgresql_flexible_server.restart_server_on_configuration_value_change
property`
([#23811](https://github.com/hashicorp/terraform-provider-azurerm/issues/23811))&#xA;*
dependencies: updating to v0.20240214.1142753 of
`github.com/hashicorp/go-azure-sdk`
([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889))&#xA;*
`automation`: updating to use the transport layer from
`hashicorp/go-azure-sdk` rather than `Azure/go-autorest`
([#24858](https://github.com/hashicorp/terraform-provider-azurerm/issues/24858))&#xA;*
`maintenance`: updating to use the transport layer from
`hashicorp/go-azure-sdk` rather than `Azure/go-autorest`
([#24819](https://github.com/hashicorp/terraform-provider-azurerm/issues/24819))&#xA;*
`containerapps`: updating to use the transport layer from
`hashicorp/go-azure-sdk` rather than `Azure/go-autorest`
([#24862](https://github.com/hashicorp/terraform-provider-azurerm/issues/24862))&#xA;*
`containerservices`: updating to use the transport layer from
`hashicorp/go-azure-sdk` rather than `Azure/go-autorest`
([#24872](https://github.com/hashicorp/terraform-provider-azurerm/issues/24872))&#xA;*
`timeseriesinsights`: updating to use the transport layer from
`hashicorp/go-azure-sdk` rather than `Azure/go-autorest`
([#24889](https://github.com/hashicorp/terraform-provider-azurerm/issues/24889))&#xA;*
`azurerm_container_app_environment`: support for the
`infrastructure_resource_group_name` property
([#24361](https://github.com/hashicorp/terraform-provider-azurerm/issues/24361))&#xA;*
`azurerm_cost_anomaly_alert` - support for the `subscription_id`
property
([#24258](https://github.com/hashicorp/terraform-provider-azurerm/issues/24258))&#xA;*
`azurerm_cosmosdb_account` - add default values for the
`consistency_policy` code block
([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830))&#xA;*
`azurerm_dashboard_grafana` - support for the `smtp` block
([#24717](https://github.com/hashicorp/terraform-provider-azurerm/issues/24717))&#xA;*
`azurerm_key_vault_certificates` - support for the `tags` property
([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857))&#xA;*
`azurerm_key_vault_secrets` - support for the `tags` property
([#24857](https://github.com/hashicorp/terraform-provider-azurerm/issues/24857))&#xA;*
`azurerm_orchestrated_virtual_machine_scale_set` - support for the
`additional_unattend_content` block
([#24292](https://github.com/hashicorp/terraform-provider-azurerm/issues/24292))&#xA;*
`azurerm_virtual_desktop_host_pool` - support for the `vm_template`
property
([#24369](https://github.com/hashicorp/terraform-provider-azurerm/issues/24369))&#xA;&#xA;BUG
FIXES:&#xA;&#xA;* `azurerm_container_app_environment`: avoid unwanted
changes when updating and using `log_analytics_workspace_id`
([#24303](https://github.com/hashicorp/terraform-provider-azurerm/issues/24303))&#xA;*
`azurerm_cosmosdb_account` - fixed regression in the `backup` code block
([#24830](https://github.com/hashicorp/terraform-provider-azurerm/issues/24830))&#xA;*
`azurerm_data_factory` - allow the `git_url` property to be blank/empty
([#24879](https://github.com/hashicorp/terraform-provider-azurerm/issues/24879))&#xA;*
`azurerm_linux_web_app_slot` - the `worker_count` property now works
correctly in the `site_config` block
([#24515](https://github.com/hashicorp/terraform-provider-azurerm/issues/24515))&#xA;*
`azurerm_linux_web_app` - support `off` for the `file_system_level`
property
([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877))&#xA;*
`azurerm_linux_web_app_slot` - support `off` for the `file_system_level`
property
([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877))&#xA;*
`azurerm_private_endpoint` - fixing an issue where updating the Private
Endpoint would remove any Application Security Group Association
([#24846](https://github.com/hashicorp/terraform-provider-azurerm/issues/24846))&#xA;*
`azurerm_search_service` - fixed the update function to adjust for
changed API behaviour
([#24837](https://github.com/hashicorp/terraform-provider-azurerm/issues/24837))&#xA;*
`azurerm_search_service` - fixed the update function to adjust for
changed API behaviour
([#24903](https://github.com/hashicorp/terraform-provider-azurerm/issues/24903))&#xA;*
`azurerm_windows_web_app` - support `off` for the `file_system_level`
property
([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877))&#xA;*
`azurerm_windows_web_app_slot` - support `off` for the
`file_system_level` property
([#24877](https://github.com/hashicorp/terraform-provider-azurerm/issues/24877))&#xA;&#xA;&#xA;</pre>
            </details>
        </details>
<a
href="https://infra.ci.jenkins.io/job/updatecli/job/azure/job/main/3/">Jenkins
pipeline link</a>
    </action>
</Actions>

---

<table>
  <tr>
    <td width="77">
<img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli
logo" width="50" height="50">
    </td>
    <td>
      <p>
Created automatically by <a
href="https://www.updatecli.io/">Updatecli</a>
      </p>
      <details><summary>Options:</summary>
        <br />
<p>Most of Updatecli configuration is done via <a
href="https://www.updatecli.io/docs/prologue/quick-start/">its
manifest(s)</a>.</p>
        <ul>
<li>If you close this pull request, Updatecli will automatically reopen
it, the next time it runs.</li>
<li>If you close this pull request and delete the base branch, Updatecli
will automatically recreate it, erasing all previous commits made.</li>
        </ul>
        <p>
Feel free to report any issues at <a
href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br
/>
If you find this tool useful, do not hesitate to star <a
href="https://github.com/updatecli/updatecli/stargazers">our GitHub
repository</a> as a sign of appreciation, and/or to tell us directly on
our <a
href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>!
        </p>
      </details>
    </td>
  </tr>
</table>

Co-authored-by: Jenkins Infra Bot (updatecli) <60776566+jenkins-infra-bot@users.noreply.github.com>
Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
rizkybiz pushed a commit to rizkybiz/terraform-provider-azurerm that referenced this pull request Feb 29, 2024
…n_configuration_value_change property (hashicorp#23811)

* Add PostgresqlFlexibleServer to features block

* Corrected Subscription feature test case name

* postgres-flex-server: make restarts on config changes optional; add docs

* Rewrite checks functions to reduce repetitive code

* postgres-flex-configuration: corrected tf-code formatting

* psql-flex-server-config: corrected formatting in test file with terrafmt
rizkybiz pushed a commit to rizkybiz/terraform-provider-azurerm that referenced this pull request Feb 29, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_postgresql_flexible_server_configuration restarts the underlying server on each value change
2 participants