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

SecurityAlertPolicies APIs are not supported for Basic Postgresql server #6945

Closed
etiennetremel opened this issue May 15, 2020 · 5 comments · Fixed by #7015
Closed

SecurityAlertPolicies APIs are not supported for Basic Postgresql server #6945

etiennetremel opened this issue May 15, 2020 · 5 comments · Fixed by #7015

Comments

@etiennetremel
Copy link

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?

@etiennetremel
Copy link
Author

etiennetremel commented May 15, 2020

Probably related to #6721

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

@atrauzzi
Copy link

atrauzzi commented May 15, 2020

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 #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?

@katbyte
Copy link
Collaborator

katbyte commented May 20, 2020

👋 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.

katbyte added a commit that referenced this issue May 21, 2020
@ghost
Copy link

ghost commented May 22, 2020

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 ...

@ghost
Copy link

ghost commented Jun 21, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants