
This Terraform module provides the required infrastructure to create an API Management with a custom subdomain.

- Creates an Azure API Management instance in the specified resource group.
- Adds a custom domain to the API Management instance.
- Adds logging to the API Management instance.
module "apim" {
source = "github.com/messeb/terraform-az-apim.git"
resource_group_name = "az-apim"
resources_base_name = "az-apim"
location = "westeurope"
publisher_email = "[email protected]"
publisher_name = "John Doe"
sku_name = "Consumption_0"
api_keys = [
{
name = "ApiKey01"
key = "cologne-4711"
}
]
sub_domain_dns = {
resource_group_name = "example"
zone_name = "example.com"
root_domain = "example.com"
sub_domain_name = "api"
}
}
Example Usage
| Name |
Description |
Type |
Default |
Required |
| resource_group_name |
Resource group in which the resources will be created. |
string |
n/a |
yes |
| resources_base_name |
Basename for all of the resources. |
string |
n/a |
yes |
| location |
Azure cloud region |
string |
n/a |
yes |
| publisher_name |
Name of the publisher |
string |
n\a |
yes |
| publisher_email |
Email of the publisher |
string |
n\a |
yes |
| sku_name |
SKU of Application Management service |
string |
"Consumption_0" |
no |
| api_keys |
List of api keys |
list(object) |
[] |
no |
| sub_domain_dns.resource_group_name |
Resource group of the DNS zone of the root domain |
string |
n/a |
yes |
| sub_domain_dns.zone_name |
Zone name of the root domain |
string |
n/a |
yes |
| sub_domain_dns.root_domain |
Root domain of the website |
string |
n/a |
yes |
| sub_domain_dns.sub_domain_name |
Sub-domain of the website |
string |
n/a |
yes |
| Name |
Description |
| api_management_url |
The HTTPS-URL of the CDN endpoint of the API Management. |
| api_management_name |
Name of the API Management. |
| api_management_resource_group_name |
Resource group name of the API Management. |
| api_management_location |
Location of the API Management. |