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

azurerm_api_management_backend requires certificate #22512

Closed
bruceharrison1984 opened this issue Aug 19, 2019 · 2 comments
Closed

azurerm_api_management_backend requires certificate #22512

bruceharrison1984 opened this issue Aug 19, 2019 · 2 comments

Comments

@bruceharrison1984
Copy link

resource "azurerm_api_management_backend" "example" {
  name                = "${local.app_id}-function-app"
  resource_group_name = "${azurerm_resource_group.example.name}"
  api_management_name = "${azurerm_api_management.example.name}"
  protocol            = "http"
  url                 = "https://${azurerm_function_app.example.default_hostname}/api"
  resource_id         = "https://management.azure.com/subscriptions/33a6b2c9-623b-4dad-acda-0a68f726abfc/resourceGroups/example-dev/providers/Microsoft.Web/sites/example-dev"

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

When attempting to use the credentials block to attach headers, the request fails due to the certificate property being empty.

Error: Error creating/updating backend "example-dev-function-app" (API Management Service "example-dev" / Resource Group "example-dev"): 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"}

In my case, I'm not utilizing backend certificates. I presume I can work around this by providing certs and not using them on the backend, but given that certificate is an optional field it seems strange that it is required.

@bruceharrison1984
Copy link
Author

posted in wrong repository, sorry.

anyone else ends up here, this is an already open issue.
hashicorp/terraform-provider-azurerm#3929

@ghost
Copy link

ghost commented Sep 19, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

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

No branches or pull requests

1 participant