azurerm_api_management_gateway_certificate_authority

Manages an API Management Gateway Certificate Authority.

Example Usage

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      = "pub1"
  publisher_email     = "pub1@email.com"
  sku_name            = "Consumption_0"
}

resource "azurerm_api_management_gateway" "example" {
  name              = "example-gateway"
  api_management_id = azurerm_api_management.example.id
  description       = "Example API Management gateway"

  location_data {
    name     = "example name"
    city     = "example city"
    district = "example district"
    region   = "example region"
  }
}

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")
}

resource "azurerm_api_management_gateway_certificate_authority" "example" {
  api_management_id = azurerm_api_management.example.id
  certificate_name  = azurerm_api_management_certificate.example.name
  gateway_name      = azurerm_api_management_gateway.example.name
  is_trusted        = true
}

Arguments Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

API Management Gateway Certificate Authority can be imported using the resource id, e.g.

terraform import azurerm_api_management_gateway_certificate_authority.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/certificateAuthorities/cert1