Terraform-provider-azurerm: SecurityAlertPolicies APIs are not supported for Basic Postgresql server

Created on 15 May 2020  ยท  5Comments  ยท  Source: terraform-providers/terraform-provider-azurerm

After upgrading to terraform-provider-azurerm v2.10.0, I'm seeing the following error message with a Basic Postgresql instance defined:

Error: error making read request to postgres server security alert policy: postgresql.ServerSecurityAlertPoliciesClient#Get: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="SecurityAlertPoliciesNotSupportedServerEdition" Message="SecurityAlertPolicies APIs are not supported for Basic server edition"

At first I didn't use the threat_detection_policy block. So I tried disabling it and also made an attempt using the lifecycle.ignore_changes to ignore this field but no luck.

resource "azurerm_postgresql_server" "psql" {
  name                = "psql"
  location            = data.azurerm_resource_group.resource_group.location
  resource_group_name = data.azurerm_resource_group.resource_group.name

  sku_name = "B_Gen5_1"

  threat_detection_policy {
    enabled = false
  }
}

Am I doing something wrong?

bug regression servicpostgresql

Most helpful comment

Yikes. I think this project really needs to expand its test scenarios, it seems like every version fixes a bug and then introduces a bunch more.

FWIW, I've just encountered this after upgrading as well.

How long will we have to wait for a fix on this? I was hoping to upgrade to the latest version because of https://github.com/terraform-providers/terraform-provider-azurerm/issues/6525. Will you do a patch release, or are we stuck waiting until 2.11.* and maybe hopefully everything will be able to work together?

All 5 comments

Probably related to https://github.com/terraform-providers/terraform-provider-azurerm/pull/6721

It wasn't tested with Basic instance type. cc @katbyte

Yikes. I think this project really needs to expand its test scenarios, it seems like every version fixes a bug and then introduces a bunch more.

FWIW, I've just encountered this after upgrading as well.

How long will we have to wait for a fix on this? I was hoping to upgrade to the latest version because of https://github.com/terraform-providers/terraform-provider-azurerm/issues/6525. Will you do a patch release, or are we stuck waiting until 2.11.* and maybe hopefully everything will be able to work together?

๐Ÿ‘‹ hi @atrauzzi,

Sorry that got past our tests, it looks like we were not testing anything but the GP sku ๐Ÿ˜ž I've opened #7015 which adds tests for both the basic and MO sku's and fixes this for basic. It should go out tomorrow or thursday in 2.11.

This has been released in version 2.11.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.11.0"
}
# ... other configuration ...

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error ๐Ÿค– ๐Ÿ™‰ , please reach out to my human friends ๐Ÿ‘‰ [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings