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

1.32 azurerm_api_management_backend: 'certificate' should not be empty #3929

Closed
maximbaz opened this issue Jul 25, 2019 · 4 comments
Closed

Comments

@maximbaz
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.12.5
AzureRM Provider: 1.32.0

Affected Resource(s)

  • azurerm_api_management_backend

Terraform Configuration Files

resource "azurerm_api_management_backend" "backend" {
  name                = "XXX"
  title               = "XXX"
  resource_group_name = "XXX"
  api_management_name = "XXX"
  protocol            = "http"
  url                 = "XXX"
  resource_id         = "XXX"

  credentials {
      header = {
        x-functions-key = "XXX"
      }
    }
}

terraform apply output

Error: Error creating/updating backend "backend" (API Management Service "XXX" / Resource Group "XXX"): apimanagement.BackendClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"'certificate' should not be empty.","target":"credentials.certificate"}]

Notes

I'm creating azurerm_api_management_backend with an intention to allow API management to access an Azure Function.

The docs describe credentials.certificate to be an optional field, and I've checked the code that it is indeed marked as optional.

If I understand this correctly, the Azure itself is refusing the request with the error message that credentials.certificate is required. I'm not sure how to report an upstream issue (if it is indeed an upstream issue), please help.

/cc @hbuckle, @katbyte who worked on the PR #3676 introducing this functionality.
/cc @AndiA92

@katbyte katbyte added this to the v1.32.1 milestone Jul 25, 2019
@katbyte katbyte changed the title azurerm_api_management_backend: 'certificate' should not be empty 1.32 azurerm_api_management_backend: 'certificate' should not be empty Jul 25, 2019
@mbfrahry
Copy link
Member

Hey @maximbaz, thanks for opening this issue and apologies that you ran into it in the first place. We found and fixed the issue and it'll make it into the next release.

@maximbaz
Copy link
Author

Thanks, I tried locally and confirm that the fix is working 👍

@ghost
Copy link

ghost commented Aug 1, 2019

This has been released in version 1.32.1 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 = "~> 1.32.1"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 26, 2019

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!

@ghost ghost locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants