hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.61k stars 4.65k forks source link

Support for azurerm_api_management_certificate #28049

Closed ThibGregSBMB closed 1 day ago

ThibGregSBMB commented 1 day ago

Is there an existing issue for this?

Community Note

Description

Hello,

I have a question regarding the azurerm_api_management_certificate resource in Terraform.

I want to use a .cer certificate, but according to the documentation for the resource, it states the following: [data] - (Optional) The base-64 encoded certificate data, which must be a PFX file.

However, in the Azure Portal, it is clearly stated that a .cer file can be used. I tested this manually by adding my .cer certificate in the Azure Portal, and it worked correctly: PortalAzureExemple

My questions are:

Thank you in advance for your help!

Have a great day,

New or Affected Resource(s)/Data Source(s)

azurerm_api_management_certificate

Potential Terraform Configuration

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_api_management" "example" {
  name                = "example-apim"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  publisher_name      = "My Company"
  publisher_email     = "company@terraform.io"

  sku_name = "Developer_1"
}

resource "azurerm_api_management_certificate" "example" {
  name                = "example-cert"
  api_management_name = azurerm_api_management.example.name
  resource_group_name = azurerm_resource_group.example.name
  data                = filebase64("example.pfx") #or .cer file ?
}

References

No response

rcskosir commented 1 day ago

Thank you for taking the time to raise this! We use Issues in this repository to track feature enhancements and bugs in the Azure Provider. So that we can maintain focus on that, we instead ask that broader questions are raised using one of the Community Resources, such as the Azure Provider forum. With that in mind, I'm going to close this issue.